Module Name: src Committed By: hannken Date: Tue Aug 20 08:11:21 UTC 2019
Modified Files: src/external/cddl/osnet/dist/lib/libzfs/common: libzfs_import.c Log Message: Always open the raw block devices as "<device><unit>" like it comes from sysctl "hw.disknames" without attaching the raw partition letter. Now pools on wedges get imported too. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 \ src/external/cddl/osnet/dist/lib/libzfs/common/libzfs_import.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/external/cddl/osnet/dist/lib/libzfs/common/libzfs_import.c diff -u src/external/cddl/osnet/dist/lib/libzfs/common/libzfs_import.c:1.4 src/external/cddl/osnet/dist/lib/libzfs/common/libzfs_import.c:1.5 --- src/external/cddl/osnet/dist/lib/libzfs/common/libzfs_import.c:1.4 Mon May 28 21:05:06 2018 +++ src/external/cddl/osnet/dist/lib/libzfs/common/libzfs_import.c Tue Aug 20 08:11:21 2019 @@ -1262,9 +1262,7 @@ zpool_find_import_impl(libzfs_handle_t * static const char mib_name[] = "hw.disknames"; size_t len; char *disknames, *last, *name; - char part; - part = getrawpartition(); if (sysctlbyname(mib_name, NULL, &len, NULL, 0) == -1) { zfs_error_aux(hdl, strerror(errno)); (void) zfs_error_fmt(hdl, EZFS_BADPATH, @@ -1277,11 +1275,10 @@ zpool_find_import_impl(libzfs_handle_t * disknames = zfs_alloc(hdl, len + 2); (void)sysctlbyname(mib_name, disknames, &len, NULL, 0); - for ((name = strtok_r(disknames, " ", &last)); name; (name = strtok_r(NULL, " ", &last))) { slice = zfs_alloc(hdl, sizeof (rdsk_node_t)); - slice->rn_name = zfs_asprintf(hdl, "%s%c", name, 'a' + part); + slice->rn_name = zfs_strdup(hdl, name); slice->rn_avl = &slice_cache; slice->rn_dfd = dfd; slice->rn_hdl = hdl;