summaryrefslogtreecommitdiffstats
path: root/usr.sbin/sade
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2002-11-12 20:26:52 +0000
committerjhb <jhb@FreeBSD.org>2002-11-12 20:26:52 +0000
commitf170e9b712c5f68fa754d23635557ae2cb301f0a (patch)
tree0f28548e591f6c95654ff324015783586e5cf378 /usr.sbin/sade
parent7bfcb5ec463a3fc4359785ffc160669b731dc7a7 (diff)
downloadFreeBSD-src-f170e9b712c5f68fa754d23635557ae2cb301f0a.zip
FreeBSD-src-f170e9b712c5f68fa754d23635557ae2cb301f0a.tar.gz
When setting the mountpoint name, remember any previous setting of the
newfs flag for this partition. PR: bin/31837 Reported by: Oliver Breuninger <ob@www.partner.de>
Diffstat (limited to 'usr.sbin/sade')
-rw-r--r--usr.sbin/sade/label.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/usr.sbin/sade/label.c b/usr.sbin/sade/label.c
index 247c533..9e1f5f7 100644
--- a/usr.sbin/sade/label.c
+++ b/usr.sbin/sade/label.c
@@ -344,6 +344,7 @@ get_mountpoint(struct chunk *old)
{
char *val;
PartInfo *tmp;
+ Boolean newfs;
if (old && old->private_data)
tmp = old->private_data;
@@ -384,9 +385,13 @@ get_mountpoint(struct chunk *old)
else if (old)
old->flags &= ~CHUNK_IS_ROOT;
- safe_free(tmp);
+ newfs = FALSE;
+ if (tmp) {
+ newfs = tmp->newfs;
+ safe_free(tmp);
+ }
val = string_skipwhite(string_prune(val));
- tmp = new_part(val, TRUE, 0);
+ tmp = new_part(val, newfs, 0);
if (old) {
old->private_data = tmp;
old->private_free = safe_free;
OpenPOWER on IntegriCloud