Skip to content

Commit eaa52d3

Browse files
Prasad Joshibehlendorf
authored andcommitted
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 <garrett@damore.org> Reviewed-by: Matthew Ahrens <mahrens@delphix.com> Approved by: Robert Mustacchi <rm@joyent.com> References: illumos/illumos-gate@9edf9eb https://www.illumos.org/issues/1765 Ported-by: kernelOfTruth kerneloftruth@gmail.com Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Closes #3562
1 parent 0de7c55 commit eaa52d3

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

cmd/zpool/zpool_main.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
* Copyright (c) 2011, 2014 by Delphix. All rights reserved.
2626
* Copyright (c) 2012 by Frederik Wessels. All rights reserved.
2727
* Copyright (c) 2012 by Cyril Plisko. All rights reserved.
28+
* Copyright (c) 2013 by Prasad Joshi (sTec). All rights reserved.
2829
*/
2930

3031
#include <assert.h>
@@ -2253,8 +2254,10 @@ zpool_do_import(int argc, char **argv)
22532254

22542255
errno = 0;
22552256
searchguid = strtoull(argv[0], &endptr, 10);
2256-
if (errno != 0 || *endptr != '\0')
2257+
if (errno != 0 || *endptr != '\0') {
22572258
searchname = argv[0];
2259+
searchguid = 0;
2260+
}
22582261
found_config = NULL;
22592262

22602263
/*

0 commit comments

Comments
 (0)