Move reboot() and power_off() to new file, and rename to fit convention.
[pintos-anon] / solutions / p3.patch
index a7dafb2adf3d8fd0148148ce16bf776399f179ea..b0d0bf3c617bf19faa01164076eac1ddda1943a4 100644 (file)
@@ -809,10 +809,10 @@ diff -u src/userprog/syscall.c~ src/userprog/syscall.c
 +#include "userprog/process.h"
 +#include "userprog/pagedir.h"
 +#include "devices/input.h"
++#include "devices/shutdown.h"
 +#include "filesys/directory.h"
 +#include "filesys/filesys.h"
 +#include "filesys/file.h"
-+#include "threads/init.h"
  #include "threads/interrupt.h"
 +#include "threads/malloc.h"
 +#include "threads/palloc.h"
@@ -979,7 +979,7 @@ diff -u src/userprog/syscall.c~ src/userprog/syscall.c
 +static int
 +sys_halt (void)
 +{
-+  power_off ();
++  shutdown_power_off ();
 +}
 + 
 +/* Exit system call. */