summaryrefslogtreecommitdiff
path: root/usr/src/lib/libdiskmgt/common
diff options
context:
space:
mode:
Diffstat (limited to 'usr/src/lib/libdiskmgt/common')
-rw-r--r--usr/src/lib/libdiskmgt/common/entry.c4
-rw-r--r--usr/src/lib/libdiskmgt/common/inuse_zpool.c5
-rw-r--r--usr/src/lib/libdiskmgt/common/libdiskmgt.h1
3 files changed, 9 insertions, 1 deletions
diff --git a/usr/src/lib/libdiskmgt/common/entry.c b/usr/src/lib/libdiskmgt/common/entry.c
index a7756b02d4..1d3b2313e4 100644
--- a/usr/src/lib/libdiskmgt/common/entry.c
+++ b/usr/src/lib/libdiskmgt/common/entry.c
@@ -1118,6 +1118,10 @@ dm_get_usage_string(char *what, char *how, char **usage_string)
*usage_string = dgettext(TEXT_DOMAIN,
"%s is reserved as a hot spare for ZFS pool %s. Please "
"see zpool(1M).\n");
+ } else if (strcmp(what, DM_USE_L2CACHE_ZPOOL) == 0) {
+ *usage_string = dgettext(TEXT_DOMAIN,
+ "%s is in use as a cache device for ZFS pool %s. "
+ "Please see zpool(1M).\n");
}
}
void
diff --git a/usr/src/lib/libdiskmgt/common/inuse_zpool.c b/usr/src/lib/libdiskmgt/common/inuse_zpool.c
index a7cf203a2f..e4f9ab5a3b 100644
--- a/usr/src/lib/libdiskmgt/common/inuse_zpool.c
+++ b/usr/src/lib/libdiskmgt/common/inuse_zpool.c
@@ -19,7 +19,7 @@
* CDDL HEADER END
*/
/*
- * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -102,6 +102,9 @@ inuse_zpool_common(char *slice, nvlist_t *attrs, int *errp, char *type)
} else if (state == POOL_STATE_SPARE) {
found = 1;
type = DM_USE_SPARE_ZPOOL;
+ } else if (state == POOL_STATE_L2CACHE) {
+ found = 1;
+ type = DM_USE_L2CACHE_ZPOOL;
}
} else {
found = 1;
diff --git a/usr/src/lib/libdiskmgt/common/libdiskmgt.h b/usr/src/lib/libdiskmgt/common/libdiskmgt.h
index 3a580cbfb4..303b03f171 100644
--- a/usr/src/lib/libdiskmgt/common/libdiskmgt.h
+++ b/usr/src/lib/libdiskmgt/common/libdiskmgt.h
@@ -216,6 +216,7 @@ typedef enum {
#define DM_USE_EXPORTED_ZPOOL "exported_zpool"
#define DM_USE_ACTIVE_ZPOOL "active_zpool"
#define DM_USE_SPARE_ZPOOL "spare_zpool"
+#define DM_USE_L2CACHE_ZPOOL "l2cache_zpool"
/* event */
#define DM_EV_NAME "name"