Commit e7a27380 authored by Rusty Russell's avatar Rusty Russell Committed by Linus Torvalds

[PATCH] Module state and address in /proc/modules.

The address allows oprofile and ksymoops to work again.  The state is
simply informative.
parent ecbd4110
...@@ -1409,6 +1409,15 @@ static int m_show(struct seq_file *m, void *p) ...@@ -1409,6 +1409,15 @@ static int m_show(struct seq_file *m, void *p)
seq_printf(m, "%s %lu", seq_printf(m, "%s %lu",
mod->name, mod->init_size + mod->core_size); mod->name, mod->init_size + mod->core_size);
print_unload_info(m, mod); print_unload_info(m, mod);
/* Informative for users. */
seq_printf(m, " %s",
mod->state == MODULE_STATE_GOING ? "Unloading":
mod->state == MODULE_STATE_COMING ? "Loading":
"Live");
/* Used by oprofile and other similar tools. */
seq_printf(m, " 0x%p", mod->module_core);
seq_printf(m, "\n"); seq_printf(m, "\n");
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment