aboutsummaryrefslogtreecommitdiff
path: root/modutils
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2017-01-08 08:56:43 +0000
committerRon Yorston <rmy@pobox.com>2017-01-08 08:56:43 +0000
commit3ef86d069577b8a44ebe3aa890c6e97ea31d0d56 (patch)
tree064587c9b2080dba963bf8d93861b8019cb306ed /modutils
parentc66975af0b5335b9cdd156206767756237bd814b (diff)
parent86584e134eec1a81298149f8c04c77727f6dccb9 (diff)
downloadbusybox-w32-3ef86d069577b8a44ebe3aa890c6e97ea31d0d56.tar.gz
busybox-w32-3ef86d069577b8a44ebe3aa890c6e97ea31d0d56.tar.bz2
busybox-w32-3ef86d069577b8a44ebe3aa890c6e97ea31d0d56.zip
Merge branch 'busybox' into merge
Diffstat (limited to 'modutils')
-rw-r--r--modutils/modprobe-small.c4
-rw-r--r--modutils/modutils.c16
2 files changed, 8 insertions, 12 deletions
diff --git a/modutils/modprobe-small.c b/modutils/modprobe-small.c
index 652ff4dfa..0fc9ea454 100644
--- a/modutils/modprobe-small.c
+++ b/modutils/modprobe-small.c
@@ -39,8 +39,8 @@
39#include <fnmatch.h> 39#include <fnmatch.h>
40#include <sys/syscall.h> 40#include <sys/syscall.h>
41 41
42extern int init_module(void *module, unsigned long len, const char *options); 42#define init_module(mod, len, opts) syscall(__NR_init_module, mod, len, opts)
43extern int delete_module(const char *module, unsigned flags); 43#define delete_module(mod, flags) syscall(__NR_delete_module, mod, flags)
44#ifdef __NR_finit_module 44#ifdef __NR_finit_module
45# define finit_module(fd, uargs, flags) syscall(__NR_finit_module, fd, uargs, flags) 45# define finit_module(fd, uargs, flags) syscall(__NR_finit_module, fd, uargs, flags)
46#endif 46#endif
diff --git a/modutils/modutils.c b/modutils/modutils.c
index d36caaf68..4204f06fe 100644
--- a/modutils/modutils.c
+++ b/modutils/modutils.c
@@ -7,17 +7,13 @@
7 */ 7 */
8#include "modutils.h" 8#include "modutils.h"
9 9
10#ifdef __UCLIBC__ 10#include <sys/syscall.h>
11extern int init_module(void *module, unsigned long len, const char *options); 11
12extern int delete_module(const char *module, unsigned int flags); 12#define init_module(mod, len, opts) syscall(__NR_init_module, mod, len, opts)
13#else 13#if defined(__NR_finit_module)
14# include <sys/syscall.h> 14# define finit_module(fd, uargs, flags) syscall(__NR_finit_module, fd, uargs, flags)
15# define init_module(mod, len, opts) syscall(__NR_init_module, mod, len, opts)
16# if defined(__NR_finit_module)
17# define finit_module(fd, uargs, flags) syscall(__NR_finit_module, fd, uargs, flags)
18# endif
19# define delete_module(mod, flags) syscall(__NR_delete_module, mod, flags)
20#endif 15#endif
16#define delete_module(mod, flags) syscall(__NR_delete_module, mod, flags)
21 17
22static module_entry *helper_get_module(module_db *db, const char *module, int create) 18static module_entry *helper_get_module(module_db *db, const char *module, int create)
23{ 19{