Skip to contentSkip to conversation

reiserfsck: support `fsck -f -n`

PATCH New Roy Marples 1 participant 1 message Oct 11, 2012

lore
Share & tools
lore
#0 lore raw

PATCH 8/10 reiserfsck: support `fsck -f -n`

Every other fsck util out there supports non-interactive forcing and this change brings reiserfsck into line.

---
 fsck/main.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
fsck/main.c +3 -2
index e4253af..31e97bf 100644
@@ -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);
 }
 
Signature · 1 line
1.7.10.4