/*
hardreboot
Copyright (C) 2004 Dennis Noermann
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
This is a REAL hardreboot !! USE IT ON YOUR OWN RISC !!
After insmodding this module your system will reboot
hard, without doing any prozess killing or disk syncing
Itīs done for systems that having some D prozesses
(Interuptable Sleep e.g. waiting for IO that is never comming)
such a system is never rebootable via shutdown -r now
cause reboot will wait till all prozesses are done
but fucking D prozesses (e.g. caused by a hardware disk fault)
will never be done .....
compile line:
gcc -D__KERNEL__ -DMODULE -I/usr/src/linux/include/ -c -o hardreboot.o hardreboot.c
*/
#include
#include
#include
int init_module(void)
{
printk("hardreboot forced !\n");
printk("hardreboot forced !\n");
printk("hardreboot forced !\n");
machine_restart(NULL);
return 0;
}
MODULE_DESCRIPTION("hardreboot");
MODULE_AUTHOR("Dennis Noermann");
MODULE_LICENSE("GPL");