summaryrefslogtreecommitdiff
path: root/sbin/disklabel
diff options
context:
space:
mode:
authorKenneth R Westerback <krw@cvs.openbsd.org>2009-02-15 21:07:01 +0000
committerKenneth R Westerback <krw@cvs.openbsd.org>2009-02-15 21:07:01 +0000
commit3148243edf22adf790721842f1ea1a518e9f6667 (patch)
treef99da5c5c02e0daa32be921c38792369e9040f70 /sbin/disklabel
parent00901addd37eaf1a6a9be2d0f271c8b02cf93e47 (diff)
Don't display, or save via the editor 's' command, the fsize and
bsize fields for UNUSED partitions. '-R' already skipped processing these fields for such partitions. Eliminates an XXX. ok deraadt, "makes sense" miod@
Diffstat (limited to 'sbin/disklabel')
-rw-r--r--sbin/disklabel/disklabel.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/sbin/disklabel/disklabel.c b/sbin/disklabel/disklabel.c
index 4c601206d5e..500f42c7f15 100644
--- a/sbin/disklabel/disklabel.c
+++ b/sbin/disklabel/disklabel.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: disklabel.c,v 1.137 2009/01/11 19:44:57 miod Exp $ */
+/* $OpenBSD: disklabel.c,v 1.138 2009/02/15 21:07:00 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.137 2009/01/11 19:44:57 miod Exp $";
+static const char rcsid[] = "$OpenBSD: disklabel.c,v 1.138 2009/02/15 21:07:00 krw Exp $";
#endif /* not lint */
#include <sys/param.h>
@@ -986,23 +986,18 @@ display_partition(FILE *f, struct disklabel *lp, char **mp, int i,
fprintf(f, "%7.7s", fstypenames[pp->p_fstype]);
else
fprintf(f, "%7d", pp->p_fstype);
- switch (pp->p_fstype) {
-
- case FS_UNUSED: /* XXX */
- fprintf(f, " %5u %5u %4.4s ",
- fsize, fsize * frag, "");
- break;
+ switch (pp->p_fstype) {
case FS_BSDFFS:
fprintf(f, " %5u %5u %4hu ",
fsize, fsize * frag,
pp->p_cpg);
break;
-
default:
fprintf(f, "%19.19s", "");
break;
}
+
if (mp != NULL) {
if (mp[i] != NULL)
fprintf(f, "# %s", mp[i]);