aboutsummaryrefslogtreecommitdiff
path: root/modutils
diff options
context:
space:
mode:
Diffstat (limited to 'modutils')
-rw-r--r--modutils/Config.in10
-rw-r--r--modutils/Makefile2
-rw-r--r--modutils/Makefile.in2
-rw-r--r--modutils/insmod.c67
-rw-r--r--modutils/lsmod.c2
-rw-r--r--modutils/rmmod.c6
6 files changed, 44 insertions, 45 deletions
diff --git a/modutils/Config.in b/modutils/Config.in
index d9f76d1b4..faccee88f 100644
--- a/modutils/Config.in
+++ b/modutils/Config.in
@@ -45,9 +45,9 @@ config CONFIG_FEATURE_INSMOD_KSYMOOPS_SYMBOLS
45 default n 45 default n
46 depends on CONFIG_INSMOD && ( CONFIG_FEATURE_2_2_MODULES || CONFIG_FEATURE_2_4_MODULES ) 46 depends on CONFIG_INSMOD && ( CONFIG_FEATURE_2_2_MODULES || CONFIG_FEATURE_2_4_MODULES )
47 help 47 help
48 By adding module symbols to the kernel symbol table, Oops messages 48 By adding module symbols to the kernel symbol table, Oops messages
49 occuring within kernel modules can be properly debugged. By enabling 49 occuring within kernel modules can be properly debugged. By enabling
50 this feature, module symbols will always be added to the kernel symbol 50 this feature, module symbols will always be added to the kernel symbol
51 table for properly debugging support. If you are not interested in 51 table for properly debugging support. If you are not interested in
52 Oops messages from kernel modules, say N. 52 Oops messages from kernel modules, say N.
53 53
@@ -62,7 +62,7 @@ config CONFIG_FEATURE_INSMOD_LOADINKMEM
62 being loaded into memory. 62 being loaded into memory.
63 63
64config CONFIG_FEATURE_INSMOD_LOAD_MAP 64config CONFIG_FEATURE_INSMOD_LOAD_MAP
65 bool " Enable load map (-m) option" 65 bool " Enable load map (-m) option"
66 default n 66 default n
67 depends on CONFIG_INSMOD && ( CONFIG_FEATURE_2_2_MODULES || CONFIG_FEATURE_2_4_MODULES ) 67 depends on CONFIG_INSMOD && ( CONFIG_FEATURE_2_2_MODULES || CONFIG_FEATURE_2_4_MODULES )
68 help 68 help
@@ -78,7 +78,7 @@ config CONFIG_FEATURE_INSMOD_LOAD_MAP_FULL
78 depends on CONFIG_FEATURE_INSMOD_LOAD_MAP 78 depends on CONFIG_FEATURE_INSMOD_LOAD_MAP
79 help 79 help
80 Without this option, -m will only output section 80 Without this option, -m will only output section
81 load map. With this option, -m will also output 81 load map. With this option, -m will also output
82 symbols load map. 82 symbols load map.
83 83
84config CONFIG_LSMOD 84config CONFIG_LSMOD
@@ -100,7 +100,7 @@ config CONFIG_MODPROBE
100 bool "modprobe" 100 bool "modprobe"
101 default n 101 default n
102 help 102 help
103 Handle the loading of modules, and their dependancies on a high 103 Handle the loading of modules, and their dependancies on a high
104 level. 104 level.
105 105
106config CONFIG_RMMOD 106config CONFIG_RMMOD
diff --git a/modutils/Makefile b/modutils/Makefile
index 646e4489e..5e1c886c0 100644
--- a/modutils/Makefile
+++ b/modutils/Makefile
@@ -1,6 +1,6 @@
1# Makefile for busybox 1# Makefile for busybox
2# 2#
3# Copyright (C) 1999-2003 by Erik Andersen <andersen@codepoet.org> 3# Copyright (C) 1999-2004 by Erik Andersen <andersen@codepoet.org>
4# 4#
5# This program is free software; you can redistribute it and/or modify 5# This program is free software; you can redistribute it and/or modify
6# it under the terms of the GNU General Public License as published by 6# it under the terms of the GNU General Public License as published by
diff --git a/modutils/Makefile.in b/modutils/Makefile.in
index f6d5887fc..a92befafb 100644
--- a/modutils/Makefile.in
+++ b/modutils/Makefile.in
@@ -1,6 +1,6 @@
1# Makefile for busybox 1# Makefile for busybox
2# 2#
3# Copyright (C) 1999-2003 by Erik Andersen <andersen@codepoet.org> 3# Copyright (C) 1999-2004 by Erik Andersen <andersen@codepoet.org>
4# 4#
5# This program is free software; you can redistribute it and/or modify 5# This program is free software; you can redistribute it and/or modify
6# it under the terms of the GNU General Public License as published by 6# it under the terms of the GNU General Public License as published by
diff --git a/modutils/insmod.c b/modutils/insmod.c
index 73259131b..eaa425f5d 100644
--- a/modutils/insmod.c
+++ b/modutils/insmod.c
@@ -2,11 +2,10 @@
2/* 2/*
3 * Mini insmod implementation for busybox 3 * Mini insmod implementation for busybox
4 * 4 *
5 * This version of insmod supports x86, ARM, SH3/4/5, powerpc, m68k, 5 * This version of insmod supports x86, ARM, SH3/4/5, powerpc, m68k,
6 * MIPS, and v850e. 6 * MIPS, and v850e.
7 * 7 *
8 * Copyright (C) 1999,2000 by Lineo, inc. and Erik Andersen 8 * Copyright (C) 1999-2004 by Erik Andersen <andersen@codepoet.org>
9 * Copyright (C) 1999-2003 by Erik Andersen <andersen@codepoet.org>
10 * and Ron Alder <alder@lineo.com> 9 * and Ron Alder <alder@lineo.com>
11 * 10 *
12 * Miles Bader <miles@gnu.org> added NEC V850E support. 11 * Miles Bader <miles@gnu.org> added NEC V850E support.
@@ -32,7 +31,7 @@
32 * These blocks should be easy maintain and sync with obj_xxx.c in modutils. 31 * These blocks should be easy maintain and sync with obj_xxx.c in modutils.
33 * 32 *
34 * Magnus Damm <damm@opensource.se> added PowerPC support 20-Feb-2001. 33 * Magnus Damm <damm@opensource.se> added PowerPC support 20-Feb-2001.
35 * PowerPC specific code stolen from modutils-2.3.16, 34 * PowerPC specific code stolen from modutils-2.3.16,
36 * written by Paul Mackerras, Copyright 1996, 1997 Linux International. 35 * written by Paul Mackerras, Copyright 1996, 1997 Linux International.
37 * I've only tested the code on mpc8xx platforms in big-endian mode. 36 * I've only tested the code on mpc8xx platforms in big-endian mode.
38 * Did some cleanup and added CONFIG_USE_xxx_ENTRIES... 37 * Did some cleanup and added CONFIG_USE_xxx_ENTRIES...
@@ -104,7 +103,7 @@ extern int insmod_ng_main( int argc, char **argv);
104#endif 103#endif
105 104
106#ifdef CONFIG_FEATURE_INSMOD_LOADINKMEM 105#ifdef CONFIG_FEATURE_INSMOD_LOADINKMEM
107#define LOADBITS 0 106#define LOADBITS 0
108#else 107#else
109#define LOADBITS 1 108#define LOADBITS 1
110#endif 109#endif
@@ -152,7 +151,7 @@ extern int insmod_ng_main( int argc, char **argv);
152#define ELFCLASSM ELFCLASS32 151#define ELFCLASSM ELFCLASS32
153#endif 152#endif
154 153
155#if defined(__mc68000__) 154#if defined(__mc68000__)
156#define CONFIG_USE_GOT_ENTRIES 155#define CONFIG_USE_GOT_ENTRIES
157#define CONFIG_GOT_ENTRY_SIZE 4 156#define CONFIG_GOT_ENTRY_SIZE 4
158#define CONFIG_USE_SINGLE 157#define CONFIG_USE_SINGLE
@@ -183,7 +182,7 @@ extern int insmod_ng_main( int argc, char **argv);
183#define CONFIG_USE_PLT_ENTRIES 182#define CONFIG_USE_PLT_ENTRIES
184#define CONFIG_PLT_ENTRY_SIZE 16 183#define CONFIG_PLT_ENTRY_SIZE 16
185#define CONFIG_USE_PLT_LIST 184#define CONFIG_USE_PLT_LIST
186#define CONFIG_LIST_ARCHTYPE ElfW(Addr) 185#define CONFIG_LIST_ARCHTYPE ElfW(Addr)
187#define CONFIG_USE_LIST 186#define CONFIG_USE_LIST
188 187
189#define MATCH_MACHINE(x) (x == EM_PPC) 188#define MATCH_MACHINE(x) (x == EM_PPC)
@@ -282,7 +281,7 @@ extern int insmod_ng_main( int argc, char **argv);
282#ifndef MODUTILS_MODULE_H 281#ifndef MODUTILS_MODULE_H
283static const int MODUTILS_MODULE_H = 1; 282static const int MODUTILS_MODULE_H = 1;
284 283
285#ident "$Id: insmod.c,v 1.112 2004/02/18 10:14:17 mjn3 Exp $" 284#ident "$Id: insmod.c,v 1.113 2004/03/15 08:28:47 andersen Exp $"
286 285
287/* This file contains the structures used by the 2.0 and 2.1 kernels. 286/* This file contains the structures used by the 2.0 and 2.1 kernels.
288 We do not use the kernel headers directly because we do not wish 287 We do not use the kernel headers directly because we do not wish
@@ -503,7 +502,7 @@ int delete_module(const char *);
503#ifndef MODUTILS_OBJ_H 502#ifndef MODUTILS_OBJ_H
504static const int MODUTILS_OBJ_H = 1; 503static const int MODUTILS_OBJ_H = 1;
505 504
506#ident "$Id: insmod.c,v 1.112 2004/02/18 10:14:17 mjn3 Exp $" 505#ident "$Id: insmod.c,v 1.113 2004/03/15 08:28:47 andersen Exp $"
507 506
508/* The relocatable object is manipulated using elfin types. */ 507/* The relocatable object is manipulated using elfin types. */
509 508
@@ -680,7 +679,7 @@ static enum obj_reloc arch_apply_relocation (struct obj_file *f,
680static void arch_create_got (struct obj_file *f); 679static void arch_create_got (struct obj_file *f);
681 680
682static int obj_gpl_license(struct obj_file *f, const char **license); 681static int obj_gpl_license(struct obj_file *f, const char **license);
683 682
684#ifdef CONFIG_FEATURE_2_4_MODULES 683#ifdef CONFIG_FEATURE_2_4_MODULES
685static int arch_init_module (struct obj_file *f, struct new_module *); 684static int arch_init_module (struct obj_file *f, struct new_module *);
686#endif 685#endif
@@ -888,8 +887,8 @@ arch_apply_relocation(struct obj_file *f,
888 goto bb_use_got; 887 goto bb_use_got;
889 888
890 case R_ARM_GOTPC: 889 case R_ARM_GOTPC:
891 /* relative reloc, always to _GLOBAL_OFFSET_TABLE_ 890 /* relative reloc, always to _GLOBAL_OFFSET_TABLE_
892 * (which is .got) similar to branch, 891 * (which is .got) similar to branch,
893 * but is full 32 bits relative */ 892 * but is full 32 bits relative */
894 893
895 assert(got); 894 assert(got);
@@ -922,7 +921,7 @@ arch_apply_relocation(struct obj_file *f,
922 case R_390_PC16DBL: 921 case R_390_PC16DBL:
923 *(unsigned short *) loc += (v - dot) >> 1; 922 *(unsigned short *) loc += (v - dot) >> 1;
924 break; 923 break;
925 case R_390_PC16: 924 case R_390_PC16:
926 *(unsigned short *) loc += v - dot; 925 *(unsigned short *) loc += v - dot;
927 break; 926 break;
928 927
@@ -933,7 +932,7 @@ arch_apply_relocation(struct obj_file *f,
933 pe = (struct arch_single_entry *) &isym->pltent; 932 pe = (struct arch_single_entry *) &isym->pltent;
934 assert(pe->allocated); 933 assert(pe->allocated);
935 if (pe->inited == 0) { 934 if (pe->inited == 0) {
936 ip = (unsigned long *)(ifile->plt->contents + pe->offset); 935 ip = (unsigned long *)(ifile->plt->contents + pe->offset);
937 ip[0] = 0x0d105810; /* basr 1,0; lg 1,10(1); br 1 */ 936 ip[0] = 0x0d105810; /* basr 1,0; lg 1,10(1); br 1 */
938 ip[1] = 0x100607f1; 937 ip[1] = 0x100607f1;
939 if (ELF32_R_TYPE(rel->r_info) == R_390_PLT16DBL) 938 if (ELF32_R_TYPE(rel->r_info) == R_390_PLT16DBL)
@@ -984,7 +983,7 @@ arch_apply_relocation(struct obj_file *f,
984 break; 983 break;
985 984
986#ifndef R_390_GOTOFF32 985#ifndef R_390_GOTOFF32
987#define R_390_GOTOFF32 R_390_GOTOFF 986#define R_390_GOTOFF32 R_390_GOTOFF
988#endif 987#endif
989 case R_390_GOTOFF32: 988 case R_390_GOTOFF32:
990 assert(got != 0); 989 assert(got != 0);
@@ -1052,7 +1051,7 @@ arch_apply_relocation(struct obj_file *f,
1052 1051
1053 case R_68K_PC8: 1052 case R_68K_PC8:
1054 v -= dot; 1053 v -= dot;
1055 if ((Elf32_Sword)v > 0x7f || 1054 if ((Elf32_Sword)v > 0x7f ||
1056 (Elf32_Sword)v < -(Elf32_Sword)0x80) { 1055 (Elf32_Sword)v < -(Elf32_Sword)0x80) {
1057 ret = obj_reloc_overflow; 1056 ret = obj_reloc_overflow;
1058 } 1057 }
@@ -1061,7 +1060,7 @@ arch_apply_relocation(struct obj_file *f,
1061 1060
1062 case R_68K_PC16: 1061 case R_68K_PC16:
1063 v -= dot; 1062 v -= dot;
1064 if ((Elf32_Sword)v > 0x7fff || 1063 if ((Elf32_Sword)v > 0x7fff ||
1065 (Elf32_Sword)v < -(Elf32_Sword)0x8000) { 1064 (Elf32_Sword)v < -(Elf32_Sword)0x8000) {
1066 ret = obj_reloc_overflow; 1065 ret = obj_reloc_overflow;
1067 } 1066 }
@@ -1365,7 +1364,7 @@ bb_use_plt:
1365 v -= dot; 1364 v -= dot;
1366 /* if the target is too far away.... */ 1365 /* if the target is too far away.... */
1367#if defined (__arm__) || defined (__powerpc__) 1366#if defined (__arm__) || defined (__powerpc__)
1368 if ((int)v < -0x02000000 || (int)v >= 0x02000000) 1367 if ((int)v < -0x02000000 || (int)v >= 0x02000000)
1369#elif defined (__v850e__) 1368#elif defined (__v850e__)
1370 if ((Elf32_Sword)v > 0x1fffff || (Elf32_Sword)v < (Elf32_Sword)-0x200000) 1369 if ((Elf32_Sword)v > 0x1fffff || (Elf32_Sword)v < (Elf32_Sword)-0x200000)
1371#endif 1370#endif
@@ -1426,7 +1425,7 @@ bb_use_got:
1426} 1425}
1427 1426
1428 1427
1429#if defined(CONFIG_USE_LIST) 1428#if defined(CONFIG_USE_LIST)
1430 1429
1431static int arch_list_add(ElfW(RelM) *rel, struct arch_list_entry **list, 1430static int arch_list_add(ElfW(RelM) *rel, struct arch_list_entry **list,
1432 int offset, int size) 1431 int offset, int size)
@@ -1453,7 +1452,7 @@ static int arch_list_add(ElfW(RelM) *rel, struct arch_list_entry **list,
1453 1452
1454#endif 1453#endif
1455 1454
1456#if defined(CONFIG_USE_SINGLE) 1455#if defined(CONFIG_USE_SINGLE)
1457 1456
1458static int arch_single_init(ElfW(RelM) *rel, struct arch_single_entry *single, 1457static int arch_single_init(ElfW(RelM) *rel, struct arch_single_entry *single,
1459 int offset, int size) 1458 int offset, int size)
@@ -1471,7 +1470,7 @@ static int arch_single_init(ElfW(RelM) *rel, struct arch_single_entry *single,
1471 1470
1472#if defined(CONFIG_USE_GOT_ENTRIES) || defined(CONFIG_USE_PLT_ENTRIES) 1471#if defined(CONFIG_USE_GOT_ENTRIES) || defined(CONFIG_USE_PLT_ENTRIES)
1473 1472
1474static struct obj_section *arch_xsect_init(struct obj_file *f, char *name, 1473static struct obj_section *arch_xsect_init(struct obj_file *f, char *name,
1475 int offset, int size) 1474 int offset, int size)
1476{ 1475{
1477 struct obj_section *myrelsec = obj_find_section(f, name); 1476 struct obj_section *myrelsec = obj_find_section(f, name);
@@ -1483,7 +1482,7 @@ static struct obj_section *arch_xsect_init(struct obj_file *f, char *name,
1483 if (myrelsec) { 1482 if (myrelsec) {
1484 obj_extend_section(myrelsec, offset); 1483 obj_extend_section(myrelsec, offset);
1485 } else { 1484 } else {
1486 myrelsec = obj_create_alloced_section(f, name, 1485 myrelsec = obj_create_alloced_section(f, name,
1487 size, offset); 1486 size, offset);
1488 assert(myrelsec); 1487 assert(myrelsec);
1489 } 1488 }
@@ -1575,7 +1574,7 @@ static void arch_create_got(struct obj_file *f)
1575 1574
1576#elif defined(__sh__) 1575#elif defined(__sh__)
1577 case R_SH_GOT32: 1576 case R_SH_GOT32:
1578 got_allocate = 1; 1577 got_allocate = 1;
1579 break; 1578 break;
1580 1579
1581 case R_SH_GOTPC: 1580 case R_SH_GOTPC:
@@ -1602,7 +1601,7 @@ static void arch_create_got(struct obj_file *f)
1602#if defined(CONFIG_USE_GOT_ENTRIES) 1601#if defined(CONFIG_USE_GOT_ENTRIES)
1603 if (got_allocate) { 1602 if (got_allocate) {
1604 got_offset += arch_single_init( 1603 got_offset += arch_single_init(
1605 rel, &intsym->gotent, 1604 rel, &intsym->gotent,
1606 got_offset, CONFIG_GOT_ENTRY_SIZE); 1605 got_offset, CONFIG_GOT_ENTRY_SIZE);
1607 1606
1608 got_needed = 1; 1607 got_needed = 1;
@@ -1610,13 +1609,13 @@ static void arch_create_got(struct obj_file *f)
1610#endif 1609#endif
1611#if defined(CONFIG_USE_PLT_ENTRIES) 1610#if defined(CONFIG_USE_PLT_ENTRIES)
1612 if (plt_allocate) { 1611 if (plt_allocate) {
1613#if defined(CONFIG_USE_PLT_LIST) 1612#if defined(CONFIG_USE_PLT_LIST)
1614 plt_offset += arch_list_add( 1613 plt_offset += arch_list_add(
1615 rel, &intsym->pltent, 1614 rel, &intsym->pltent,
1616 plt_offset, CONFIG_PLT_ENTRY_SIZE); 1615 plt_offset, CONFIG_PLT_ENTRY_SIZE);
1617#else 1616#else
1618 plt_offset += arch_single_init( 1617 plt_offset += arch_single_init(
1619 rel, &intsym->pltent, 1618 rel, &intsym->pltent,
1620 plt_offset, CONFIG_PLT_ENTRY_SIZE); 1619 plt_offset, CONFIG_PLT_ENTRY_SIZE);
1621#endif 1620#endif
1622 plt_needed = 1; 1621 plt_needed = 1;
@@ -1954,7 +1953,7 @@ static struct obj_section *obj_create_alloced_section_first(struct obj_file *f,
1954static void *obj_extend_section(struct obj_section *sec, unsigned long more) 1953static void *obj_extend_section(struct obj_section *sec, unsigned long more)
1955{ 1954{
1956 unsigned long oldsize = sec->header.sh_size; 1955 unsigned long oldsize = sec->header.sh_size;
1957 if (more) { 1956 if (more) {
1958 sec->contents = xrealloc(sec->contents, sec->header.sh_size += more); 1957 sec->contents = xrealloc(sec->contents, sec->header.sh_size += more);
1959 } 1958 }
1960 return sec->contents + oldsize; 1959 return sec->contents + oldsize;
@@ -2363,7 +2362,7 @@ old_init_module(const char *m_name, struct obj_file *f,
2363 struct obj_symbol *sym; 2362 struct obj_symbol *sym;
2364 for (sym = f->symtab[i]; sym; sym = sym->next) 2363 for (sym = f->symtab[i]; sym; sym = sym->next)
2365 if (ELFW(ST_BIND) (sym->info) != STB_LOCAL 2364 if (ELFW(ST_BIND) (sym->info) != STB_LOCAL
2366 && sym->secidx <= SHN_HIRESERVE) 2365 && sym->secidx <= SHN_HIRESERVE)
2367 { 2366 {
2368 sym->ksymidx = nsyms++; 2367 sym->ksymidx = nsyms++;
2369 strsize += strlen(sym->name) + 1; 2368 strsize += strlen(sym->name) + 1;
@@ -2977,7 +2976,7 @@ new_init_module(const char *m_name, struct obj_file *f,
2977 tgt_long m_addr; 2976 tgt_long m_addr;
2978 2977
2979 sec = obj_find_section(f, ".this"); 2978 sec = obj_find_section(f, ".this");
2980 if (!sec || !sec->contents) { 2979 if (!sec || !sec->contents) {
2981 bb_perror_msg_and_die("corrupt module %s?",m_name); 2980 bb_perror_msg_and_die("corrupt module %s?",m_name);
2982 } 2981 }
2983 module = (struct new_module *) sec->contents; 2982 module = (struct new_module *) sec->contents;
@@ -3499,7 +3498,7 @@ static struct obj_file *obj_load(FILE * fp, int loadprogbits)
3499 sec->contents = NULL; 3498 sec->contents = NULL;
3500 break; 3499 break;
3501 } 3500 }
3502#endif 3501#endif
3503 case SHT_SYMTAB: 3502 case SHT_SYMTAB:
3504 case SHT_STRTAB: 3503 case SHT_STRTAB:
3505 case SHT_RELM: 3504 case SHT_RELM:
@@ -3726,7 +3725,7 @@ static int obj_gpl_license(struct obj_file *f, const char **license)
3726#define TAINT_UNSAFE_SMP (1<<2) 3725#define TAINT_UNSAFE_SMP (1<<2)
3727#define TAINT_URL "http://www.tux.org/lkml/#export-tainted" 3726#define TAINT_URL "http://www.tux.org/lkml/#export-tainted"
3728 3727
3729static void set_tainted(struct obj_file *f, int fd, char *m_name, 3728static void set_tainted(struct obj_file *f, int fd, char *m_name,
3730 int kernel_has_tainted, int taint, const char *text1, const char *text2) 3729 int kernel_has_tainted, int taint, const char *text1, const char *text2)
3731{ 3730{
3732 char buf[80]; 3731 char buf[80];
@@ -3819,7 +3818,7 @@ get_module_version(struct obj_file *f, char str[STRVERSIONLEN])
3819 * start of some sections. this info is used by ksymoops to do better 3818 * start of some sections. this info is used by ksymoops to do better
3820 * debugging. 3819 * debugging.
3821 */ 3820 */
3822static void 3821static void
3823add_ksymoops_symbols(struct obj_file *f, const char *filename, 3822add_ksymoops_symbols(struct obj_file *f, const char *filename,
3824 const char *m_name) 3823 const char *m_name)
3825{ 3824{
@@ -4059,7 +4058,7 @@ extern int insmod_main( int argc, char **argv)
4059#ifdef CONFIG_FEATURE_INSMOD_LOAD_MAP 4058#ifdef CONFIG_FEATURE_INSMOD_LOAD_MAP
4060 while ((opt = getopt(argc, argv, "fkqsvxmLo:")) > 0) 4059 while ((opt = getopt(argc, argv, "fkqsvxmLo:")) > 0)
4061#else 4060#else
4062 while ((opt = getopt(argc, argv, "fkqsvxLo:")) > 0) 4061 while ((opt = getopt(argc, argv, "fkqsvxLo:")) > 0)
4063#endif 4062#endif
4064 { 4063 {
4065 switch (opt) { 4064 switch (opt) {
diff --git a/modutils/lsmod.c b/modutils/lsmod.c
index 1b914e720..7bf314afe 100644
--- a/modutils/lsmod.c
+++ b/modutils/lsmod.c
@@ -2,7 +2,7 @@
2/* 2/*
3 * Mini lsmod implementation for busybox 3 * Mini lsmod implementation for busybox
4 * 4 *
5 * Copyright (C) 1999-2003 by Erik Andersen <andersen@codepoet.org> 5 * Copyright (C) 1999-2004 by Erik Andersen <andersen@codepoet.org>
6 * 6 *
7 * Modified by Alcove, Julien Gaulmin <julien.gaulmin@alcove.fr> and 7 * Modified by Alcove, Julien Gaulmin <julien.gaulmin@alcove.fr> and
8 * Nicolas Ferre <nicolas.ferre@alcove.fr> to support pre 2.1 kernels 8 * Nicolas Ferre <nicolas.ferre@alcove.fr> to support pre 2.1 kernels
diff --git a/modutils/rmmod.c b/modutils/rmmod.c
index 0cebb6e67..cc9742c0a 100644
--- a/modutils/rmmod.c
+++ b/modutils/rmmod.c
@@ -2,7 +2,7 @@
2/* 2/*
3 * Mini rmmod implementation for busybox 3 * Mini rmmod implementation for busybox
4 * 4 *
5 * Copyright (C) 1999-2003 by Erik Andersen <andersen@codepoet.org> 5 * Copyright (C) 1999-2004 by Erik Andersen <andersen@codepoet.org>
6 * 6 *
7 * This program is free software; you can redistribute it and/or modify 7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by 8 * it under the terms of the GNU General Public License as published by
@@ -46,10 +46,10 @@ extern int rmmod_main(int argc, char **argv)
46 switch (n) { 46 switch (n) {
47 case 'w': // --wait 47 case 'w': // --wait
48 flags &= ~O_NONBLOCK; 48 flags &= ~O_NONBLOCK;
49 break; 49 break;
50 case 'f': // --force 50 case 'f': // --force
51 flags |= O_TRUNC; 51 flags |= O_TRUNC;
52 break; 52 break;
53 case 'a': 53 case 'a':
54 /* Unload _all_ unused modules via NULL delete_module() call */ 54 /* Unload _all_ unused modules via NULL delete_module() call */
55 /* until the number of modules does not change */ 55 /* until the number of modules does not change */