aboutsummaryrefslogtreecommitdiff
path: root/modutils/lsmod.c
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2007-11-02 23:31:10 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2007-11-02 23:31:10 +0000
commitb68979aefa0efb519e6af02deba082e6b4180043 (patch)
treeb16d64f31b629e54c70d30abbd98f3b4f46d7cd4 /modutils/lsmod.c
parent9d1afdb571e0ba3053616d74edc99a68325ef5e9 (diff)
downloadbusybox-b68979aefa0efb519e6af02deba082e6b4180043.tar.gz
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
Diffstat (limited to 'modutils/lsmod.c')
-rw-r--r--modutils/lsmod.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/modutils/lsmod.c b/modutils/lsmod.c
index 70146814c..f1f78ff9f 100644
--- a/modutils/lsmod.c
+++ b/modutils/lsmod.c
@@ -28,17 +28,17 @@ static void check_tainted(void)
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 @@ int lsmod_main(int argc, char **argv)
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) {