diff options
author | Prasad Joshi <[email protected]> | 2015-07-05 01:35:26 +0200 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2015-07-14 10:23:29 -0700 |
commit | eaa52d32b0784b1d6ceb1299bb520300506f58bf (patch) | |
tree | fbce32d4408ef40347b1a403e12adaac44684cbd /cmd | |
parent | 0de7c552b69f2bb3e16f023007f049cb3c8e9afd (diff) |
Illumos 1765 - assert triggered in libzfs_import.c
1765 assert triggered in libzfs_import.c trying to import pool
name beginning with a number
Reviewed-by: Garrett D'Amore <[email protected]>
Reviewed-by: Matthew Ahrens <[email protected]>
Approved by: Robert Mustacchi <[email protected]>
References:
https://github.com/illumos/illumos-gate/commit/9edf9eb
https://www.illumos.org/issues/1765
Ported-by: kernelOfTruth [email protected]
Signed-off-by: Brian Behlendorf <[email protected]>
Closes #3562
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/zpool/zpool_main.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/cmd/zpool/zpool_main.c b/cmd/zpool/zpool_main.c index e6517574d..aa9b21dad 100644 --- a/cmd/zpool/zpool_main.c +++ b/cmd/zpool/zpool_main.c @@ -25,6 +25,7 @@ * Copyright (c) 2011, 2014 by Delphix. All rights reserved. * Copyright (c) 2012 by Frederik Wessels. All rights reserved. * Copyright (c) 2012 by Cyril Plisko. All rights reserved. + * Copyright (c) 2013 by Prasad Joshi (sTec). All rights reserved. */ #include <assert.h> @@ -2253,8 +2254,10 @@ zpool_do_import(int argc, char **argv) errno = 0; searchguid = strtoull(argv[0], &endptr, 10); - if (errno != 0 || *endptr != '\0') + if (errno != 0 || *endptr != '\0') { searchname = argv[0]; + searchguid = 0; + } found_config = NULL; /* |