summaryrefslogtreecommitdiffstats
path: root/cddl
diff options
context:
space:
mode:
authorsmh <smh@FreeBSD.org>2014-12-31 04:11:29 +0000
committersmh <smh@FreeBSD.org>2014-12-31 04:11:29 +0000
commit128806a8151aa98ab5b9bc844a469b33bbf5aa23 (patch)
treebadf00b3d0e836551e778a9ce6794a5e4235b451 /cddl
parent53a6dd6aa212987729d0bae0dfa83fe071601720 (diff)
downloadFreeBSD-src-128806a8151aa98ab5b9bc844a469b33bbf5aa23.zip
FreeBSD-src-128806a8151aa98ab5b9bc844a469b33bbf5aa23.tar.gz
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 <state> however zpool list would use this hardcoded FAULTED instead of the correct UNAVAIL. MFC after: 1 month
Diffstat (limited to 'cddl')
-rw-r--r--cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c b/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c
index e09417a..40535f8 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:
OpenPOWER on IntegriCloud