[parisc-linux-cvs] fix the shutdown/reboot messages.

Helge Deller deller@gmx.de
Thu, 27 Jun 2002 23:36:06 +0200


--Boundary-00=_GV4G9+SNiP1WVNk
Content-Type: text/plain;
  charset="iso-8859-1"
Content-Transfer-Encoding: 8bit
Content-Disposition: inline

On Thursday 27 June 2002 23:34, Helge Deller wrote:
> CVSROOT:	/var/cvs
> Module name:	linux
> Changes by:	deller	02/06/27 15:34:45
>
> Modified files:
> 	arch/parisc/kernel: power.c process.c
>
> Log message:
> fix the shutdown/reboot messages.


--Boundary-00=_GV4G9+SNiP1WVNk
Content-Type: text/plain;
  charset="iso-8859-1";
  name="diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline; filename="diff"

Index: power.c
===================================================================
RCS file: /var/cvs/linux/arch/parisc/kernel/power.c,v
retrieving revision 1.9
diff -u -p -r1.9 power.c
--- power.c	2002/06/26 22:20:32	1.9
+++ power.c	2002/06/27 21:32:19
@@ -56,6 +56,13 @@
 #include <asm/uaccess.h>
 
 
+#ifdef DEBUG
+# define DPRINTK(x) printk x
+#else
+# define DPRINTK(x) do { } while (0)
+#endif
+
+
 /* filename in /proc which can be used to enable/disable the power switch */
 #define SYSCTL_FILENAME		"sys/kernel/power"
 
@@ -117,14 +124,14 @@ static int shutdown_timer;
 static void process_shutdown(void)
 {
 	if (shutdown_timer == 0)
-		printk(KERN_INFO "Shutdown requested...\n");
+		DPRINTK((KERN_INFO "Shutdown requested...\n"));
 
 	shutdown_timer++;
 	
 	/* wait until the button was pressed for 1 second */
 	if (shutdown_timer == HZ) {
 		static char msg[] = "Shutting down...";
-		printk(KERN_INFO "%s\n", msg);
+		DPRINTK((KERN_INFO "%s\n", msg));
 #ifdef CONFIG_CHASSIS_LCD_LED
 		lcd_print(msg);
 #endif
Index: process.c
===================================================================
RCS file: /var/cvs/linux/arch/parisc/kernel/process.c,v
retrieving revision 1.41
diff -u -p -r1.41 process.c
--- process.c	2002/04/06 22:14:57	1.41
+++ process.c	2002/06/27 21:32:19
@@ -152,6 +152,9 @@ void machine_power_off(void)
 
 	/* It seems we have no way to power the system off via
 	 * software. The user has to press the button himself. */
+
+	printk(KERN_EMERG "System shut down completed.\n"
+	       KERN_EMERG "Please power this system off now.");
 }
 
 

--Boundary-00=_GV4G9+SNiP1WVNk--