- return make_seg_desc ((uint32_t) vaddr,
- 0x67, SYS_SYSTEM, TYPE_TSS_32_A, 0, GRAN_BYTE);
-}
+ for (; *argv != NULL && **argv == '-'; argv++)
+ {
+ char *save_ptr;
+ char *name = strtok_r (*argv, "=", &save_ptr);
+ char *value = strtok_r (NULL, "", &save_ptr);
+
+ if (!strcmp (name, "-h"))
+ usage ();
+ else if (!strcmp (name, "-q"))
+ shutdown_configure (SHUTDOWN_POWER_OFF);
+ else if (!strcmp (name, "-r"))
+ shutdown_configure (SHUTDOWN_REBOOT);
+#ifdef FILESYS
+ else if (!strcmp (name, "-f"))
+ format_filesys = true;
+ else if (!strcmp (name, "-filesys"))
+ filesys_bdev_name = value;
+ else if (!strcmp (name, "-scratch"))
+ scratch_bdev_name = value;
+#ifdef VM
+ else if (!strcmp (name, "-swap"))
+ swap_bdev_name = value;
+#endif
+#endif
+ else if (!strcmp (name, "-rs"))
+ random_init (atoi (value));
+ else if (!strcmp (name, "-mlfqs"))
+ thread_mlfqs = true;
+#ifdef USERPROG
+ else if (!strcmp (name, "-ul"))
+ user_page_limit = atoi (value);
+#endif
+ else
+ PANIC ("unknown option `%s' (use -h for help)", name);
+ }