summaryrefslogtreecommitdiff
path: root/sbin/disklabel/editor.c
diff options
context:
space:
mode:
authorKenneth R Westerback <krw@cvs.openbsd.org>2009-03-28 16:27:25 +0000
committerKenneth R Westerback <krw@cvs.openbsd.org>2009-03-28 16:27:25 +0000
commit582b4c19db095f3d6bedf1c879707d8499d2b661 (patch)
tree2b22d5d14bb444e2a044767c8cc81919bf8fbe17 /sbin/disklabel/editor.c
parent3095199658e2d3029559180a61e3418d506d1f96 (diff)
Move some output under the control of the '-v' flag. In particular only
display the partition info by default as is done in the E(ditor). The physical info is now only displayed if '-v' is specified. ok deraadt@
Diffstat (limited to 'sbin/disklabel/editor.c')
-rw-r--r--sbin/disklabel/editor.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/sbin/disklabel/editor.c b/sbin/disklabel/editor.c
index eb2a37ec8c4..4b7fa017bb8 100644
--- a/sbin/disklabel/editor.c
+++ b/sbin/disklabel/editor.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: editor.c,v 1.179 2009/03/28 16:18:50 krw Exp $ */
+/* $OpenBSD: editor.c,v 1.180 2009/03/28 16:27:24 krw Exp $ */
/*
* Copyright (c) 1997-2000 Todd C. Miller <Todd.Miller@courtesan.com>
@@ -17,7 +17,7 @@
*/
#ifndef lint
-static char rcsid[] = "$OpenBSD: editor.c,v 1.179 2009/03/28 16:18:50 krw Exp $";
+static char rcsid[] = "$OpenBSD: editor.c,v 1.180 2009/03/28 16:27:24 krw Exp $";
#endif /* not lint */
#include <sys/types.h>
@@ -288,7 +288,8 @@ editor(struct disklabel *lp, int f, char *dev, char *fstabfile, int aflag)
break;
case 'l':
- display(stdout, &label, mountpoints, arg ? *arg : 0, 0);
+ display(stdout, &label, mountpoints, arg ? *arg : 0,
+ SHOW_PHYSINFO);
break;
case 'M': {
@@ -372,7 +373,8 @@ editor(struct disklabel *lp, int f, char *dev, char *fstabfile, int aflag)
if ((fp = fopen(arg, "w")) == NULL) {
warn("cannot open %s", arg);
} else {
- display(fp, &label, NULL, 0, 1) ;
+ display(fp, &label, NULL, 0, SHOW_PHYSINFO |
+ SHOW_PARTINFO);
(void)fclose(fp);
}
break;