diff options
author | Otto Moerbeek <otto@cvs.openbsd.org> | 2004-10-04 15:09:42 +0000 |
---|---|---|
committer | Otto Moerbeek <otto@cvs.openbsd.org> | 2004-10-04 15:09:42 +0000 |
commit | 416d5f696edf3ecbead6ce990141ef247020b889 (patch) | |
tree | c587f3f3842d87b5d08b17d22b6abf844bf175e5 /sbin/disklabel | |
parent | 5b10c8c3cd80c41906a20399e74c68d91cf6c11a (diff) |
Allow one more char for fstype, to avoid truncation of ISO9660 fstype.
spotted by and ok krw@
Diffstat (limited to 'sbin/disklabel')
-rw-r--r-- | sbin/disklabel/disklabel.c | 16 | ||||
-rw-r--r-- | sbin/disklabel/editor.c | 6 |
2 files changed, 11 insertions, 11 deletions
diff --git a/sbin/disklabel/disklabel.c b/sbin/disklabel/disklabel.c index c3bf4576506..4a828470534 100644 --- a/sbin/disklabel/disklabel.c +++ b/sbin/disklabel/disklabel.c @@ -1,4 +1,4 @@ -/* $OpenBSD: disklabel.c,v 1.92 2004/09/28 17:57:46 otto Exp $ */ +/* $OpenBSD: disklabel.c,v 1.93 2004/10/04 15:09:41 otto 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.92 2004/09/28 17:57:46 otto Exp $"; +static const char rcsid[] = "$OpenBSD: disklabel.c,v 1.93 2004/10/04 15:09:41 otto Exp $"; #endif /* not lint */ #include <sys/param.h> @@ -1014,24 +1014,24 @@ display_partition(FILE *f, struct disklabel *lp, char **mp, int i, unit == 'B' ? 0 : 1, p_size, unit, unit == 'B' ? 0 : 1, p_offset, unit); if ((unsigned) pp->p_fstype < FSMAXTYPES) - fprintf(f, "%6.6s", fstypenames[pp->p_fstype]); + fprintf(f, "%7.7s", fstypenames[pp->p_fstype]); else - fprintf(f, "%6d", pp->p_fstype); + fprintf(f, "%7d", pp->p_fstype); switch (pp->p_fstype) { case FS_UNUSED: /* XXX */ - fprintf(f, " %5u %5u %5.5s ", + fprintf(f, " %5u %5u %4.4s ", pp->p_fsize, pp->p_fsize * pp->p_frag, ""); break; case FS_BSDFFS: - fprintf(f, " %5u %5u %5hu ", + fprintf(f, " %5u %5u %4hu ", pp->p_fsize, pp->p_fsize * pp->p_frag, pp->p_cpg); break; default: - fprintf(f, "%20.20s", ""); + fprintf(f, "%19.19s", ""); break; } if (mp != NULL) { @@ -1099,7 +1099,7 @@ display(FILE *f, struct disklabel *lp, char unit) for (j = 0; j <= i; j++) fprintf(f, "%d ", lp->d_drivedata[j]); fprintf(f, "\n\n%hu partitions:\n", lp->d_npartitions); - fprintf(f, "# %13.13s %13.13s fstype [fsize bsize cpg]\n", + fprintf(f, "# %13.13s %13.13s fstype [fsize bsize cpg]\n", "size", "offset"); for (i = 0; i < lp->d_npartitions; i++) display_partition(f, lp, NULL, i, unit); diff --git a/sbin/disklabel/editor.c b/sbin/disklabel/editor.c index 4f4d791a3c2..83f8d689fa5 100644 --- a/sbin/disklabel/editor.c +++ b/sbin/disklabel/editor.c @@ -1,4 +1,4 @@ -/* $OpenBSD: editor.c,v 1.95 2004/09/28 17:57:46 otto Exp $ */ +/* $OpenBSD: editor.c,v 1.96 2004/10/04 15:09:41 otto 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.95 2004/09/28 17:57:46 otto Exp $"; +static char rcsid[] = "$OpenBSD: editor.c,v 1.96 2004/10/04 15:09:41 otto Exp $"; #endif /* not lint */ #include <sys/types.h> @@ -802,7 +802,7 @@ editor_display(struct disklabel *lp, char **mp, u_int32_t *freep, char unit) printf("free sectors: %u\n", *freep); printf("rpm: %hu\n", lp->d_rpm); printf("\n%hu partitions:\n", lp->d_npartitions); - printf("# %13.13s %13.13s fstype [fsize bsize cpg]\n", + printf("# %13.13s %13.13s fstype [fsize bsize cpg]\n", "size", "offset"); for (i = 0; i < lp->d_npartitions; i++) display_partition(stdout, lp, mp, i, unit); |