Date: Mon, 3 Jan 2011 15:31:02 +0000 (UTC) From: Nathan Whitehorn <nwhitehorn@FreeBSD.org> To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r216920 - user/nwhitehorn/bsdinstall/partedit Message-ID: <201101031531.p03FV27W097005@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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 {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201101031531.p03FV27W097005>