|
26 | 26 | #include <linux/utsname.h> |
27 | 27 | #include <linux/vmalloc.h> |
28 | 28 | #include <linux/atomic.h> |
29 | | -#include <linux/module.h> |
30 | 29 | #include <linux/moduleparam.h> |
31 | 30 | #include <linux/mm.h> |
32 | 31 | #include <linux/init.h> |
@@ -2004,54 +2003,6 @@ static int kdb_ef(int argc, const char **argv) |
2004 | 2003 | return 0; |
2005 | 2004 | } |
2006 | 2005 |
|
2007 | | -#if defined(CONFIG_MODULES) |
2008 | | -/* |
2009 | | - * kdb_lsmod - This function implements the 'lsmod' command. Lists |
2010 | | - * currently loaded kernel modules. |
2011 | | - * Mostly taken from userland lsmod. |
2012 | | - */ |
2013 | | -static int kdb_lsmod(int argc, const char **argv) |
2014 | | -{ |
2015 | | - struct module *mod; |
2016 | | - |
2017 | | - if (argc != 0) |
2018 | | - return KDB_ARGCOUNT; |
2019 | | - |
2020 | | - kdb_printf("Module Size modstruct Used by\n"); |
2021 | | - list_for_each_entry(mod, kdb_modules, list) { |
2022 | | - if (mod->state == MODULE_STATE_UNFORMED) |
2023 | | - continue; |
2024 | | - |
2025 | | - kdb_printf("%-20s%8u 0x%px ", mod->name, |
2026 | | - mod->core_layout.size, (void *)mod); |
2027 | | -#ifdef CONFIG_MODULE_UNLOAD |
2028 | | - kdb_printf("%4d ", module_refcount(mod)); |
2029 | | -#endif |
2030 | | - if (mod->state == MODULE_STATE_GOING) |
2031 | | - kdb_printf(" (Unloading)"); |
2032 | | - else if (mod->state == MODULE_STATE_COMING) |
2033 | | - kdb_printf(" (Loading)"); |
2034 | | - else |
2035 | | - kdb_printf(" (Live)"); |
2036 | | - kdb_printf(" 0x%px", mod->core_layout.base); |
2037 | | - |
2038 | | -#ifdef CONFIG_MODULE_UNLOAD |
2039 | | - { |
2040 | | - struct module_use *use; |
2041 | | - kdb_printf(" [ "); |
2042 | | - list_for_each_entry(use, &mod->source_list, |
2043 | | - source_list) |
2044 | | - kdb_printf("%s ", use->target->name); |
2045 | | - kdb_printf("]\n"); |
2046 | | - } |
2047 | | -#endif |
2048 | | - } |
2049 | | - |
2050 | | - return 0; |
2051 | | -} |
2052 | | - |
2053 | | -#endif /* CONFIG_MODULES */ |
2054 | | - |
2055 | 2006 | /* |
2056 | 2007 | * kdb_env - This function implements the 'env' command. Display the |
2057 | 2008 | * current environment variables. |
|
0 commit comments