aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2012-10-11 13:39:49 -0400
committerJeff Mahoney <jeffm@suse.com>2012-10-11 15:57:27 -0400
commitd3e67ae2f4c905012bf3aa02180653cb15f98606 (patch)
tree671a72076c84cce6bf4ea560a1f165b13d1267b7
parentf8b66d808413ca1e73ad7099988bab9fc221dcb3 (diff)
downloadreiserfsprogs-d3e67ae2f4c905012bf3aa02180653cb15f98606.tar.gz
reiserfsck: support `fsck -f -n`
Every other fsck util out there supports non-interactive forcing and this change brings reiserfsck into line. Signed-off-by: Roy Marples <roy@marples.name> Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Jeff Mahoney <jeffm@suse.com>
-rw-r--r--fsck/main.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/fsck/main.c b/fsck/main.c
index e4253af..31e97bf 100644
--- a/fsck/main.c
+++ b/fsck/main.c
@@ -421,8 +421,9 @@ void warn_what_will_be_done (char * file_name, struct fsck_data * data)
(data->log == stdout) ? "stdout" :
(data->log_file_name ? data->log_file_name : "fsck.run"));
- if (!(data->options & OPT_YES) && !user_confirmed (warn_to, "\nDo you want to "
- "run this program?[N/Yes] (note need to type Yes if you do):", "Yes\n"))
+ if (!(data->options & OPT_YES) && !(data->options & OPT_SILENT) &&
+ !user_confirmed (warn_to, "\nDo you want to run this program?[N/Yes] "
+ "(note need to type Yes if you do):", "Yes\n"))
exit (EXIT_USER);
}