libzfs_import.c (fa9e4066) | libzfs_import.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 * --- 706 unchanged lines hidden (view full) --- 715 guid == zc.zc_pool_guid) { 716 /* 717 * Because the device may have been removed while 718 * offlined, we only report it as active if the vdev is 719 * still present in the config. Otherwise, pretend like 720 * it's not in use. 721 */ 722 if ((zhp = zpool_open_canfail(name)) != 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 * --- 706 unchanged lines hidden (view full) --- 715 guid == zc.zc_pool_guid) { 716 /* 717 * Because the device may have been removed while 718 * offlined, we only report it as active if the vdev is 719 * still present in the config. Otherwise, pretend like 720 * it's not in use. 721 */ 722 if ((zhp = zpool_open_canfail(name)) != NULL && |
723 (pool_config = zpool_get_config(zhp)) != NULL) { | 723 (pool_config = zpool_get_config(zhp, NULL)) 724 != NULL) { |
724 nvlist_t *nvroot; 725 726 verify(nvlist_lookup_nvlist(pool_config, 727 ZPOOL_CONFIG_VDEV_TREE, &nvroot) == 0); 728 if (find_guid(nvroot, vdev_guid)) { 729 *statestr = zfs_strdup( 730 dgettext(TEXT_DOMAIN, "active")); 731 *namestr = zfs_strdup(name); --- 22 unchanged lines hidden --- | 725 nvlist_t *nvroot; 726 727 verify(nvlist_lookup_nvlist(pool_config, 728 ZPOOL_CONFIG_VDEV_TREE, &nvroot) == 0); 729 if (find_guid(nvroot, vdev_guid)) { 730 *statestr = zfs_strdup( 731 dgettext(TEXT_DOMAIN, "active")); 732 *namestr = zfs_strdup(name); --- 22 unchanged lines hidden --- |