summaryrefslogtreecommitdiff
path: root/sbin/disklabel/disklabel.c
diff options
context:
space:
mode:
authorKenneth R Westerback <krw@cvs.openbsd.org>2009-05-17 01:17:13 +0000
committerKenneth R Westerback <krw@cvs.openbsd.org>2009-05-17 01:17:13 +0000
commit28ee436a0950562d11703c73e89ae9b87e42f932 (patch)
tree6824ef7a6f801e870c3abc2ac7d5cc97620b7aa4 /sbin/disklabel/disklabel.c
parent43b3502499f593d85fcabe98e9c4ac1038ed2614 (diff)
Write out mountpoint info in writelabel() after label successfully
written, rather than every time editor_alloc() is called. Respect '-n' for mountpoint info. Reduces surprise appearance of files when you 'x' out of Editor. "my sunglasses did not go dark" deraadt@
Diffstat (limited to 'sbin/disklabel/disklabel.c')
-rw-r--r--sbin/disklabel/disklabel.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/sbin/disklabel/disklabel.c b/sbin/disklabel/disklabel.c
index 0fb27fa4803..0b2854472b7 100644
--- a/sbin/disklabel/disklabel.c
+++ b/sbin/disklabel/disklabel.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: disklabel.c,v 1.153 2009/05/05 12:24:19 otto Exp $ */
+/* $OpenBSD: disklabel.c,v 1.154 2009/05/17 01:17:12 krw Exp $ */
/*
* Copyright (c) 1987, 1993
@@ -39,7 +39,7 @@ static const char copyright[] =
#endif /* not lint */
#ifndef lint
-static const char rcsid[] = "$OpenBSD: disklabel.c,v 1.153 2009/05/05 12:24:19 otto Exp $";
+static const char rcsid[] = "$OpenBSD: disklabel.c,v 1.154 2009/05/17 01:17:12 krw Exp $";
#endif /* not lint */
#include <sys/param.h>
@@ -508,6 +508,10 @@ writelabel(int f, char *boot, struct disklabel *lp)
}
}
#endif
+ /* Finally, write out any mount point information. */
+ if (!donothing)
+ mpsave(lp);
+
return (0);
}