summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Andersen2001-03-19 18:54:38 +0000
committerEric Andersen2001-03-19 18:54:38 +0000
commit16f7015722fe62e9b89cad24435ed285f7d71cd9 (patch)
tree06468b14ec0078ca67035ed38f67d2dea5719eb1
parent7c25441792a0685a1eb27c6563ed293e505f5b2c (diff)
downloadbusybox-16f7015722fe62e9b89cad24435ed285f7d71cd9.zip
busybox-16f7015722fe62e9b89cad24435ed285f7d71cd9.tar.gz
Patch from Vladimir to force interactiveFlag=FALSE when forceFlag=TRUE
-rw-r--r--coreutils/rm.c8
-rw-r--r--rm.c8
2 files changed, 10 insertions, 6 deletions
diff --git a/coreutils/rm.c b/coreutils/rm.c
index 96808ae..013f3ee 100644
--- a/coreutils/rm.c
+++ b/coreutils/rm.c
@@ -102,9 +102,6 @@ extern int rm_main(int argc, char **argv)
break;
case 'f':
forceFlag = TRUE;
-#ifdef BB_FEATURE_RM_INTERACTIVE
- interactiveFlag = FALSE;
-#endif
break;
case 'i':
#ifdef BB_FEATURE_RM_INTERACTIVE
@@ -122,6 +119,11 @@ extern int rm_main(int argc, char **argv)
if ((argc-optind) < 1 && forceFlag == FALSE) {
show_usage();
}
+#ifdef BB_FEATURE_RM_INTERACTIVE
+ if (forceFlag == TRUE)
+ interactiveFlag = FALSE;
+#endif
+
while (optind < argc) {
srcName = argv[optind];
diff --git a/rm.c b/rm.c
index 96808ae..013f3ee 100644
--- a/rm.c
+++ b/rm.c
@@ -102,9 +102,6 @@ extern int rm_main(int argc, char **argv)
break;
case 'f':
forceFlag = TRUE;
-#ifdef BB_FEATURE_RM_INTERACTIVE
- interactiveFlag = FALSE;
-#endif
break;
case 'i':
#ifdef BB_FEATURE_RM_INTERACTIVE
@@ -122,6 +119,11 @@ extern int rm_main(int argc, char **argv)
if ((argc-optind) < 1 && forceFlag == FALSE) {
show_usage();
}
+#ifdef BB_FEATURE_RM_INTERACTIVE
+ if (forceFlag == TRUE)
+ interactiveFlag = FALSE;
+#endif
+
while (optind < argc) {
srcName = argv[optind];