summaryrefslogtreecommitdiff
path: root/ufs-fsck
diff options
context:
space:
mode:
authorMichael I. Bushnell <mib@gnu.org>1996-04-26 20:21:55 +0000
committerMichael I. Bushnell <mib@gnu.org>1996-04-26 20:21:55 +0000
commitecb321ae72c4e515a5e7b978e343b5b39ae0b03c (patch)
tree2e5dca4cccff257e60396c9ceb41e53b7c2dbb75 /ufs-fsck
parentbed56e5a62ff6f9822532a4aff99550d42a4f303 (diff)
(reply): Set fix_denied anytime we return 0.
Diffstat (limited to 'ufs-fsck')
-rw-r--r--ufs-fsck/utilities.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/ufs-fsck/utilities.c b/ufs-fsck/utilities.c
index 32ce52d7..e83cb2f5 100644
--- a/ufs-fsck/utilities.c
+++ b/ufs-fsck/utilities.c
@@ -1,5 +1,5 @@
/* Miscellaneous functions for fsck
- Copyright (C) 1994, 1995 Free Software Foundation, Inc.
+ Copyright (C) 1994, 1995, 1996 Free Software Foundation, Inc.
Written by Michael I. Bushnell.
This file is part of the GNU Hurd.
@@ -235,6 +235,7 @@ reply (char *question)
putchar ('\n');
if (!persevere && (nowrite || writefd < 0))
{
+ fix_denied = 1;
printf ("%s? no\n\n", question);
return 0;
}
@@ -252,11 +253,20 @@ reply (char *question)
c = getchar ();
while (c != '\n' && getchar () != '\n')
if (feof (stdin))
- return 0;
+ {
+ fix_denied = 1;
+ return 0;
+ }
}
while (c != 'y' && c != 'Y' && c != 'n' && c != 'N');
putchar ('\n');
- return c == 'y' || c == 'Y';
+ if (c == 'y' || c == 'Y')
+ return 1;
+ else
+ {
+ fix_denied = 1;
+ return 0;
+ }
}
}