X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?p=pintos-anon;a=blobdiff_plain;f=src%2Fdevices%2Fshutdown.c;h=4c978f970216169d69b34d061ae7c1c3d746f857;hp=fbc662b01c095edc25741ea265e5a01fe52e0c78;hb=9a4067dc5bd3d810ce4b1d9dd8ba394dee4c247b;hpb=53641f9bb07aa127b2b5e402e28b7421ce8a7f3b diff --git a/src/devices/shutdown.c b/src/devices/shutdown.c index fbc662b..4c978f9 100644 --- a/src/devices/shutdown.c +++ b/src/devices/shutdown.c @@ -23,19 +23,17 @@ static void print_stats (void); void shutdown_reboot (void) { - int i; - printf ("Rebooting...\n"); /* See [kbd] for details on how to program the keyboard * controller. */ - for (i = 0; i < 100; i++) + for (;;) { - int j; + int i; /* Poll keyboard controller's status byte until * 'input buffer empty' is reported. */ - for (j = 0; j < 0x10000; j++) + for (i = 0; i < 0x10000; i++) { if ((inb (CONTROL_REG) & 0x02) == 0) break;