From 7234ef453b9662faa49caff05a2a288553f7abcd Mon Sep 17 00:00:00 2001 From: Steven Hartland Date: Wed, 31 Dec 2014 04:11:29 +0000 Subject: [PATCH] Use the correct state name for unavailable pools in zpool list This corrects inconsitencies between zpool list and zpool status which are both described as displaying the pool however zpool list would use this hardcoded FAULTED instead of the correct UNAVAIL. MFC after: 1 month --- cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c b/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c index e09417aa2dfb..40535f863995 100644 --- a/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c +++ b/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c @@ -256,7 +256,8 @@ zpool_get_prop(zpool_handle_t *zhp, zpool_prop_t prop, char *buf, size_t len, break; case ZPOOL_PROP_HEALTH: - (void) strlcpy(buf, "FAULTED", len); + (void) strlcpy(buf, + zpool_pool_state_to_name(POOL_STATE_UNAVAIL), len); break; case ZPOOL_PROP_GUID: