Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 24 Aug 2013 00:54:47 +0000 (UTC)
From:      Xin LI <delphij@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r254758 - head/cddl/contrib/opensolaris/cmd/zpool
Message-ID:  <201308240054.r7O0sl1F008885@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: delphij
Date: Sat Aug 24 00:54:47 2013
New Revision: 254758
URL: http://svnweb.freebsd.org/changeset/base/254758

Log:
  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

Modified:
  head/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c
Directory Properties:
  head/cddl/contrib/opensolaris/   (props changed)

Modified: head/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c
==============================================================================
--- head/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c	Sat Aug 24 00:42:37 2013	(r254757)
+++ head/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c	Sat Aug 24 00:54:47 2013	(r254758)
@@ -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;
 
 		/*



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201308240054.r7O0sl1F008885>