summaryrefslogtreecommitdiffstats
path: root/fs/fs.c
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2016-01-07 14:34:18 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2016-01-08 08:30:56 +0100
commit1c8bc03d629d97224c5f3ab0a910e021fed943d6 (patch)
treec4adde71fcc06e99b0a38b054e0e95701f02d7ab /fs/fs.c
parent1cc4ba2aa100200e5cdae59fa397e09d22818da5 (diff)
downloadbarebox-1c8bc03d629d97224c5f3ab0a910e021fed943d6.tar.gz
barebox-1c8bc03d629d97224c5f3ab0a910e021fed943d6.tar.xz
fs: automount: Make automountpoints persistent
Do not remove the automountpoints when they are mounted. This way they can be reused when they have been unmounted. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'fs/fs.c')
-rw-r--r--fs/fs.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/fs/fs.c b/fs/fs.c
index 4983fc7ec1..ace72f7d54 100644
--- a/fs/fs.c
+++ b/fs/fs.c
@@ -346,6 +346,9 @@ static void automount_mount(const char *path, int instat)
in_automount++;
+ if (fs_dev_root != get_fsdevice_by_path(path))
+ goto out;
+
list_for_each_entry(am, &automount_list, list) {
int len_path = strlen(path);
int len_am_path = strlen(am->path);
@@ -377,12 +380,10 @@ static void automount_mount(const char *path, int instat)
if (ret)
printf("running automount command '%s' failed\n",
am->cmd);
- else
- automount_remove(am->path);
break;
}
-
+out:
in_automount--;
}