Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 28 Feb 2011 01:55:04 +0300
From:      Anonymous <swell.k@gmail.com>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   bin/155104: [zfs][patch] use /dev prefix by default when importing
Message-ID:  <86ipw5xf3r.fsf@gmail.com>
Resent-Message-ID: <201102272300.p1RN0P1A086549@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         155104
>Category:       bin
>Synopsis:       [zfs][patch] use /dev prefix by default when importing
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-fs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Feb 27 23:00:24 UTC 2011
>Closed-Date:
>Last-Modified:
>Originator:     Anonymous
>Release:        FreeBSD 9.0-CURRENT amd64
>Organization:
>Environment:
>Description:
Don't use Solaris prefix /dev/dsk when trying
zpool_{find,search}_import() without arguments.

cf. http://docs.freebsd.org/cgi/mid.cgi?86lj1s3pv0.fsf
>How-To-Repeat:
$ zdb -e tank
>Fix:
--- a.diff begins here ---
Index: cddl/contrib/opensolaris/lib/libzfs/common/libzfs_import.c
===================================================================
--- cddl/contrib/opensolaris/lib/libzfs/common/libzfs_import.c	(revision 219090)
+++ cddl/contrib/opensolaris/lib/libzfs/common/libzfs_import.c	(working copy)
@@ -1129,7 +1129,11 @@ zpool_find_import_impl(libzfs_handle_t *hdl, impor
 	char *end, **dir = iarg->path;
 	size_t pathleft;
 	nvlist_t *ret = NULL;
+#ifdef sun
 	static char *default_dir = "/dev/dsk";
+#else
+	static char *default_dir = "/dev";
+#endif
 	pool_list_t pools = { 0 };
 	pool_entry_t *pe, *penext;
 	vdev_entry_t *ve, *venext;
--- a.diff ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:



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