[BusyBox] Interactive rm patch

Vladimir N. Oleynik dzo at simtreas.ru
Wed Apr 11 17:01:13 UTC 2001


> On Sat Mar 17, 2001 at 05:17:48PM +0300, Vladimir N. Oleynik wrote:
> > I found small error in rm.c
> >
> > Problem:
> > % rm -if *.o
> > Ok
> > % rm -fi *.o
> > remove bla-bla.o ?
> >
> > This also must run without asks.
> >
> >
> > Patch (not addition code, only move):

>> Date: Sat, 17 Mar 2001 17:23:02 +0300
>> "Vladimir N. Oleynik" wrote:

>> Oops. Please ignore this!!!
>> I mix up.

Erik Andersen wrote:

> Ahh, ok I see.  Applied, and I made rm use getopt while I was there.

Please restore my fault.
Hurry, hurry...


--w
vodz
-------------- next part --------------
diff -ru busybox.orig/rm.c busybox/rm.c
--- busybox.orig/rm.c	Mon Mar 19 22:40:43 2001
+++ busybox/rm.c	Wed Apr 11 20:53:20 2001
@@ -101,10 +101,15 @@
 				break;
 			case 'f':
 				forceFlag = TRUE;
+#ifdef BB_FEATURE_RM_INTERACTIVE
+
+				interactiveFlag = FALSE;
+#endif
 				break;
 #ifdef BB_FEATURE_RM_INTERACTIVE
 			case 'i':
 				interactiveFlag = TRUE;
+				forceFlag = FALSE;
 #endif
 				break;
 			default:
@@ -115,11 +120,6 @@
 	if (argc == optind && forceFlag == FALSE) {
 		show_usage();
 	}
-#ifdef BB_FEATURE_RM_INTERACTIVE
-	if (forceFlag == TRUE)
-		interactiveFlag = FALSE;
-#endif
-
 
 	while (optind < argc) {
 		srcName = argv[optind];


More information about the busybox mailing list