diff options
author | 2009-03-28 16:27:24 +0000 | |
---|---|---|
committer | 2009-03-28 16:27:24 +0000 | |
commit | e303d4a0e5af6e94c3c30a49468ec557dea192f9 (patch) | |
tree | 60296574178c226fb6f8a57da17a69897d7606a5 /sbin/disklabel/editor.c | |
parent | Add 'U' command to E(ditor). It reverts label to state it was in (diff) | |
download | wireguard-openbsd-e303d4a0e5af6e94c3c30a49468ec557dea192f9.tar.xz wireguard-openbsd-e303d4a0e5af6e94c3c30a49468ec557dea192f9.zip |
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.c | 10 |
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; |