diff options
Diffstat (limited to 'modutils')
-rw-r--r-- | modutils/Config.in | 10 | ||||
-rw-r--r-- | modutils/Makefile | 2 | ||||
-rw-r--r-- | modutils/Makefile.in | 2 | ||||
-rw-r--r-- | modutils/insmod.c | 67 | ||||
-rw-r--r-- | modutils/lsmod.c | 2 | ||||
-rw-r--r-- | modutils/rmmod.c | 6 |
6 files changed, 44 insertions, 45 deletions
diff --git a/modutils/Config.in b/modutils/Config.in index d9f76d1..faccee8 100644 --- a/modutils/Config.in +++ b/modutils/Config.in @@ -45,9 +45,9 @@ config CONFIG_FEATURE_INSMOD_KSYMOOPS_SYMBOLS default n depends on CONFIG_INSMOD && ( CONFIG_FEATURE_2_2_MODULES || CONFIG_FEATURE_2_4_MODULES ) help - By adding module symbols to the kernel symbol table, Oops messages + By adding module symbols to the kernel symbol table, Oops messages occuring within kernel modules can be properly debugged. By enabling - this feature, module symbols will always be added to the kernel symbol + this feature, module symbols will always be added to the kernel symbol table for properly debugging support. If you are not interested in Oops messages from kernel modules, say N. @@ -62,7 +62,7 @@ config CONFIG_FEATURE_INSMOD_LOADINKMEM being loaded into memory. config CONFIG_FEATURE_INSMOD_LOAD_MAP - bool " Enable load map (-m) option" + bool " Enable load map (-m) option" default n depends on CONFIG_INSMOD && ( CONFIG_FEATURE_2_2_MODULES || CONFIG_FEATURE_2_4_MODULES ) help @@ -78,7 +78,7 @@ config CONFIG_FEATURE_INSMOD_LOAD_MAP_FULL depends on CONFIG_FEATURE_INSMOD_LOAD_MAP help Without this option, -m will only output section - load map. With this option, -m will also output + load map. With this option, -m will also output symbols load map. config CONFIG_LSMOD @@ -100,7 +100,7 @@ config CONFIG_MODPROBE bool "modprobe" default n help - Handle the loading of modules, and their dependancies on a high + Handle the loading of modules, and their dependancies on a high level. config CONFIG_RMMOD diff --git a/modutils/Makefile b/modutils/Makefile index 646e448..5e1c886 100644 --- a/modutils/Makefile +++ b/modutils/Makefile @@ -1,6 +1,6 @@ # Makefile for busybox # -# Copyright (C) 1999-2003 by Erik Andersen <andersen@codepoet.org> +# Copyright (C) 1999-2004 by Erik Andersen <andersen@codepoet.org> # # 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 diff --git a/modutils/Makefile.in b/modutils/Makefile.in index f6d5887..a92befa 100644 --- a/modutils/Makefile.in +++ b/modutils/Makefile.in @@ -1,6 +1,6 @@ # Makefile for busybox # -# Copyright (C) 1999-2003 by Erik Andersen <andersen@codepoet.org> +# Copyright (C) 1999-2004 by Erik Andersen <andersen@codepoet.org> # # 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 diff --git a/modutils/insmod.c b/modutils/insmod.c index 7325913..eaa425f 100644 --- a/modutils/insmod.c +++ b/modutils/insmod.c @@ -2,11 +2,10 @@ /* * Mini insmod implementation for busybox * - * This version of insmod supports x86, ARM, SH3/4/5, powerpc, m68k, + * This version of insmod supports x86, ARM, SH3/4/5, powerpc, m68k, * MIPS, and v850e. * - * Copyright (C) 1999,2000 by Lineo, inc. and Erik Andersen - * Copyright (C) 1999-2003 by Erik Andersen <andersen@codepoet.org> + * Copyright (C) 1999-2004 by Erik Andersen <andersen@codepoet.org> * and Ron Alder <alder@lineo.com> * * Miles Bader <miles@gnu.org> added NEC V850E support. @@ -32,7 +31,7 @@ * These blocks should be easy maintain and sync with obj_xxx.c in modutils. * * Magnus Damm <damm@opensource.se> added PowerPC support 20-Feb-2001. - * PowerPC specific code stolen from modutils-2.3.16, + * PowerPC specific code stolen from modutils-2.3.16, * written by Paul Mackerras, Copyright 1996, 1997 Linux International. * I've only tested the code on mpc8xx platforms in big-endian mode. * Did some cleanup and added CONFIG_USE_xxx_ENTRIES... @@ -104,7 +103,7 @@ extern int insmod_ng_main( int argc, char **argv); #endif #ifdef CONFIG_FEATURE_INSMOD_LOADINKMEM -#define LOADBITS 0 +#define LOADBITS 0 #else #define LOADBITS 1 #endif @@ -152,7 +151,7 @@ extern int insmod_ng_main( int argc, char **argv); #define ELFCLASSM ELFCLASS32 #endif -#if defined(__mc68000__) +#if defined(__mc68000__) #define CONFIG_USE_GOT_ENTRIES #define CONFIG_GOT_ENTRY_SIZE 4 #define CONFIG_USE_SINGLE @@ -183,7 +182,7 @@ extern int insmod_ng_main( int argc, char **argv); #define CONFIG_USE_PLT_ENTRIES #define CONFIG_PLT_ENTRY_SIZE 16 #define CONFIG_USE_PLT_LIST -#define CONFIG_LIST_ARCHTYPE ElfW(Addr) +#define CONFIG_LIST_ARCHTYPE ElfW(Addr) #define CONFIG_USE_LIST #define MATCH_MACHINE(x) (x == EM_PPC) @@ -282,7 +281,7 @@ extern int insmod_ng_main( int argc, char **argv); #ifndef MODUTILS_MODULE_H static const int MODUTILS_MODULE_H = 1; -#ident "$Id: insmod.c,v 1.112 2004/02/18 10:14:17 mjn3 Exp $" +#ident "$Id: insmod.c,v 1.113 2004/03/15 08:28:47 andersen Exp $" /* This file contains the structures used by the 2.0 and 2.1 kernels. We do not use the kernel headers directly because we do not wish @@ -503,7 +502,7 @@ int delete_module(const char *); #ifndef MODUTILS_OBJ_H static const int MODUTILS_OBJ_H = 1; -#ident "$Id: insmod.c,v 1.112 2004/02/18 10:14:17 mjn3 Exp $" +#ident "$Id: insmod.c,v 1.113 2004/03/15 08:28:47 andersen Exp $" /* The relocatable object is manipulated using elfin types. */ @@ -680,7 +679,7 @@ static enum obj_reloc arch_apply_relocation (struct obj_file *f, static void arch_create_got (struct obj_file *f); static int obj_gpl_license(struct obj_file *f, const char **license); - + #ifdef CONFIG_FEATURE_2_4_MODULES static int arch_init_module (struct obj_file *f, struct new_module *); #endif @@ -888,8 +887,8 @@ arch_apply_relocation(struct obj_file *f, goto bb_use_got; case R_ARM_GOTPC: - /* relative reloc, always to _GLOBAL_OFFSET_TABLE_ - * (which is .got) similar to branch, + /* relative reloc, always to _GLOBAL_OFFSET_TABLE_ + * (which is .got) similar to branch, * but is full 32 bits relative */ assert(got); @@ -922,7 +921,7 @@ arch_apply_relocation(struct obj_file *f, case R_390_PC16DBL: *(unsigned short *) loc += (v - dot) >> 1; break; - case R_390_PC16: + case R_390_PC16: *(unsigned short *) loc += v - dot; break; @@ -933,7 +932,7 @@ arch_apply_relocation(struct obj_file *f, pe = (struct arch_single_entry *) &isym->pltent; assert(pe->allocated); if (pe->inited == 0) { - ip = (unsigned long *)(ifile->plt->contents + pe->offset); + ip = (unsigned long *)(ifile->plt->contents + pe->offset); ip[0] = 0x0d105810; /* basr 1,0; lg 1,10(1); br 1 */ ip[1] = 0x100607f1; if (ELF32_R_TYPE(rel->r_info) == R_390_PLT16DBL) @@ -984,7 +983,7 @@ arch_apply_relocation(struct obj_file *f, break; #ifndef R_390_GOTOFF32 -#define R_390_GOTOFF32 R_390_GOTOFF +#define R_390_GOTOFF32 R_390_GOTOFF #endif case R_390_GOTOFF32: assert(got != 0); @@ -1052,7 +1051,7 @@ arch_apply_relocation(struct obj_file *f, case R_68K_PC8: v -= dot; - if ((Elf32_Sword)v > 0x7f || + if ((Elf32_Sword)v > 0x7f || (Elf32_Sword)v < -(Elf32_Sword)0x80) { ret = obj_reloc_overflow; } @@ -1061,7 +1060,7 @@ arch_apply_relocation(struct obj_file *f, case R_68K_PC16: v -= dot; - if ((Elf32_Sword)v > 0x7fff || + if ((Elf32_Sword)v > 0x7fff || (Elf32_Sword)v < -(Elf32_Sword)0x8000) { ret = obj_reloc_overflow; } @@ -1365,7 +1364,7 @@ bb_use_plt: v -= dot; /* if the target is too far away.... */ #if defined (__arm__) || defined (__powerpc__) - if ((int)v < -0x02000000 || (int)v >= 0x02000000) + if ((int)v < -0x02000000 || (int)v >= 0x02000000) #elif defined (__v850e__) if ((Elf32_Sword)v > 0x1fffff || (Elf32_Sword)v < (Elf32_Sword)-0x200000) #endif @@ -1426,7 +1425,7 @@ bb_use_got: } -#if defined(CONFIG_USE_LIST) +#if defined(CONFIG_USE_LIST) static int arch_list_add(ElfW(RelM) *rel, struct arch_list_entry **list, int offset, int size) @@ -1453,7 +1452,7 @@ static int arch_list_add(ElfW(RelM) *rel, struct arch_list_entry **list, #endif -#if defined(CONFIG_USE_SINGLE) +#if defined(CONFIG_USE_SINGLE) static int arch_single_init(ElfW(RelM) *rel, struct arch_single_entry *single, int offset, int size) @@ -1471,7 +1470,7 @@ static int arch_single_init(ElfW(RelM) *rel, struct arch_single_entry *single, #if defined(CONFIG_USE_GOT_ENTRIES) || defined(CONFIG_USE_PLT_ENTRIES) -static struct obj_section *arch_xsect_init(struct obj_file *f, char *name, +static struct obj_section *arch_xsect_init(struct obj_file *f, char *name, int offset, int size) { 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, if (myrelsec) { obj_extend_section(myrelsec, offset); } else { - myrelsec = obj_create_alloced_section(f, name, + myrelsec = obj_create_alloced_section(f, name, size, offset); assert(myrelsec); } @@ -1575,7 +1574,7 @@ static void arch_create_got(struct obj_file *f) #elif defined(__sh__) case R_SH_GOT32: - got_allocate = 1; + got_allocate = 1; break; case R_SH_GOTPC: @@ -1602,7 +1601,7 @@ static void arch_create_got(struct obj_file *f) #if defined(CONFIG_USE_GOT_ENTRIES) if (got_allocate) { got_offset += arch_single_init( - rel, &intsym->gotent, + rel, &intsym->gotent, got_offset, CONFIG_GOT_ENTRY_SIZE); got_needed = 1; @@ -1610,13 +1609,13 @@ static void arch_create_got(struct obj_file *f) #endif #if defined(CONFIG_USE_PLT_ENTRIES) if (plt_allocate) { -#if defined(CONFIG_USE_PLT_LIST) +#if defined(CONFIG_USE_PLT_LIST) plt_offset += arch_list_add( - rel, &intsym->pltent, + rel, &intsym->pltent, plt_offset, CONFIG_PLT_ENTRY_SIZE); #else plt_offset += arch_single_init( - rel, &intsym->pltent, + rel, &intsym->pltent, plt_offset, CONFIG_PLT_ENTRY_SIZE); #endif plt_needed = 1; @@ -1954,7 +1953,7 @@ static struct obj_section *obj_create_alloced_section_first(struct obj_file *f, static void *obj_extend_section(struct obj_section *sec, unsigned long more) { unsigned long oldsize = sec->header.sh_size; - if (more) { + if (more) { sec->contents = xrealloc(sec->contents, sec->header.sh_size += more); } return sec->contents + oldsize; @@ -2363,7 +2362,7 @@ old_init_module(const char *m_name, struct obj_file *f, struct obj_symbol *sym; for (sym = f->symtab[i]; sym; sym = sym->next) if (ELFW(ST_BIND) (sym->info) != STB_LOCAL - && sym->secidx <= SHN_HIRESERVE) + && sym->secidx <= SHN_HIRESERVE) { sym->ksymidx = nsyms++; strsize += strlen(sym->name) + 1; @@ -2977,7 +2976,7 @@ new_init_module(const char *m_name, struct obj_file *f, tgt_long m_addr; sec = obj_find_section(f, ".this"); - if (!sec || !sec->contents) { + if (!sec || !sec->contents) { bb_perror_msg_and_die("corrupt module %s?",m_name); } module = (struct new_module *) sec->contents; @@ -3499,7 +3498,7 @@ static struct obj_file *obj_load(FILE * fp, int loadprogbits) sec->contents = NULL; break; } -#endif +#endif case SHT_SYMTAB: case SHT_STRTAB: case SHT_RELM: @@ -3726,7 +3725,7 @@ static int obj_gpl_license(struct obj_file *f, const char **license) #define TAINT_UNSAFE_SMP (1<<2) #define TAINT_URL "http://www.tux.org/lkml/#export-tainted" -static void set_tainted(struct obj_file *f, int fd, char *m_name, +static void set_tainted(struct obj_file *f, int fd, char *m_name, int kernel_has_tainted, int taint, const char *text1, const char *text2) { char buf[80]; @@ -3819,7 +3818,7 @@ get_module_version(struct obj_file *f, char str[STRVERSIONLEN]) * start of some sections. this info is used by ksymoops to do better * debugging. */ -static void +static void add_ksymoops_symbols(struct obj_file *f, const char *filename, const char *m_name) { @@ -4059,7 +4058,7 @@ extern int insmod_main( int argc, char **argv) #ifdef CONFIG_FEATURE_INSMOD_LOAD_MAP while ((opt = getopt(argc, argv, "fkqsvxmLo:")) > 0) #else - while ((opt = getopt(argc, argv, "fkqsvxLo:")) > 0) + while ((opt = getopt(argc, argv, "fkqsvxLo:")) > 0) #endif { switch (opt) { diff --git a/modutils/lsmod.c b/modutils/lsmod.c index 1b914e7..7bf314a 100644 --- a/modutils/lsmod.c +++ b/modutils/lsmod.c @@ -2,7 +2,7 @@ /* * Mini lsmod implementation for busybox * - * Copyright (C) 1999-2003 by Erik Andersen <andersen@codepoet.org> + * Copyright (C) 1999-2004 by Erik Andersen <andersen@codepoet.org> * * Modified by Alcove, Julien Gaulmin <julien.gaulmin@alcove.fr> and * Nicolas Ferre <nicolas.ferre@alcove.fr> to support pre 2.1 kernels diff --git a/modutils/rmmod.c b/modutils/rmmod.c index 0cebb6e..cc9742c 100644 --- a/modutils/rmmod.c +++ b/modutils/rmmod.c @@ -2,7 +2,7 @@ /* * Mini rmmod implementation for busybox * - * Copyright (C) 1999-2003 by Erik Andersen <andersen@codepoet.org> + * Copyright (C) 1999-2004 by Erik Andersen <andersen@codepoet.org> * * 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 @@ -46,10 +46,10 @@ extern int rmmod_main(int argc, char **argv) switch (n) { case 'w': // --wait flags &= ~O_NONBLOCK; - break; + break; case 'f': // --force flags |= O_TRUNC; - break; + break; case 'a': /* Unload _all_ unused modules via NULL delete_module() call */ /* until the number of modules does not change */ |