2004-09-22 07:51:30

by manomugdha biswas

[permalink] [raw]
Subject: shutdown process

Hi all,
I have written a module and loaded into kernel by
insmod. I want to let my module know when the system
is shutdown. How to let my module know that the system
is going to shutdown??

Thanks and Regards,
Manomugdha

=====
Manomugdha Biswas

________________________________________________________________________
Yahoo! India Matrimony: Find your life partner online
Go to: http://yahoo.shaadi.com/india-matrimony


2004-09-22 20:52:21

by Randy.Dunlap

[permalink] [raw]
Subject: Re: shutdown process

On Wed, 22 Sep 2004 08:51:26 +0100 (BST) manomugdha biswas wrote:

| Hi all,
| I have written a module and loaded into kernel by
| insmod. I want to let my module know when the system
| is shutdown. How to let my module know that the system
| is going to shutdown??


See sig. Answering for Linux 2.6.x, but it looks like almost
no changes here from 2.4 to 2.6:


Call notifier_chain_register(&reboot_notifier_list, &notif_block);
or
register_reboot_notifier(&notif_block);


--
~Randy
MOTD: Always include version info.
(Again. Sometimes I think ln -s /usr/src/linux/.config .signature)