1 diff -ur busybox-0.60.5/Config.h busybox-0.60.5-ng/Config.h
2 --- busybox-0.60.5/Config.h 2003-07-01 02:56:02.000000000 +0200
3 +++ busybox-0.60.5-ng/Config.h 2003-07-01 02:55:01.000000000 +0200
12 diff -ur busybox-0.60.5/applets.h busybox-0.60.5-ng/applets.h
13 --- busybox-0.60.5/applets.h 2003-07-01 02:56:02.000000000 +0200
14 +++ busybox-0.60.5-ng/applets.h 2003-07-01 02:54:47.000000000 +0200
17 APPLET(insmod, insmod_main, _BB_DIR_SBIN)
20 + APPLET(insmod_ng, insmod_ng_main, _BB_DIR_SBIN)
23 APPLET(kill, kill_main, _BB_DIR_BIN)
25 diff -ur busybox-0.60.5/insmod.c busybox-0.60.5-ng/insmod.c
26 --- busybox-0.60.5/insmod.c 2002-09-16 07:30:10.000000000 +0200
27 +++ busybox-0.60.5-ng/insmod.c 2003-07-01 02:37:14.000000000 +0200
28 @@ -3567,6 +3567,14 @@
30 printf("Using %s\n", m_filename);
33 + if (create_module(NULL, 0) < 0 && errno == ENOSYS) {
35 + argv[optind] = m_filename;
36 + return insmod_ng_main(argc - optind, argv + optind);
40 if ((f = obj_load(fp, LOADBITS)) == NULL)
41 perror_msg_and_die("Could not load the module");
43 Only in busybox-0.60.5-ng: insmod.o
44 diff -ur busybox-0.60.5/insmod_ng.c busybox-0.60.5-ng/insmod_ng.c
45 --- busybox-0.60.5/insmod_ng.c 2003-07-01 02:56:12.000000000 +0200
46 +++ busybox-0.60.5-ng/insmod_ng.c 2003-07-01 02:54:18.000000000 +0200
48 +/* vi: set sw=4 ts=4: */
50 + * insmod for 2.5 kernels implementation for busybox
51 + * busybox version by Michal Moskal <malekith@pld-linux.org>
53 + * Copyright (C) 2001 Rusty Russell.
54 + * Copyright (C) 2002 Rusty Russell, IBM Corporation.
56 + * This program is free software; you can redistribute it and/or modify
57 + * it under the terms of the GNU General Public License as published by
58 + * the Free Software Foundation; either version 2 of the License, or
59 + * (at your option) any later version.
61 + * This program is distributed in the hope that it will be useful,
62 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
63 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
64 + * GNU General Public License for more details.
66 + * You should have received a copy of the GNU General Public License
67 + * along with this program; if not, write to the Free Software
68 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
75 +#include <sys/mman.h>
76 +#include <sys/types.h>
77 +#include <sys/stat.h>
80 +#include <asm/unistd.h>
81 +#include <sys/syscall.h>
85 +#define __NR_init_module_25 __NR_init_module
86 +static _syscall3(long, init_module_25, void *, map, size_t, len, char *, options)
88 +/* We use error numbers in a loose translation... */
89 +static const char *moderror(int err)
93 + return "Invalid module format";
95 + return "Unknown symbol in module";
97 + return "Module has wrong symbol version";
99 + return "Invalid parameters";
101 + return strerror(err);
105 +extern int insmod_ng_main(int argc, char **argv)
113 + char *filename, *options = xstrdup("");
115 + filename = argv[1];
119 + /* Rest is options */
120 + for (i = 2; i < argc; i++) {
121 + options = xrealloc(options,
122 + strlen(options) + 2 + strlen(argv[i]) + 2);
123 + /* Spaces handled by "" pairs, but no way of escaping quotes */
124 + if (strchr(argv[i], ' ')) {
125 + strcat(options, "\"");
126 + strcat(options, argv[i]);
127 + strcat(options, "\"");
129 + strcat(options, argv[i]);
131 + strcat(options, " ");
134 + if ((fd = open(filename, O_RDONLY, 0)) < 0)
135 + perror_msg_and_die("cannot open module `%s'", filename);
139 + map = mmap(NULL, len, PROT_READ, MAP_SHARED, fd, 0);
140 + if (map == MAP_FAILED)
141 + perror_msg_and_die("cannot mmap `%s'", filename);
143 + ret = init_module_25(map, len, options);
145 + perror_msg_and_die("cannot insert `%s': %s (%li)",
146 + filename, moderror(errno), ret);
153 +c-file-style: "linux"
158 diff -ur busybox-0.60.5/usage.h busybox-0.60.5-ng/usage.h
159 --- busybox-0.60.5/usage.h 2003-07-01 02:56:02.000000000 +0200
160 +++ busybox-0.60.5-ng/usage.h 2003-07-01 02:55:44.000000000 +0200
162 "\t-L\tLock to prevent simultaneous loads of a module\n" \
163 "\t-x\tdo not export externs"
165 +#define insmod_ng_trivial_usage \
166 + "MODULE [symbol=value]..."
167 +#define insmod_ng_full_usage \
168 + "Loads the specified kernel modules into the kernel."
170 #define kill_trivial_usage \
171 "[-signal] process-id [process-id ...]"
172 #define kill_full_usage \