svn commit: r277906 - stable/10/cddl/contrib/opensolaris/lib/libzfs/common
Steven Hartland
smh at FreeBSD.org
Fri Jan 30 01:05:52 UTC 2015
Author: smh
Date: Fri Jan 30 01:05:50 2015
New Revision: 277906
URL: https://svnweb.freebsd.org/changeset/base/277906
Log:
MFC r277239:
Eliminate illumos whole disk special case when searching for a ZFS vdev
Sponsored by: Multiplay
Modified:
stable/10/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c
Directory Properties:
stable/10/ (props changed)
Modified: stable/10/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c
==============================================================================
--- stable/10/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c Fri Jan 30 01:04:17 2015 (r277905)
+++ stable/10/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c Fri Jan 30 01:05:50 2015 (r277906)
@@ -1916,6 +1916,7 @@ zpool_scan(zpool_handle_t *zhp, pool_sca
}
}
+#ifdef illumos
/*
* This provides a very minimal check whether a given string is likely a
* c#t#d# style string. Users of this are expected to do their own
@@ -1947,6 +1948,7 @@ ctd_check_path(char *str) {
}
return (CTD_CHECK(str));
}
+#endif
/*
* Find a vdev that matches the search criteria specified. We use the
@@ -2002,6 +2004,7 @@ vdev_to_nvlist_iter(nvlist_t *nv, nvlist
*
* Otherwise, all other searches are simple string compares.
*/
+#ifdef illumos
if (strcmp(srchkey, ZPOOL_CONFIG_PATH) == 0 &&
ctd_check_path(val)) {
uint64_t wholedisk = 0;
@@ -2041,6 +2044,9 @@ vdev_to_nvlist_iter(nvlist_t *nv, nvlist
break;
}
} else if (strcmp(srchkey, ZPOOL_CONFIG_TYPE) == 0 && val) {
+#else
+ if (strcmp(srchkey, ZPOOL_CONFIG_TYPE) == 0 && val) {
+#endif
char *type, *idx, *end, *p;
uint64_t id, vdev_id;
More information about the svn-src-all
mailing list