FreeBSD Bugzilla – Attachment 164989 Details for
Bug 205828
[patch] bsdinstall(8): partedit crashes when modifying a zfs partition's mountpoint
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
fix partedit crash when setting mountpoint on zfs partition
zfs-crash.patch (text/plain), 1.14 KB, created by
will
on 2016-01-03 11:04:42 UTC
(
hide
)
Description:
fix partedit crash when setting mountpoint on zfs partition
Filename:
MIME Type:
Creator:
will
Created:
2016-01-03 11:04:42 UTC
Size:
1.14 KB
patch
obsolete
>Index: partedit/gpart_ops.c >=================================================================== >--- partedit/gpart_ops.c (revision 293044) >+++ partedit/gpart_ops.c (working copy) >@@ -669,6 +669,14 @@ > /* Set part metadata */ > md = get_part_metadata(name, 1); > >+ if (strcmp("freebsd-zfs", type) == 0) { >+ zpool_name = strdup((strlen(mountpoint) == 1) ? >+ "root" : &mountpoint[1]); >+ for (i = 0; zpool_name[i] != 0; i++) >+ if (!isalnum(zpool_name[i])) >+ zpool_name[i] = '_'; >+ } >+ > if (newfs) { > if (md->newfs != NULL) { > free(md->newfs); >@@ -679,11 +687,6 @@ > md->newfs = malloc(strlen(newfs) + strlen(" /dev/") + > strlen(mountpoint) + 5 + strlen(name) + 1); > if (strcmp("freebsd-zfs", type) == 0) { >- zpool_name = strdup((strlen(mountpoint) == 1) ? >- "root" : &mountpoint[1]); >- for (i = 0; zpool_name[i] != 0; i++) >- if (!isalnum(zpool_name[i])) >- zpool_name[i] = '_'; > sprintf(md->newfs, "%s %s /dev/%s", newfs, > zpool_name, name); > } else { >@@ -758,8 +761,7 @@ > md->fstab->fs_mntops = strdup(md->fstab->fs_type); > } > >- if (zpool_name != NULL) >- free(zpool_name); >+ free(zpool_name); > } > > static
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 205828
: 164989