diff options
author | 2006-03-30 01:16:30 +0000 | |
---|---|---|
committer | 2006-03-30 01:16:30 +0000 | |
commit | daaa95b672746160a53ad8346d3ea085fc48b9cd (patch) | |
tree | 5e967d834b7c3cd3a0fc5d08eb9d334727a145e1 /sbin/fsck_ext2fs/utilities.c | |
parent | Use sysctl to get information about encap routes (aka ipsec). Now (diff) | |
download | wireguard-openbsd-daaa95b672746160a53ad8346d3ea085fc48b9cd.tar.xz wireguard-openbsd-daaa95b672746160a53ad8346d3ea085fc48b9cd.zip |
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); |