aboutsummaryrefslogtreecommitdiff
path: root/sys/contrib/openzfs/lib/libzutil
diff options
context:
space:
mode:
Diffstat (limited to 'sys/contrib/openzfs/lib/libzutil')
-rw-r--r--sys/contrib/openzfs/lib/libzutil/zutil_import.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/sys/contrib/openzfs/lib/libzutil/zutil_import.c b/sys/contrib/openzfs/lib/libzutil/zutil_import.c
index 823f093f409f..b9e08eac6af0 100644
--- a/sys/contrib/openzfs/lib/libzutil/zutil_import.c
+++ b/sys/contrib/openzfs/lib/libzutil/zutil_import.c
@@ -24,6 +24,7 @@
* Copyright (c) 2012, 2018 by Delphix. All rights reserved.
* Copyright 2015 RackTop Systems.
* Copyright (c) 2016, Intel Corporation.
+ * Copyright (c) 2021, Colm Buckley <colm@tuatha.org>
*/
/*
@@ -552,12 +553,14 @@ get_configs(libpc_handle_t *hdl, pool_list_t *pl, boolean_t active_ok,
* pool guid
* name
* comment (if available)
+ * compatibility features (if available)
* pool state
* hostid (if available)
* hostname (if available)
*/
uint64_t state, version;
char *comment = NULL;
+ char *compatibility = NULL;
version = fnvlist_lookup_uint64(tmp,
ZPOOL_CONFIG_VERSION);
@@ -577,6 +580,13 @@ get_configs(libpc_handle_t *hdl, pool_list_t *pl, boolean_t active_ok,
fnvlist_add_string(config,
ZPOOL_CONFIG_COMMENT, comment);
+ if (nvlist_lookup_string(tmp,
+ ZPOOL_CONFIG_COMPATIBILITY,
+ &compatibility) == 0)
+ fnvlist_add_string(config,
+ ZPOOL_CONFIG_COMPATIBILITY,
+ compatibility);
+
state = fnvlist_lookup_uint64(tmp,
ZPOOL_CONFIG_POOL_STATE);
fnvlist_add_uint64(config,