diff options
author | Paul Dagnelie <pcd@delphix.com> | 2017-03-23 15:28:22 -0700 |
---|---|---|
committer | Prakash Surya <prakash.surya@delphix.com> | 2018-03-19 11:23:35 -0700 |
commit | 015f38bba18ec2acb8888f945aa30883d339367b (patch) | |
tree | 9d704be010fbc4aa9382fe2bdfaed604dd81aa0d | |
parent | 5dafeea3ebd2dd77affc802bcb90f63faf01589f (diff) | |
download | illumos-joyent-015f38bba18ec2acb8888f945aa30883d339367b.tar.gz |
9193 bootcfg -C doesn't work
Reviewed by: Chris Williamson <chris.williamson@delphix.com>
Reviewed by: Sebastien Roy <sebastien.roy@delphix.com>
Reviewed by: Igor Kozhukhov <igor@dilos.org>
Approved by: Robert Mustacchi <rm@joyent.com>
-rw-r--r-- | usr/src/lib/libzfs/common/libzfs_pool.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/usr/src/lib/libzfs/common/libzfs_pool.c b/usr/src/lib/libzfs/common/libzfs_pool.c index 10eb3c6a8a..98ee996c08 100644 --- a/usr/src/lib/libzfs/common/libzfs_pool.c +++ b/usr/src/lib/libzfs/common/libzfs_pool.c @@ -396,6 +396,8 @@ static boolean_t bootfs_name_valid(const char *pool, char *bootfs) { int len = strlen(pool); + if (bootfs[0] == '\0') + return (B_TRUE); if (!zfs_name_valid(bootfs, ZFS_TYPE_FILESYSTEM|ZFS_TYPE_SNAPSHOT)) return (B_FALSE); @@ -549,8 +551,7 @@ zpool_valid_proplist(libzfs_handle_t *hdl, const char *poolname, * bootfs property value has to be a dataset name and * the dataset has to be in the same pool as it sets to. */ - if (strval[0] != '\0' && !bootfs_name_valid(poolname, - strval)) { + if (!bootfs_name_valid(poolname, strval)) { zfs_error_aux(hdl, dgettext(TEXT_DOMAIN, "'%s' " "is an invalid name"), strval); (void) zfs_error(hdl, EZFS_INVALIDNAME, errbuf); |