I'm not going to comment on the idea, just the implementation. Eww.
First point is that this has no business being in kernel/sys.c - it
belongs in the ide layer, not the generic kernel.
Secondly, you have this wonderous reboot notifier list which you can
arbitarily register functions with throughout the kernel, and they
will get called prior to halt/reboot. You should be using this, via
the register_reboot_notifier() hooks.
--
Russell King (rmk@arm.linux.org.uk) The developer of ARM Linux
http://www.arm.linux.org.uk/personal/aboutme.html
-
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/