aboutsummaryrefslogtreecommitdiffstats
path: root/package/kexec/kexec-tools-001-smaller-reboot.patch
blob: e29f3fc09c88043b02f4b13baf8c63a87b4862b5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
--- kexec-tools-1.101.orig/kexec/kexec.c	2006-09-20 04:39:38.000000000 +0200
+++ kexec-tools-1.101/kexec/kexec.c	2007-01-22 15:58:30.000000000 +0100
@@ -630,19 +630,14 @@ int k_unload (unsigned long kexec_flags)
  */
 static int my_shutdown(void)
 {
-	char *args[8];
-	int i = 0;
+	char *args[2];
 
-	args[i++] = "shutdown";
-	args[i++] = "-r";
-	args[i++] = "now";
-	args[i++] = NULL;
+	args[0] = "reboot";
+	args[1] = NULL;
 
-	execv("/sbin/shutdown", args);
-	execv("/etc/shutdown", args);
-	execv("/bin/shutdown", args);
+	execv("/sbin/reboot", args);
 
-	perror("shutdown");
+	perror("reboot");
 	return -1;
 }