libzfs_jni_pool.c (c8e9ed14) | libzfs_jni_pool.c (088e9d47) |
---|---|
1/* 2 * CDDL HEADER START 3 * 4 * The contents of this file are subject to the terms of the 5 * Common Development and Distribution License, Version 1.0 only 6 * (the "License"). You may not use this file except in compliance 7 * with the License. 8 * --- 526 unchanged lines hidden (view full) --- 535 * Gets the root vdev (an nvlist_t *) for the given pool. 536 */ 537nvlist_t * 538zjni_get_root_vdev(zpool_handle_t *zhp) 539{ 540 nvlist_t *root = NULL; 541 542 if (zhp != NULL) { | 1/* 2 * CDDL HEADER START 3 * 4 * The contents of this file are subject to the terms of the 5 * Common Development and Distribution License, Version 1.0 only 6 * (the "License"). You may not use this file except in compliance 7 * with the License. 8 * --- 526 unchanged lines hidden (view full) --- 535 * Gets the root vdev (an nvlist_t *) for the given pool. 536 */ 537nvlist_t * 538zjni_get_root_vdev(zpool_handle_t *zhp) 539{ 540 nvlist_t *root = NULL; 541 542 if (zhp != NULL) { |
543 nvlist_t *attrs = zpool_get_config(zhp); | 543 nvlist_t *attrs = zpool_get_config(zhp, NULL); |
544 545 if (attrs != NULL) { 546 int result = nvlist_lookup_nvlist( 547 attrs, ZPOOL_CONFIG_VDEV_TREE, &root); 548 if (result != 0) { 549 root = NULL; 550 } 551 } --- 252 unchanged lines hidden --- | 544 545 if (attrs != NULL) { 546 int result = nvlist_lookup_nvlist( 547 attrs, ZPOOL_CONFIG_VDEV_TREE, &root); 548 if (result != 0) { 549 root = NULL; 550 } 551 } --- 252 unchanged lines hidden --- |