lkml.org 
[lkml]   [2003]   [Jan]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[TRIVIAl]RE: Kernel module version support.
Date
> Yes, and the module's state (LOADING, UNLOADING or LIVE).  There might
> be others, too.
Is thiw what you want ? And when would you like to export the module's state
information?

# This is a BitKeeper generated patch for the following project:
# Project Name: Linux kernel tree
# This patch format is intended for GNU patch command version 2.5 or higher.
# This patch includes the following deltas:
# ChangeSet 1.893 -> 1.894
# kernel/module.c 1.45 -> 1.46
#
# The following is the BitKeeper ChangeSet Log
# --------------------------------------------
# 03/01/08 stanley@manticore.sh.intel.com 1.894
# Print module state
# --------------------------------------------
#
diff -Nru a/kernel/module.c b/kernel/module.c
--- a/kernel/module.c Wed Jan 8 10:33:28 2003
+++ b/kernel/module.c Wed Jan 8 10:33:29 2003
@@ -486,6 +486,14 @@
return ret;
}

+static void print_module_info(struct seq_file *m, struct module *mod)
+{
+ seq_printf(m, " %s", mod->state == MODULE_STATE_LIVE ? "Live":
+ mod->state == MODULE_STATE_COMING ? "Loading":
+ "Unloading");
+ seq_printf(m, " 0x%p", mod->module_core);
+}
+
static void print_unload_info(struct seq_file *m, struct module *mod)
{
struct module_use *use;
@@ -1422,6 +1430,7 @@
seq_printf(m, "%s %lu",
mod->name, mod->init_size + mod->core_size);
print_unload_info(m, mod);
+ print_module_info(m, mod);
seq_printf(m, "\n");
return 0;
}

Regards,

Your Sincerely,
Stanley Wang

SW Engineer, Intel Corporation.
Intel China Software Lab.
Tel: 021-52574545 ext. 1171
iNet: 8-752-1171

Opinions expressed are those of the author and do not represent Intel
Corporation
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:32    [W:0.045 / U:2.248 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site