From: Jacob Potter Date: Mon, 6 Oct 2008 09:42:13 +0000 (-0400) Subject: add magic reboot butan X-Git-Url: http://git.joshuawise.com/netwatch.git/commitdiff_plain/31e64b0823ea0d48dd13ae7bac80476c7a7f85b5?ds=sidebyside;hp=--cc add magic reboot butan --- 31e64b0823ea0d48dd13ae7bac80476c7a7f85b5 diff --git a/net/net.c b/net/net.c index 46ea9cd..eac5d0e 100644 --- a/net/net.c +++ b/net/net.c @@ -44,10 +44,14 @@ void handle_command(packet_t * p) outputf("NIC: Command: 0x%x, %d bytes", p->command, dl); - if (p->command == 0x42) - { + switch (p->command) { + case 0x42: for (i = 0; i < dl; i++) kbd_inject_key(p->data[i]); + break; + case 0xFE: + outb(0xCF9, 0x4); /* Reboot */ + break; } }