lkml.org 
[lkml]   [2004]   [Dec]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[2.6 patch] kernel/audit.c: make some functions static
The patch below makes some needlessly global functions static.


diffstat output:
include/linux/audit.h | 12 ------------
kernel/audit.c | 17 ++++++++++-------
2 files changed, 10 insertions(+), 19 deletions(-)


Signed-off-by: Adrian Bunk <bunk@stusta.de>

--- linux-2.6.10-rc2-mm4-full/include/linux/audit.h.old 2004-12-12 02:41:04.000000000 +0100
+++ linux-2.6.10-rc2-mm4-full/include/linux/audit.h 2004-12-12 02:42:48.000000000 +0100
@@ -177,16 +177,10 @@
const char *fmt, ...)
__attribute__((format(printf,2,3)));
extern void audit_log_end(struct audit_buffer *ab);
-extern void audit_log_end_fast(struct audit_buffer *ab);
-extern void audit_log_end_irq(struct audit_buffer *ab);
extern void audit_log_d_path(struct audit_buffer *ab,
const char *prefix,
struct dentry *dentry,
struct vfsmount *vfsmnt);
-extern int audit_set_rate_limit(int limit);
-extern int audit_set_backlog_limit(int limit);
-extern int audit_set_enabled(int state);
-extern int audit_set_failure(int state);

/* Private API (for auditsc.c only) */
extern void audit_send_reply(int pid, int seq, int type,
@@ -199,13 +193,7 @@
#define audit_log_vformat(b,f,a) do { ; } while (0)
#define audit_log_format(b,f,...) do { ; } while (0)
#define audit_log_end(b) do { ; } while (0)
-#define audit_log_end_fast(b) do { ; } while (0)
-#define audit_log_end_irq(b) do { ; } while (0)
#define audit_log_d_path(b,p,d,v) do { ; } while (0)
-#define audit_set_rate_limit(l) do { ; } while (0)
-#define audit_set_backlog_limit(l) do { ; } while (0)
-#define audit_set_enabled(s) do { ; } while (0)
-#define audit_set_failure(s) do { ; } while (0)
#endif
#endif
#endif
--- linux-2.6.10-rc2-mm4-full/kernel/audit.c.old 2004-12-12 02:40:08.000000000 +0100
+++ linux-2.6.10-rc2-mm4-full/kernel/audit.c 2004-12-12 02:42:52.000000000 +0100
@@ -150,6 +150,9 @@
struct audit_rule rule;
};

+static void audit_log_end_irq(struct audit_buffer *ab);
+static void audit_log_end_fast(struct audit_buffer *ab);
+
static void audit_panic(const char *message)
{
switch (audit_failure)
@@ -231,7 +234,7 @@

}

-int audit_set_rate_limit(int limit)
+static int audit_set_rate_limit(int limit)
{
int old = audit_rate_limit;
audit_rate_limit = limit;
@@ -240,7 +243,7 @@
return old;
}

-int audit_set_backlog_limit(int limit)
+static int audit_set_backlog_limit(int limit)
{
int old = audit_backlog_limit;
audit_backlog_limit = limit;
@@ -249,7 +252,7 @@
return old;
}

-int audit_set_enabled(int state)
+static int audit_set_enabled(int state)
{
int old = audit_enabled;
if (state != 0 && state != 1)
@@ -260,7 +263,7 @@
return old;
}

-int audit_set_failure(int state)
+static int audit_set_failure(int state)
{
int old = audit_failure;
if (state != AUDIT_FAIL_SILENT
@@ -523,7 +526,7 @@
}

/* Initialize audit support at boot time. */
-int __init audit_init(void)
+static int __init audit_init(void)
{
printk(KERN_INFO "audit: initializing netlink socket (%s)\n",
audit_default ? "enabled" : "disabled");
@@ -744,7 +747,7 @@
* the audit buffer is places on a queue and a tasklet is scheduled to
* remove them from the queue outside the irq context. May be called in
* any context. */
-void audit_log_end_irq(struct audit_buffer *ab)
+static void audit_log_end_irq(struct audit_buffer *ab)
{
unsigned long flags;

@@ -759,7 +762,7 @@

/* Send the message in the audit buffer directly to user space. May not
* be called in an irq context. */
-void audit_log_end_fast(struct audit_buffer *ab)
+static void audit_log_end_fast(struct audit_buffer *ab)
{
unsigned long flags;

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:08    [W:0.042 / U:1.596 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site