diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2006-03-30 01:16:32 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2006-03-30 01:16:32 +0000 |
commit | 061e74f131d19f4af4f70f4ea88c02a97b0c505b (patch) | |
tree | 122d89f9f395abf338b4ad0f47bb4848779dcb99 /sbin/fsck_ffs | |
parent | c865357eff6a85799d8ed04e2da7d69ca3bdea79 (diff) |
when asking y or n, accept "F" which forces yes from the on. i have
wished for this for 10+ year, but always forgotten to make the change
after cleaning up a nasty file system; ok pedro millert
Diffstat (limited to 'sbin/fsck_ffs')
-rw-r--r-- | sbin/fsck_ffs/utilities.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/sbin/fsck_ffs/utilities.c b/sbin/fsck_ffs/utilities.c index b383edc0afc..65e20ee6295 100644 --- a/sbin/fsck_ffs/utilities.c +++ b/sbin/fsck_ffs/utilities.c @@ -1,4 +1,4 @@ -/* $OpenBSD: utilities.c,v 1.24 2006/03/22 20:24:32 deraadt Exp $ */ +/* $OpenBSD: utilities.c,v 1.25 2006/03/30 01:16:31 deraadt Exp $ */ /* $NetBSD: utilities.c,v 1.18 1996/09/27 22:45:20 christos Exp $ */ /* @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)utilities.c 8.1 (Berkeley) 6/5/93"; #else -static const char rcsid[] = "$OpenBSD: utilities.c,v 1.24 2006/03/22 20:24:32 deraadt Exp $"; +static const char rcsid[] = "$OpenBSD: utilities.c,v 1.25 2006/03/30 01:16:31 deraadt Exp $"; #endif #endif /* not lint */ @@ -102,10 +102,14 @@ reply(char *question) printf("%s? yes\n\n", question); return (1); } - do { - printf("%s? [yn] ", question); + do { + printf("%s? [Fyn?] ", question); (void) fflush(stdout); c = getc(stdin); + if (c == 'F') { + yflag = 1; + return (1); + } while (c != '\n' && getc(stdin) != '\n') { if (feof(stdin)) { resolved = 0; |