[6889] in Athena Bugs
RT /dev/MAKEDEV
daemon@ATHENA.MIT.EDU (daemon@ATHENA.MIT.EDU)
Mon Jan 14 03:42:19 1991
To: bugs@ATHENA.MIT.EDU
Date: Mon, 14 Jan 91 03:42:04 EST
From: John Carr <jfc@ATHENA.MIT.EDU>
Here is a replacement for RT /etc/reboot:
#include <sys/file.h>
main()
{
open("/dev/bus", O_RDWR);
*(short *)0xf0008400 = 0x6000;
*(short *)0xf0008400 = 0x6100;
}
This has 2 advantages over the current version: it is much smaller, and it
does not have to be run as root. There is one remaining bug: writing 0x6100
to the keyboard control register should force a reboot without sync (exactly
like pressing CTRL-ALT-PAUSE), but it doesn't. Instead, it causes a panic
which syncs the disks. I'm not sure if the documentation is at fault, or if
I am sending the command to the keyboard incorrectly.