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_ext2fs/utilities.c | |
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_ext2fs/utilities.c')
-rw-r--r-- | sbin/fsck_ext2fs/utilities.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/sbin/fsck_ext2fs/utilities.c b/sbin/fsck_ext2fs/utilities.c index 054e523724f..402d37b74c7 100644 --- a/sbin/fsck_ext2fs/utilities.c +++ b/sbin/fsck_ext2fs/utilities.c @@ -1,4 +1,4 @@ -/* $OpenBSD: utilities.c,v 1.14 2003/06/11 06:22:13 deraadt Exp $ */ +/* $OpenBSD: utilities.c,v 1.15 2006/03/30 01:16:30 deraadt Exp $ */ /* $NetBSD: utilities.c,v 1.6 2001/02/04 21:19:34 christos Exp $ */ /* @@ -92,10 +92,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)) return (0); |