summaryrefslogtreecommitdiffstats
path: root/cddl
diff options
context:
space:
mode:
authordelphij <delphij@FreeBSD.org>2013-08-24 00:54:47 +0000
committerdelphij <delphij@FreeBSD.org>2013-08-24 00:54:47 +0000
commita4cf8ab508e9f713adbaba1d97b5f30ae67800b3 (patch)
tree0a188f3a273f993dff4b70cf9cf3146e46864098 /cddl
parenta6fe3ad03c345a602a25a8688c5e894754484f2c (diff)
downloadFreeBSD-src-a4cf8ab508e9f713adbaba1d97b5f30ae67800b3.zip
FreeBSD-src-a4cf8ab508e9f713adbaba1d97b5f30ae67800b3.tar.gz
MFV r254751:
Don't treat the parameter as a number (pool GUID) when there is error converting it from string, instead, treat it as the pool name. Illumos ZFS issues: 1765 assert triggered in libzfs_import.c trying to import pool name beginning with a number
Diffstat (limited to 'cddl')
-rw-r--r--cddl/contrib/opensolaris/cmd/zpool/zpool_main.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c b/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c
index 1686467..0dcf11b 100644
--- a/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c
+++ b/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c
@@ -25,6 +25,7 @@
* Copyright (c) 2012 by Delphix. All rights reserved.
* Copyright (c) 2012 by Frederik Wessels. All rights reserved.
* Copyright (c) 2012 Martin Matuska <mm@FreeBSD.org>. All rights reserved.
+ * Copyright (c) 2013 by Prasad Joshi (sTec). All rights reserved.
*/
#include <solaris.h>
@@ -2128,8 +2129,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;
/*
OpenPOWER on IntegriCloud