[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1369900686-5936-3-git-send-email-lig.fnst@cn.fujitsu.com>
Date: Thu, 30 May 2013 15:58:05 +0800
From: liguang <lig.fnst@...fujitsu.com>
To: "Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>,
David Howells <dhowells@...hat.com>,
Thomas Gleixner <tglx@...utronix.de>,
Andrew Morton <akpm@...ux-foundation.org>
Cc: Michael Kerrisk <mtk.manpages@...il.com>,
Dave Jones <davej@...hat.com>,
Kees Cook <keescook@...omium.org>,
Cyrill Gorcunov <gorcunov@...nvz.org>,
Al Viro <viro@...iv.linux.org.uk>,
liguang <lig.fnst@...fujitsu.com>, linux-kernel@...r.kernel.org
Subject: [PATCH 3/4] sys/reboot: boolize C_A_D
Signed-off-by: liguang <lig.fnst@...fujitsu.com>
---
include/linux/reboot.h | 2 +-
kernel/sys.c | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/include/linux/reboot.h b/include/linux/reboot.h
index 23b3630..a8c5e4c 100644
--- a/include/linux/reboot.h
+++ b/include/linux/reboot.h
@@ -35,7 +35,7 @@ extern void kernel_restart(char *cmd);
extern void kernel_halt(void);
extern void kernel_power_off(void);
-extern int C_A_D; /* for sysctl */
+extern bool C_A_D; /* for sysctl */
void ctrl_alt_del(void);
#define POWEROFF_CMD_PATH_LEN 256
diff --git a/kernel/sys.c b/kernel/sys.c
index 7f56ed4..6dabfc1 100644
--- a/kernel/sys.c
+++ b/kernel/sys.c
@@ -119,7 +119,7 @@ EXPORT_SYMBOL(fs_overflowgid);
* this indicates whether you can reboot with ctrl-alt-del: the default is yes
*/
-int C_A_D = 1;
+bool C_A_D = true;
struct pid *cad_pid;
EXPORT_SYMBOL(cad_pid);
@@ -475,11 +475,11 @@ SYSCALL_DEFINE4(reboot, int, magic1, int, magic2, unsigned int, cmd,
break;
case LINUX_REBOOT_CMD_CAD_ON:
- C_A_D = 1;
+ C_A_D = true;
break;
case LINUX_REBOOT_CMD_CAD_OFF:
- C_A_D = 0;
+ C_A_D = false;
break;
case LINUX_REBOOT_CMD_HALT:
--
1.7.2.5
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists