summaryrefslogtreecommitdiff
path: root/modutils/rmmod.c
diff options
context:
space:
mode:
authorEric Andersen2004-03-19 21:00:03 +0000
committerEric Andersen2004-03-19 21:00:03 +0000
commit1daa0c609712e25a3a4dcd002f066a13dd8fb7ba (patch)
treed208a343ac18fc2eaef1dd08698fd6a90490670e /modutils/rmmod.c
parent9e458f5b7a3a8c96dd801f8bdfcba5c8f67991ab (diff)
downloadbusybox-1daa0c609712e25a3a4dcd002f066a13dd8fb7ba.zip
busybox-1daa0c609712e25a3a4dcd002f066a13dd8fb7ba.tar.gz
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.
Diffstat (limited to 'modutils/rmmod.c')
-rw-r--r--modutils/rmmod.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/modutils/rmmod.c b/modutils/rmmod.c
index cc9742c..c839045 100644
--- a/modutils/rmmod.c
+++ b/modutils/rmmod.c
@@ -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 @@ extern int rmmod_main(int argc, char **argv)
/* 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 */