From 817f7cfc35a8694cdb08a158328976f31f11c2e8 Mon Sep 17 00:00:00 2001 From: "Michael I. Bushnell" Date: Fri, 26 Apr 1996 20:21:55 +0000 Subject: (reply): Set fix_denied anytime we return 0. --- ufs-fsck/utilities.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'ufs-fsck') 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; + } } } -- cgit v1.2.3