[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1383201061-5940-1-git-send-email-gaofeng@cn.fujitsu.com>
Date: Thu, 31 Oct 2013 14:31:01 +0800
From: Gao feng <gaofeng@...fujitsu.com>
To: linux-audit@...hat.com
Cc: linux-kernel@...r.kernel.org, rgb@...hat.com,
Gao feng <gaofeng@...fujitsu.com>
Subject: [PATCH v2] audit: remove useless code in audit_enable
Since kernel parameter is operated before
initcall, so the audit_initialized must be
AUDIT_UNINITIALIZED or DISABLED in audit_enable.
Signed-off-by: Gao feng <gaofeng@...fujitsu.com>
---
kernel/audit.c | 13 ++-----------
1 file changed, 2 insertions(+), 11 deletions(-)
change from v1:
convert "printk(KERN_INFO " to "pr_info(".
thanks Richard for pointing out.
diff --git a/kernel/audit.c b/kernel/audit.c
index 8378c5e..7c7c028 100644
--- a/kernel/audit.c
+++ b/kernel/audit.c
@@ -1038,17 +1038,8 @@ static int __init audit_enable(char *str)
if (!audit_default)
audit_initialized = AUDIT_DISABLED;
- printk(KERN_INFO "audit: %s", audit_default ? "enabled" : "disabled");
-
- if (audit_initialized == AUDIT_INITIALIZED) {
- audit_enabled = audit_default;
- audit_ever_enabled |= !!audit_default;
- } else if (audit_initialized == AUDIT_UNINITIALIZED) {
- printk(" (after initialization)");
- } else {
- printk(" (until reboot)");
- }
- printk("\n");
+ pr_info("audit: %s\n", audit_default ?
+ "enabled (after initialization)" : "disabled (until reboot)");
return 1;
}
--
1.8.3.1
--
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