Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-9]: src/external/cddl/osnet/dist/lib/libzfs/common Pull up follow...
details: https://anonhg.NetBSD.org/src/rev/eabf576e20a1
branches: netbsd-9
changeset: 962853:eabf576e20a1
user: martin <martin%NetBSD.org@localhost>
date: Tue Aug 20 11:42:35 2019 +0000
description:
Pull up following revision(s) (requested by hannken in ticket #100):
external/cddl/osnet/dist/lib/libzfs/common/libzfs_import.c: revision 1.5
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.
diffstat:
external/cddl/osnet/dist/lib/libzfs/common/libzfs_import.c | 5 +----
1 files changed, 1 insertions(+), 4 deletions(-)
diffs (26 lines):
diff -r a65ab0af9438 -r eabf576e20a1 external/cddl/osnet/dist/lib/libzfs/common/libzfs_import.c
--- a/external/cddl/osnet/dist/lib/libzfs/common/libzfs_import.c Tue Aug 20 11:31:46 2019 +0000
+++ b/external/cddl/osnet/dist/lib/libzfs/common/libzfs_import.c Tue Aug 20 11:42:35 2019 +0000
@@ -1262,9 +1262,7 @@
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 @@
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;
Home |
Main Index |
Thread Index |
Old Index