summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>1999-04-07 07:51:00 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>1999-04-07 07:51:00 +0000
commit74c3e5d75f74fdcd1e06eefef9c742ee4b21def1 (patch)
tree4978a1d4621c784be0ec9ba0eec57a991389dd45
parent64ecfb54d122a7455a27e1cb4635502dc4aa739b (diff)
o Be silent on fstab writing
o Change "Save changes" prompt to "Write new label" o call writelabel() with &label and then update *lp instead of updating *lp and then calling writelabel() with lp.
-rw-r--r--sbin/disklabel/editor.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/sbin/disklabel/editor.c b/sbin/disklabel/editor.c
index 55aab490b9c..ea992b5dae7 100644
--- a/sbin/disklabel/editor.c
+++ b/sbin/disklabel/editor.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: editor.c,v 1.60 1999/04/01 21:43:48 millert Exp $ */
+/* $OpenBSD: editor.c,v 1.61 1999/04/07 07:50:59 millert Exp $ */
/*
* Copyright (c) 1997-1999 Todd C. Miller <Todd.Miller@courtesan.com>
@@ -28,7 +28,7 @@
*/
#ifndef lint
-static char rcsid[] = "$OpenBSD: editor.c,v 1.60 1999/04/01 21:43:48 millert Exp $";
+static char rcsid[] = "$OpenBSD: editor.c,v 1.61 1999/04/07 07:50:59 millert Exp $";
#endif /* not lint */
#include <sys/types.h>
@@ -334,14 +334,16 @@ editor(lp, f, dev, fstabfile, whole_mode)
return(1);
}
do {
- arg = getstring("Save changes?",
- "Save changes you have made to the label?",
- "n");
+ arg = getstring("Write new label?",
+ "Write the modified label to disk?",
+ "y");
} while (arg && tolower(*arg) != 'y' && tolower(*arg) != 'n');
if (arg && tolower(*arg) == 'y') {
- *lp = label;
- if (writelabel(f, bootarea, lp) == 0)
+ if (writelabel(f, bootarea, &label) == 0) {
+ *lp = label;
return(0);
+ }
+ warnx("unable to write label");
}
return(1);
/* NOTREACHED */
@@ -2023,7 +2025,6 @@ mpsave(lp, mp, cdev, fstabfile)
j == 0 ? 1 : 2);
}
fclose(fp);
- printf("Wrote fstab entries to %s\n", fstabfile);
return(0);
}