aboutsummaryrefslogtreecommitdiffstats
path: root/nlplug-findfs.c
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2015-10-23 09:46:13 +0300
committerTimo Teräs <timo.teras@iki.fi>2015-10-23 09:46:13 +0300
commit79c534fc67e03ef1f0b948b548fbbc40a5d53296 (patch)
treeee36f5dd6fecf053bafb9e7f7b9f5d1fcac37dbf /nlplug-findfs.c
parentaed3dc48211946eeaa66761017f88756bc8f742e (diff)
downloadmkinitfs-79c534fc67e03ef1f0b948b548fbbc40a5d53296.tar.bz2
mkinitfs-79c534fc67e03ef1f0b948b548fbbc40a5d53296.tar.xz
nlplug-findfs: make all functions static
Diffstat (limited to 'nlplug-findfs.c')
-rw-r--r--nlplug-findfs.c30
1 files changed, 14 insertions, 16 deletions
diff --git a/nlplug-findfs.c b/nlplug-findfs.c
index 1a5f7e7..f42e34e 100644
--- a/nlplug-findfs.c
+++ b/nlplug-findfs.c
@@ -156,7 +156,7 @@ static int init_netlink_socket(void)
return fd;
}
-void run_child(char **argv, char **envp)
+static void run_child(char **argv, char **envp)
{
pid_t pid;
@@ -173,7 +173,7 @@ void run_child(char **argv, char **envp)
}
-int load_kmod(const char *modalias)
+static int load_kmod(const char *modalias)
{
static struct kmod_ctx *ctx = NULL;
struct kmod_list *list = NULL;
@@ -216,7 +216,7 @@ int load_kmod(const char *modalias)
return count;
}
-void start_mdadm(char *devnode)
+static void start_mdadm(char *devnode)
{
char *mdadm_argv[] = {
"/sbin/mdadm",
@@ -228,7 +228,7 @@ void start_mdadm(char *devnode)
run_child(mdadm_argv, default_envp);
}
-void start_lvm2(char *devnode)
+static void start_lvm2(char *devnode)
{
char *lvm2_argv[] = {
"/sbin/lvm", "vgchange",
@@ -238,7 +238,7 @@ void start_lvm2(char *devnode)
run_child(lvm2_argv, default_envp);
}
-void start_cryptsetup(char *devnode, char *cryptdm)
+static void start_cryptsetup(char *devnode, char *cryptdm)
{
char *cryptsetup_argv[] = {
"/sbin/cryptsetup", "luksOpen",
@@ -272,7 +272,7 @@ struct recurse_opts {
};
/* pathbuf needs hold PATH_MAX chars */
-void recurse_dir(char *pathbuf, struct recurse_opts *opts)
+static void recurse_dir(char *pathbuf, struct recurse_opts *opts)
{
DIR *d = opendir(pathbuf);
struct dirent *entry;
@@ -330,7 +330,7 @@ struct bootrepos {
int count;
};
-void bootrepo_cb(const char *path, const void *data)
+static void bootrepo_cb(const char *path, const void *data)
{
struct bootrepos *repos = (struct bootrepos *)data;
int fd = open(repos->outfile, O_WRONLY | O_CREAT | O_APPEND);
@@ -423,8 +423,8 @@ static int find_bootrepos(const char *devnode, const char *type,
return rc;
}
-int searchdev(char *devname, const char *searchdev, char *bootrepos,
- const char *apkovls)
+static int searchdev(char *devname, const char *searchdev, char *bootrepos,
+ const char *apkovls)
{
static blkid_cache cache = NULL;
char *type = NULL, *label = NULL, *uuid = NULL;
@@ -487,7 +487,7 @@ int searchdev(char *devname, const char *searchdev, char *bootrepos,
return rc;
}
-int dispatch_uevent(struct uevent *ev, struct ueventconf *conf)
+static int dispatch_uevent(struct uevent *ev, struct ueventconf *conf)
{
static int timeout_increment = USB_STORAGE_TIMEOUT;
@@ -534,7 +534,7 @@ int dispatch_uevent(struct uevent *ev, struct ueventconf *conf)
return 0;
}
-int process_uevent(char *buf, const size_t len, struct ueventconf *conf)
+static int process_uevent(char *buf, const size_t len, struct ueventconf *conf)
{
struct uevent ev;
@@ -587,14 +587,14 @@ int process_uevent(char *buf, const size_t len, struct ueventconf *conf)
return dispatch_uevent(&ev, conf);
}
-void trigger_uevent_cb(const char *path, const void *data)
+static void trigger_uevent_cb(const char *path, const void *data)
{
int fd = open(path, O_WRONLY);
write(fd, "add", 3);
close(fd);
}
-void *trigger_thread(void *data)
+static void *trigger_thread(void *data)
{
int fd = *(int *)data;
uint64_t ok = 1;
@@ -612,7 +612,7 @@ void *trigger_thread(void *data)
return NULL;
}
-void usage(int rc)
+static void usage(int rc)
{
printf("coldplug system til given device is found\n"
"usage: %s [options] DEVICE\n"
@@ -783,5 +783,3 @@ int main(int argc, char *argv[])
return found ? 0 : 1;
}
-
-