svn commit: r216920 - user/nwhitehorn/bsdinstall/partedit
Nathan Whitehorn
nwhitehorn at FreeBSD.org
Mon Jan 3 15:31:02 UTC 2011
Author: nwhitehorn
Date: Mon Jan 3 15:31:02 2011
New Revision: 216920
URL: http://svn.freebsd.org/changeset/base/216920
Log:
Allow partition mountpoints to be deleted.
Modified:
user/nwhitehorn/bsdinstall/partedit/gpart_ops.c
Modified: user/nwhitehorn/bsdinstall/partedit/gpart_ops.c
==============================================================================
--- user/nwhitehorn/bsdinstall/partedit/gpart_ops.c Mon Jan 3 12:57:07 2011 (r216919)
+++ user/nwhitehorn/bsdinstall/partedit/gpart_ops.c Mon Jan 3 15:31:02 2011 (r216920)
@@ -439,8 +439,18 @@ set_part_metadata(const char *name, cons
/* VTOC8 needs partcode in UFS partitions */
if (strcmp(scheme, "VTOC8") == 0 && strcmp(type, "freebsd-ufs") == 0)
md->bootcode = 1;
-
- if (mountpoint != NULL && mountpoint[0] != '\0') {
+
+ if (mountpoint == NULL || mountpoint[0] == '\0') {
+ if (md->fstab != NULL) {
+ free(md->fstab->fs_spec);
+ free(md->fstab->fs_file);
+ free(md->fstab->fs_vfstype);
+ free(md->fstab->fs_mntops);
+ free(md->fstab->fs_type);
+ free(md->fstab);
+ md->fstab = NULL;
+ }
+ } else {
if (md->fstab == NULL) {
md->fstab = malloc(sizeof(struct fstab));
} else {
More information about the svn-src-user
mailing list