aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2010-12-08 04:25:50 -0500
committerJon Masters <jcm@jonmasters.org>2011-04-13 03:00:29 -0400
commit8605feb954190e0d1d19c6a65713c4e23671cbea (patch)
tree37a555b62d0dbac6b9b5a152864a92492116af1a
parentbe5e163ef53867ef3a12a77f74e05108644e3d01 (diff)
downloadmodule-init-tools-8605feb954190e0d1d19c6a65713c4e23671cbea.tar.gz
depmod/modprobe: localize functions/variables
No reason for these guys to be exported, so mark them all static. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
-rw-r--r--depmod.c14
-rw-r--r--modprobe.c12
2 files changed, 13 insertions, 13 deletions
diff --git a/depmod.c b/depmod.c
index c9a911b..8693ca2 100644
--- a/depmod.c
+++ b/depmod.c
@@ -95,7 +95,7 @@ static const char *skip_symprefix(const char *symname)
return symname + (symname[0] == sym_prefix ? 1 : 0);
}
-void add_symbol(const char *name, uint64_t ver, struct module *owner)
+static void add_symbol(const char *name, uint64_t ver, struct module *owner)
{
unsigned int hash;
struct symbol *new = NOFAIL(malloc(sizeof *new + strlen(name) + 1));
@@ -111,7 +111,7 @@ void add_symbol(const char *name, uint64_t ver, struct module *owner)
static int print_unknown, check_symvers;
-struct module *find_symbol(const char *name, uint64_t ver,
+static struct module *find_symbol(const char *name, uint64_t ver,
const char *modname, int weak)
{
struct symbol *s;
@@ -138,7 +138,7 @@ struct module *find_symbol(const char *name, uint64_t ver,
return NULL;
}
-void add_dep(struct module *mod, struct module *depends_on)
+static void add_dep(struct module *mod, struct module *depends_on)
{
unsigned int i;
@@ -472,7 +472,7 @@ static int output_deps(struct module *modules,
}
/* warn whenever duplicate module aliases, deps, or symbols are found. */
-int warn_dups = 0;
+static int warn_dups = 0;
static int output_deps_bin(struct module *modules,
FILE *out, char *dirname)
@@ -1349,9 +1349,9 @@ static void parse_toplevel_config(const char *filename,
}
/* Local to main, but not freed on exit. Keep valgrind quiet. */
-struct module *list = NULL;
-struct module_search *search = NULL;
-struct module_overrides *overrides = NULL;
+static struct module *list = NULL;
+static struct module_search *search = NULL;
+static struct module_overrides *overrides = NULL;
int main(int argc, char *argv[])
{
diff --git a/modprobe.c b/modprobe.c
index 26a7163..81e950d 100644
--- a/modprobe.c
+++ b/modprobe.c
@@ -49,14 +49,14 @@
#include "testing.h"
-int use_binary_indexes = 1; /* default to enabled. */
+static int use_binary_indexes = 1; /* default to enabled. */
/* Limit do_softdep/do_modprobe recursion.
* This is a simple way to handle dependency loops
* caused by poorly written softdep commands.
*/
static int recursion_depth = 0;
-const int MAX_RECURSION = 50; /* Arbitrary choice */
+static const int MAX_RECURSION = 50; /* Arbitrary choice */
extern long init_module(void *, unsigned long, const char *);
extern long delete_module(const char *, unsigned int);
@@ -709,7 +709,7 @@ static int module_in_kernel(const char *modname, unsigned int *usecount)
return module_in_procfs(modname, usecount);
}
-void dump_modversions(const char *filename, errfn_t error)
+static void dump_modversions(const char *filename, errfn_t error)
{
struct elf_file *module;
@@ -1272,7 +1272,7 @@ out:
}
/* Forward declaration */
-int do_modprobe(const char *modname,
+static int do_modprobe(const char *modname,
const char *cmdline_opts,
const struct modprobe_conf *conf,
const char *dirname,
@@ -1563,7 +1563,7 @@ static int handle_module(const char *modname,
return 0;
}
-int handle_builtin_module(const char *modname,
+static int handle_builtin_module(const char *modname,
errfn_t error,
modprobe_flags_t flags)
{
@@ -1580,7 +1580,7 @@ int handle_builtin_module(const char *modname,
return 0;
}
-int do_modprobe(const char *modname,
+static int do_modprobe(const char *modname,
const char *cmdline_opts,
const struct modprobe_conf *conf,
const char *dirname,