lkml.org 
[lkml]   [2006]   [Jun]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[PATCH 04/11] Task watchers: Make process events configurable as a module
From
Date
This patch changes process events so that it may be configured as a module. 

Signed-off-by: Matt Helsley <matthltc@us.ibm.com>
Cc: Guillaume Thouvenin <guillaume.thouvenin@bull.net>
--

drivers/connector/Kconfig | 8 ++++----
drivers/connector/cn_proc.c | 18 ++++++++++++++++++
2 files changed, 22 insertions(+), 4 deletions(-)

Index: linux-2.6.17-rc6-mm2/drivers/connector/Kconfig
===================================================================
--- linux-2.6.17-rc6-mm2.orig/drivers/connector/Kconfig
+++ linux-2.6.17-rc6-mm2/drivers/connector/Kconfig
@@ -9,13 +9,13 @@ config CONNECTOR

Connector support can also be built as a module. If so, the module
will be called cn.ko.

config PROC_EVENTS
- boolean "Report process events to userspace"
- depends on CONNECTOR=y
- default y
- ---help---
+ tristate "Report process events to userspace"
+ default m
+ depends on CONNECTOR
+ help
Provide a connector that reports process events to userspace. Send
events such as fork, exec, id change (uid, gid, suid, etc), and exit.

endmenu
Index: linux-2.6.17-rc6-mm2/drivers/connector/cn_proc.c
===================================================================
--- linux-2.6.17-rc6-mm2.orig/drivers/connector/cn_proc.c
+++ linux-2.6.17-rc6-mm2/drivers/connector/cn_proc.c
@@ -224,6 +224,24 @@ static int __init cn_proc_init(void)
cn_del_callback(&cn_proc_event_id);
out:
return err;
}

+static void cn_proc_fini(void)
+{
+ int err;
+
+ err = unregister_task_watcher(&cn_proc_nb);
+ if (err != 0)
+ printk(KERN_WARNING
+ "cn_proc failed to unregister its task notify block\n");
+
+ cn_del_callback(&cn_proc_event_id);
+}
+
module_init(cn_proc_init);
+module_exit(cn_proc_fini);
+
+MODULE_AUTHOR("Matt Helsley <matthltc@us.ibm.com>");
+MODULE_LICENSE("GPL");
+MODULE_DESCRIPTION("Notification of process events.");
+MODULE_VERSION("2:1.0");
--

-
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: 2006-06-14 02:05    [W:0.029 / U:3.412 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site