[prev in list] [next in list] [prev in thread] [next in thread]
List: busybox
Subject: [BusyBox] strange rmmod behaviour...
From: Arne Bernin <arne () matrix ! loopback ! org>
Date: 2000-07-27 15:30:02
[Download RAW message or body]
Hi,
busybox rmmod returns TRUE, even if unloading of the modules failed
(while using something like "busybox rmmod isdn"). The error messages are
printed, the returncode is not changed. I attached a very small patch to fix
this. I think if i use something like "rmmod isdn epic100 8390" and removing
of one of the three failed, the program should return false. is that right,
or just my opinion...
-- arne
-------------------------------------------------------------------
Arne Bernin Netropol Digitale Systeme
Lagerstrasse 30a
Tel: +49 4043250000 D-20357 Hamburg/Germany
Fax: +49 40 43189490 ab@Netropol.de
["rmmod.diff" (text/plain)]
diff -urN busybox.orig/rmmod.c busybox/rmmod.c
--- busybox.orig/rmmod.c Mon Jun 19 19:25:40 2000
+++ busybox/rmmod.c Thu Jul 27 17:07:35 2000
@@ -48,6 +48,8 @@
extern int rmmod_main(int argc, char **argv)
{
+ int returncode = TRUE;
+
if (argc <= 1) {
usage(rmmod_usage);
}
@@ -72,8 +74,9 @@
while (argc-- > 0) {
if (delete_module(*argv) < 0) {
perror(*argv);
+ returncode = FALSE ;
}
argv++;
}
- return(TRUE);
+ return(returncode);
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic