Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 31 Dec 2014 04:11:30 +0000 (UTC)
From:      Steven Hartland <smh@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r276446 - head/cddl/contrib/opensolaris/lib/libzfs/common
Message-ID:  <201412310411.sBV4BU63081831@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: smh
Date: Wed Dec 31 04:11:29 2014
New Revision: 276446
URL: https://svnweb.freebsd.org/changeset/base/276446

Log:
  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

Modified:
  head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c

Modified: head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c
==============================================================================
--- head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c	Wed Dec 31 02:38:23 2014	(r276445)
+++ head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c	Wed Dec 31 04:11:29 2014	(r276446)
@@ -256,7 +256,8 @@ zpool_get_prop(zpool_handle_t *zhp, zpoo
 			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:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201412310411.sBV4BU63081831>