summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJerry Jelinek <jerry.jelinek@joyent.com>2015-12-03 13:01:08 +0000
committerJerry Jelinek <jerry.jelinek@joyent.com>2015-12-03 13:01:08 +0000
commit6cd4f0df6f879bade0fd49d0f8c662adbe74ae2f (patch)
tree335dd0486907b97b460c0fe4b3ba41fa5cfb190f
parentf56ad4343dbc5b297c10cdca208754211297da6b (diff)
parentb289d045e084af53efcc025255af8242e41f28fa (diff)
downloadillumos-joyent-6cd4f0df6f879bade0fd49d0f8c662adbe74ae2f.tar.gz
[illumos-gate merge]
commit b289d045e084af53efcc025255af8242e41f28fa 6358 A faulted pool with only unavailable vdevs triggers assertion failure in libzfs
-rw-r--r--usr/src/lib/libzfs/common/libzfs_config.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/usr/src/lib/libzfs/common/libzfs_config.c b/usr/src/lib/libzfs/common/libzfs_config.c
index d5ba20fde0..c3dafd6a77 100644
--- a/usr/src/lib/libzfs/common/libzfs_config.c
+++ b/usr/src/lib/libzfs/common/libzfs_config.c
@@ -26,6 +26,7 @@
/*
* Copyright (c) 2012 by Delphix. All rights reserved.
+ * Copyright (c) 2015 by Syneto S.R.L. All rights reserved.
*/
/*
@@ -246,8 +247,9 @@ zpool_get_features(zpool_handle_t *zhp)
config = zpool_get_config(zhp, NULL);
}
- verify(nvlist_lookup_nvlist(config, ZPOOL_CONFIG_FEATURE_STATS,
- &features) == 0);
+ if (nvlist_lookup_nvlist(config, ZPOOL_CONFIG_FEATURE_STATS,
+ &features) != 0)
+ return (NULL);
return (features);
}