Skip to contentSkip to conversation

XenLinux restart/poweroff calls 'reboot' or 'poweroff'

Xen-changelog aq 1 participant 1 message Jul 26, 2005 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

aq

author
#1 lore raw
Quoted 8 lines · Xen patchbot -unstable

# HG changeset patch
# User [email protected]
# Node ID 9a936ba5cde0f2b33226e23c8c735f1b25924494 # Parent 6feba419cead1e49909c32dc111e2c8dedfac32e

XenLinux restart/poweroff calls 'reboot' or 'poweroff' as appropriate.

oops, this patch failed to fix other refers to halt and shutdown in the same file. Please take the following patch.

And please get the patch for -testing, too.

linux-2.6-xen-sparse/arch/xen/kernel/reboot.c +2 -2
diff -r ecb17ef5a587 linux-2.6-xen-sparse/arch/xen/kernel/reboot.c
@@ -187,7 +187,7 @@
     switch ( shutting_down )
     {
     case CMSG_SHUTDOWN_POWEROFF:
-        if ( execve("/sbin/halt", poweroff_argv, envp) < 0 )
+        if ( execve("/sbin/poweroff", poweroff_argv, envp) < 0 )
         {
             sys_reboot(LINUX_REBOOT_MAGIC1,
                        LINUX_REBOOT_MAGIC2,
@@ -197,7 +197,7 @@
         break;
 
     case CMSG_SHUTDOWN_REBOOT:
-        if ( execve("/sbin/shutdown", restart_argv, envp) < 0 )
+        if ( execve("/sbin/reboot", restart_argv, envp) < 0 )
         {
             sys_reboot(LINUX_REBOOT_MAGIC1,
                        LINUX_REBOOT_MAGIC2,
linux-2.6.11-xen-sparse/arch/xen/kernel/reboot.c +4 -4
diff -r 026436ebd99c linux-2.6.11-xen-sparse/arch/xen/kernel/reboot.c
@@ -159,8 +159,8 @@
 {
     static char *envp[] = { "HOME=/", "TERM=linux", 
                             "PATH=/sbin:/usr/sbin:/bin:/usr/bin", NULL };
-    static char *restart_argv[]  = { "/sbin/shutdown", "-r", "now", NULL };
-    static char *poweroff_argv[] = { "/sbin/halt",     "-p",        NULL };
+    static char *restart_argv[]  = { "/sbin/reboot", NULL };
+    static char *poweroff_argv[] = { "/sbin/poweroff", NULL };
 
     extern asmlinkage long sys_reboot(int magic1, int magic2,
                                       unsigned int cmd, void *arg);
@@ -174,7 +174,7 @@
     switch ( shutting_down )
     {
     case CMSG_SHUTDOWN_POWEROFF:
-        if ( execve("/sbin/halt", poweroff_argv, envp) < 0 )
+        if ( execve("/sbin/poweroff", poweroff_argv, envp) < 0 )
         {
             sys_reboot(LINUX_REBOOT_MAGIC1,
                        LINUX_REBOOT_MAGIC2,
@@ -184,7 +184,7 @@
         break;
 
     case CMSG_SHUTDOWN_REBOOT:
-        if ( execve("/sbin/shutdown", restart_argv, envp) < 0 )
+        if ( execve("/sbin/reboot", restart_argv, envp) < 0 )
         {
             sys_reboot(LINUX_REBOOT_MAGIC1,
                        LINUX_REBOOT_MAGIC2,

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel