From: liguang <lig.fnst@cn.fujitsu.com>
To: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>,
David Howells <dhowells@redhat.com>,
Thomas Gleixner <tglx@linutronix.de>,
Andrew Morton <akpm@linux-foundation.org>
Cc: Michael Kerrisk <mtk.manpages@gmail.com>,
Dave Jones <davej@redhat.com>, Kees Cook <keescook@chromium.org>,
Cyrill Gorcunov <gorcunov@openvz.org>,
Al Viro <viro@zeniv.linux.org.uk>,
liguang <lig.fnst@cn.fujitsu.com>,
linux-kernel@vger.kernel.org
Subject: [PATCH 3/4] sys/reboot: boolize C_A_D
Date: Thu, 30 May 2013 15:58:05 +0800 [thread overview]
Message-ID: <1369900686-5936-3-git-send-email-lig.fnst@cn.fujitsu.com> (raw)
In-Reply-To: <1369900686-5936-1-git-send-email-lig.fnst@cn.fujitsu.com>
Signed-off-by: liguang <lig.fnst@cn.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
next prev parent reply other threads:[~2013-05-30 7:59 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-30 7:58 [PATCH 1/4] sys: remove unnecesscary parameter of set_one_prio liguang
2013-05-30 7:58 ` [PATCH 2/4] sys: remove kernel_shutdown_prepare's parameter liguang
2013-05-31 22:58 ` Andrew Morton
2013-05-30 7:58 ` liguang [this message]
2013-05-31 23:02 ` [PATCH 3/4] sys/reboot: boolize C_A_D Andrew Morton
2013-06-03 0:25 ` li guang
2013-06-03 1:09 ` Joe Perches
2013-05-30 7:58 ` [PATCH 4/4] sys: fix malformed panic massage of reboot liguang
2013-05-30 8:08 ` [PATCH 1/4] sys: remove unnecesscary parameter of set_one_prio Joe Perches
2013-05-31 23:07 ` Andrew Morton
2013-05-31 22:53 ` Andrew Morton
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1369900686-5936-3-git-send-email-lig.fnst@cn.fujitsu.com \
--to=lig.fnst@cn.fujitsu.com \
--cc=akpm@linux-foundation.org \
--cc=davej@redhat.com \
--cc=dhowells@redhat.com \
--cc=gorcunov@openvz.org \
--cc=keescook@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mtk.manpages@gmail.com \
--cc=paulmck@linux.vnet.ibm.com \
--cc=tglx@linutronix.de \
--cc=viro@zeniv.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®