Move reboot() and power_off() to new file, and rename to fit convention.
[pintos-anon] / solutions / p2.patch
index 88f7cb7ae3dce44a10a1d3922fef684fc10980d2..41f6764d445a0c27b2218abffec0bc202f95cf01 100644 (file)
@@ -500,9 +500,9 @@ 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/filesys.h"
 +#include "filesys/file.h"
-+#include "threads/init.h"
  #include "threads/interrupt.h"
 +#include "threads/malloc.h"
 +#include "threads/palloc.h"
@@ -672,7 +672,7 @@ diff -u src/userprog/syscall.c~ src/userprog/syscall.c
 +static int
 +sys_halt (void)
 +{
-+  power_off ();
++  shutdown_power_off ();
 +}
 + 
 +/* Exit system call. */