2.5.41: lkcd (2/8): dump notifier

2.5.41: lkcd (2/8): dump notifier

Post by Matt D. Robinso » Fri, 11 Oct 2002 22:10:08



Dump notification additions, similar to panic lists, but for dump
specific modules (per design).

 sys.c |   36 ++++++++++++++++++++++++++++++++++++
 1 files changed, 36 insertions(+)

diff -Naur linux-2.5.41.orig/kernel/sys.c linux-2.5.41.lkcd/kernel/sys.c
--- linux-2.5.41.orig/kernel/sys.c      Mon Oct  7 11:23:25 2002

 #include <linux/device.h>
 #include <linux/times.h>
 #include <linux/security.h>
+#include <linux/dump.h>

 #include <asm/uaccess.h>

  */

 static struct notifier_block *reboot_notifier_list;
+struct notifier_block *dump_notifier_list;
 rwlock_t notifier_lock = RW_LOCK_UNLOCKED;


        return notifier_chain_unregister(&reboot_notifier_list, nb);
 }

+/**
+ *     register_dump_notifier - Register function to be called at dump time

+ *
+ *     Registers a function with the list of functions
+ *     to be called at dump time.
+ *
+ *     Currently always returns zero, as notifier_chain_register
+ *     always returns zero.
+ */
+
+int register_dump_notifier(struct notifier_block * nb)
+{
+       return notifier_chain_register(&dump_notifier_list, nb);
+}
+
+/**
+ *     unregister_dump_notifier - Unregister previously registered dump notifier

+ *
+ *     Unregisters a previously registered dump
+ *     notifier function.
+ *
+ *     Returns zero on success, or %-ENOENT on failure.
+ */
+
+int unregister_dump_notifier(struct notifier_block * nb)
+{
+       return notifier_chain_unregister(&dump_notifier_list, nb);
+}
+
 asmlinkage long sys_ni_syscall(void)
 {

 EXPORT_SYMBOL(unregister_reboot_notifier);
 EXPORT_SYMBOL(in_group_p);
 EXPORT_SYMBOL(in_egroup_p);
+EXPORT_SYMBOL(register_dump_notifier);
+EXPORT_SYMBOL(unregister_dump_notifier);
+EXPORT_SYMBOL(dump_notifier_list);
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/