|
# --- ROCK-COPYRIGHT-NOTE-BEGIN ---
|
|
#
|
|
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
|
|
# Please add additional copyright information _after_ the line containing
|
|
# the ROCK-COPYRIGHT-NOTE-END tag. Otherwise it might get removed by
|
|
# the ./scripts/Create-CopyPatch script. Do not edit this copyright text!
|
|
#
|
|
# ROCK Linux: rock-src/package/base/dietlibc/pkg_patch/pkg_module-init-tools.patch
|
|
# ROCK Linux is Copyright (C) 1998 - 2003 Clifford Wolf
|
|
#
|
|
# This program is free software; you can redistribute it and/or modify
|
|
# it under the terms of the GNU General Public License as published by
|
|
# the Free Software Foundation; either version 2 of the License, or
|
|
# (at your option) any later version. A copy of the GNU General Public
|
|
# License can be found at Documentation/COPYING.
|
|
#
|
|
# Many people helped and are helping developing ROCK Linux. Please
|
|
# have a look at http://www.rocklinux.org/ and the Documentation/TEAM
|
|
# file for details.
|
|
#
|
|
# --- ROCK-COPYRIGHT-NOTE-END ---
|
|
|
|
--- ./insmod.c.orig 2003-04-06 12:21:21.000000000 +0200
|
|
+++ ./insmod.c 2003-04-06 12:21:23.000000000 +0200
|
|
@@ -53,6 +53,8 @@
|
|
}
|
|
}
|
|
|
|
+static inline _syscall3(long int,init_module,void*,map,unsigned long,len,char*,options);
|
|
+
|
|
int main(int argc, char *argv[])
|
|
{
|
|
unsigned int i;
|
|
@@ -108,7 +110,7 @@
|
|
exit(1);
|
|
}
|
|
|
|
- ret = syscall(__NR_init_module, map, len, options);
|
|
+ ret = init_module(map, len, options);
|
|
if (ret != 0) {
|
|
fprintf(stderr, "Error inserting '%s': %li %s\n",
|
|
filename, ret, moderror(errno));
|
|
--- ./rmmod.c.orig 2003-04-06 12:26:27.000000000 +0200
|
|
+++ ./rmmod.c 2003-04-06 12:25:30.000000000 +0200
|
|
@@ -168,6 +168,8 @@
|
|
modname[i] = '\0';
|
|
}
|
|
|
|
+static inline _syscall2(long int,delete_module,char*,name,int,flags);
|
|
+
|
|
static void rmmod(int log, int verbose, const char *path, int flags)
|
|
{
|
|
long ret;
|
|
@@ -184,7 +186,7 @@
|
|
(flags & O_NONBLOCK) ? "no" : "yes",
|
|
(flags & O_TRUNC) ? " force" : "");
|
|
|
|
- ret = syscall(__NR_delete_module, name, flags);
|
|
+ ret = delete_module(name, flags);
|
|
if (ret != 0)
|
|
error(log, "Removing '%s': %s\n", name, strerror(errno));
|
|
}
|
|
--- ./modprobe.c.orig 2003-04-06 12:24:37.000000000 +0200
|
|
+++ ./modprobe.c 2003-04-06 12:25:46.000000000 +0200
|
|
@@ -672,6 +672,8 @@
|
|
}
|
|
}
|
|
|
|
+static inline _syscall3(long int,init_module,void*,map,unsigned long,len,char*,options);
|
|
+
|
|
/* Actually do the insert. Frees second arg. */
|
|
static void insmod(struct list_head *list,
|
|
char *optstring,
|
|
@@ -754,7 +756,7 @@
|
|
if (dry_run)
|
|
goto out;
|
|
|
|
- ret = syscall(__NR_init_module, map, st.st_size, optstring);
|
|
+ ret = init_module(map, st.st_size, optstring);
|
|
if (ret != 0) {
|
|
if (dont_fail)
|
|
fatal("Error inserting %s (%s): %s\n",
|
|
@@ -771,6 +773,8 @@
|
|
free(optstring);
|
|
}
|
|
|
|
+static inline _syscall2(long int,delete_module,char*,name,int,flags);
|
|
+
|
|
/* Do recursive removal. */
|
|
static void rmmod(struct list_head *list,
|
|
int dont_fail,
|
|
@@ -810,7 +814,7 @@
|
|
if (dry_run)
|
|
goto remove_rest;
|
|
|
|
- if (syscall(__NR_delete_module, mod->modname, O_EXCL) != 0) {
|
|
+ if (delete_module(mod->modname, O_EXCL) != 0) {
|
|
if (dont_fail)
|
|
fatal("Error removing %s (%s): %s\n",
|
|
mod->modname, mod->filename,
|