#include <stdlib.h>
#include <string.h>
#include "devices/kbd.h"
+#include "devices/input.h"
#include "devices/serial.h"
#include "devices/timer.h"
#include "devices/vga.h"
bool enable_mlfqs;
#ifdef FILESYS
-/* -f: Format the filesystem? */
+/* -f: Format the file system? */
static bool format_filesys;
#endif
argv = read_command_line ();
argv = parse_options (argv);
+ /* Set random seed if parse_options() didn't. */
+ random_init (0);
+
/* Initialize memory system. */
palloc_init ();
malloc_init ();
gdt_init ();
#endif
- /* Set random seed if parse_options() didn't. */
- random_init (0);
-
/* Initialize interrupt handlers. */
intr_init ();
timer_init ();
kbd_init ();
+ input_init ();
#ifdef USERPROG
exception_init ();
syscall_init ();
timer_calibrate ();
#ifdef FILESYS
- /* Initialize filesystem. */
+ /* Initialize file system. */
disk_init ();
filesys_init (format_filesys);
#endif
/* Print kernel command line. */
printf ("Kernel command line:");
for (i = 0; i < argc; i++)
- printf (" %s", argv[i]);
+ if (strchr (argv[i], ' ') == NULL)
+ printf (" %s", argv[i]);
+ else
+ printf (" '%s'", argv[i]);
printf ("\n");
return argv;
/* Powers down the machine we're running on,
- as long as we're running on Bochs or qemu. */
+ as long as we're running on Bochs or QEMU. */
void
power_off (void)
{
for (p = s; *p != '\0'; p++)
outb (0x8900, *p);
+ asm ("cli; hlt");
+ printf ("still running...\n");
for (;;);
}