aboutsummaryrefslogtreecommitdiffstats
path: root/nlplug-findfs.c
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2015-10-08 10:31:22 +0200
committerNatanael Copa <ncopa@alpinelinux.org>2015-10-08 10:31:22 +0200
commit68f3f4c54fca41b2e59a82ec6e21d12d6d4e9648 (patch)
treedfac2b2d0a3d169fe8b102fd1e65b0046890486a /nlplug-findfs.c
parent7406c21a7a7c662d283bead6e594e3efb176c1c6 (diff)
downloadmkinitfs-68f3f4c54fca41b2e59a82ec6e21d12d6d4e9648.tar.bz2
mkinitfs-68f3f4c54fca41b2e59a82ec6e21d12d6d4e9648.tar.xz
nlplug-findfs: remove mountdir option
We will need set optional mount options, so we better do the mount from script.
Diffstat (limited to 'nlplug-findfs.c')
-rw-r--r--nlplug-findfs.c23
1 files changed, 6 insertions, 17 deletions
diff --git a/nlplug-findfs.c b/nlplug-findfs.c
index 9ba2874..100141a 100644
--- a/nlplug-findfs.c
+++ b/nlplug-findfs.c
@@ -78,7 +78,6 @@ struct ueventconf {
char *search_device;
char *crypt_device;
char *crypt_name;
- char *mountpoint;
char *subsystem_filter;
int modalias_count;
int fork_count;
@@ -386,8 +385,8 @@ static int find_bootrepos(const char *devnode, const char *type,
return rc;
}
-int searchdev(char *devname, const char *searchdev, const char *mountpoint,
- char *bootrepos, const char *apkovls)
+int searchdev(char *devname, const char *searchdev, char *bootrepos,
+ const char *apkovls)
{
static blkid_cache cache = NULL;
char *type = NULL, *label = NULL, *uuid = NULL;
@@ -439,10 +438,6 @@ int searchdev(char *devname, const char *searchdev, const char *mountpoint,
}
}
- if (rc && type && mountpoint)
- if (mount(devnode, mountpoint, type, MS_RDONLY, NULL))
- err(1, "mount %s on %s", devnode, mountpoint);
-
if (type)
free(type);
if (label)
@@ -482,13 +477,12 @@ int dispatch_uevent(struct uevent *ev, struct ueventconf *conf)
snprintf(ev->devnode, sizeof(ev->devnode), "/dev/%s",
ev->devname);
rc = searchdev(ev->devname, conf->search_device,
- conf->mountpoint, conf->bootrepos,
- conf->apkovls);
+ conf->bootrepos, conf->apkovls);
if (rc)
return rc;
- if (searchdev(ev->devname, conf->crypt_device,
- NULL, NULL, 0))
+ if (searchdev(ev->devname, conf->crypt_device, NULL,
+ NULL))
start_cryptsetup(ev->devnode, conf->crypt_name);
}
}
@@ -572,9 +566,7 @@ void *trigger_thread(void *data)
void usage(int rc)
{
printf("coldplug system til given device is found\n"
- "usage: %s [options] DEVICE [DIR]\n"
- "\n"
- "If DIR is specified the found DEVICE will be mounted on DIR\n"
+ "usage: %s [options] DEVICE\n"
"\n"
"options:\n"
" -a OUTFILE add paths to found apkovls to OUTFILE\n"
@@ -640,9 +632,6 @@ int main(int argc, char *argv[])
if (argc > 0)
conf.search_device = argv[0];
- if (argc > 1)
- conf.mountpoint = argv[1];
-
initsignals();
fds[0].fd = init_netlink_socket();