summaryrefslogtreecommitdiff
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
commit817f7cfc35a8694cdb08a158328976f31f11c2e8 (patch)
tree73ac39683ba7d1772d8155473a24a8b984177cd9
parent7d3c115aa9014ee7e9a614ded5c7f015567ccb5a (diff)
(reply): Set fix_denied anytime we return 0.
-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;
+ }
}
}