diff options
Diffstat (limited to 'sbin')
-rw-r--r-- | sbin/disklabel/disklabel.c | 3 | ||||
-rw-r--r-- | sbin/disklabel/editor.c | 15 | ||||
-rw-r--r-- | sbin/disklabel/extern.h | 3 |
3 files changed, 12 insertions, 9 deletions
diff --git a/sbin/disklabel/disklabel.c b/sbin/disklabel/disklabel.c index 55314d46292..3537ec78b35 100644 --- a/sbin/disklabel/disklabel.c +++ b/sbin/disklabel/disklabel.c @@ -1,4 +1,4 @@ -/* $OpenBSD: disklabel.c,v 1.224 2016/09/04 11:35:30 bluhm Exp $ */ +/* $OpenBSD: disklabel.c,v 1.225 2017/03/04 07:26:42 otto Exp $ */ /* * Copyright (c) 1987, 1993 @@ -85,6 +85,7 @@ int dflag; int tflag; int uidflag; int verbose; +int quiet; int donothing; char print_unit; diff --git a/sbin/disklabel/editor.c b/sbin/disklabel/editor.c index c5a8805466c..b8aa4a0b36b 100644 --- a/sbin/disklabel/editor.c +++ b/sbin/disklabel/editor.c @@ -1,4 +1,4 @@ -/* $OpenBSD: editor.c,v 1.304 2016/10/06 13:02:31 otto Exp $ */ +/* $OpenBSD: editor.c,v 1.305 2017/03/04 07:26:42 otto Exp $ */ /* * Copyright (c) 1997-2000 Todd C. Miller <Todd.Miller@courtesan.com> @@ -216,7 +216,7 @@ editor(int f) } #ifdef SUN_CYLCHECK - if ((newlab.d_flags & D_VENDOR) && !aflag) { + if ((newlab.d_flags & D_VENDOR) && !quiet) { puts("This platform requires that partition offsets/sizes " "be on cylinder boundaries.\n" "Partition offsets/sizes will be rounded to the " @@ -266,9 +266,10 @@ editor(int f) case 'A': if (ioctl(f, DIOCGPDINFO, &newlab) == 0) { - ++aflag; + aflag = 1; + ++quiet; editor_allocspace(&newlab); - --aflag; + --quiet; } else newlab = lastlabel; break; @@ -1266,7 +1267,7 @@ getuint64(struct disklabel *lp, char *prompt, char *helpstring, if ((cyls * lp->d_secpercyl) - offset > maxval) cyls--; rval = (cyls * lp->d_secpercyl) - offset; - if (!aflag) + if (!quiet) printf("Rounding size to cylinder (%d sectors)" ": %llu\n", lp->d_secpercyl, rval); } @@ -2107,10 +2108,10 @@ align: if (adj > 0) DL_SETPSIZE(pp, DL_GETPSIZE(pp) - adj); - if (orig_offset != DL_GETPOFFSET(pp) && !aflag) + if (orig_offset != DL_GETPOFFSET(pp) && !quiet) printf("Rounding offset to bsize (%llu sectors): %llu\n", bsize, DL_GETPOFFSET(pp)); - if (orig_size != DL_GETPSIZE(pp) && !aflag) + if (orig_size != DL_GETPSIZE(pp) && !quiet) printf("Rounding size to bsize (%llu sectors): %llu\n", bsize, DL_GETPSIZE(pp)); #endif diff --git a/sbin/disklabel/extern.h b/sbin/disklabel/extern.h index 1a81342d451..7ef49af9596 100644 --- a/sbin/disklabel/extern.h +++ b/sbin/disklabel/extern.h @@ -1,4 +1,4 @@ -/* $OpenBSD: extern.h,v 1.28 2016/06/19 13:42:56 tb Exp $ */ +/* $OpenBSD: extern.h,v 1.29 2017/03/04 07:26:42 otto Exp $ */ /* * Copyright (c) 2003 Theo de Raadt <deraadt@openbsd.org> @@ -43,5 +43,6 @@ extern char *mountpoints[MAXPARTITIONS]; extern int aflag, dflag, uidflag; extern int donothing; extern int verbose; +extern int quiet; extern char print_unit; extern struct disklabel lab; |