insmod: code shrink, stop exporting insmod_ng_main.
function old new delta
add_ksymoops_symbols - 421 +421
static.section_names 20 40 +20
lsmod_main 425 424 -1
set_tainted 153 150 -3
main_opts 4 - -4
obj_symbol_patch 47 42 -5
obj_string_patch 144 139 -5
already_loaded 144 138 -6
check_dep 348 341 -7
append_option 75 68 -7
obj_allocate_commons 515 501 -14
new_process_module_arguments 1039 1018 -21
arch_new_symbol 31 9 -22
check_module_name_match 85 61 -24
obj_create_alloced_section 164 136 -28
include_conf 930 902 -28
modprobe_main 1643 1535 -108
obj_load 924 777 -147
insmod_ng_main 245 - -245
insmod_main 4122 3794 -328
------------------------------------------------------------------------------
(add/remove: 1/2 grow/shrink: 1/16 up/down: 441/-1003) Total: -562 bytes
text data bss dec hex filename
776020 974 9420 786414 bffee busybox_old
775384 974 9420 785778 bfd72 busybox_unstripped
diff --git a/modutils/lsmod.c b/modutils/lsmod.c
index 7014681..f1f78ff 100644
--- a/modutils/lsmod.c
+++ b/modutils/lsmod.c
@@ -28,17 +28,17 @@
FILE *f;
tainted = 0;
- if ((f = fopen(TAINT_FILENAME, "r"))) {
+ f = fopen(TAINT_FILENAME, "r");
+ if (f) {
fscanf(f, "%d", &tainted);
fclose(f);
}
- if (f && tainted) {
+ if (tainted) {
printf(" Tainted: %c%c%c\n",
tainted & TAINT_PROPRIETORY_MODULE ? 'P' : 'G',
tainted & TAINT_FORCED_MODULE ? 'F' : ' ',
tainted & TAINT_UNSAFE_SMP ? 'S' : ' ');
- }
- else {
+ } else {
printf(" Not tainted\n");
}
}
@@ -147,7 +147,7 @@
printf("Module Size Used by");
check_tainted();
-#if defined(CONFIG_FEATURE_LSMOD_PRETTY_2_6_OUTPUT)
+#if ENABLE_FEATURE_LSMOD_PRETTY_2_6_OUTPUT
{
char *line;
while ((line = xmalloc_fgets(file)) != NULL) {