[BusyBox-cvs] busybox/modutils rmmod.c,1.27,1.28

Erik Andersen andersen at busybox.net
Fri Mar 19 21:00:05 UTC 2004


Update of /var/cvs/busybox/modutils
In directory nail:/tmp/cvs-serv31483/modutils

Modified Files:
	rmmod.c 
Log Message:
As noted in a patch from Kendrick Hamilton, rmmod was only
half way converted, and still used the old delete_module(),
call rather than a syscall, in one spot.


Index: rmmod.c
===================================================================
RCS file: /var/cvs/busybox/modutils/rmmod.c,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -d -r1.27 -r1.28
--- a/rmmod.c	15 Mar 2004 08:28:47 -0000	1.27
+++ b/rmmod.c	19 Mar 2004 21:00:03 -0000	1.28
@@ -29,9 +29,6 @@
 #include <sys/syscall.h>
 #include "busybox.h"
 
-extern int delete_module(const char * name);
-
-
 extern int rmmod_main(int argc, char **argv)
 {
 	int n, ret = EXIT_SUCCESS;
@@ -55,7 +52,7 @@
 				/* until the number of modules does not change */
 				buf = xmalloc(bufsize = 256);
 				while (nmod != pnmod) {
-					if (delete_module(NULL))
+					if (syscall(__NR_delete_module, NULL, flags) < 0)
 						bb_perror_msg_and_die("rmmod");
 					pnmod = nmod;
 					/* 1 == QM_MODULES */




More information about the busybox-cvs mailing list