[PATCH] fs: automount: Make automountpoints persistent
Sascha Hauer
s.hauer at pengutronix.de
Thu Jan 7 07:55:16 PST 2016
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 at pengutronix.de>
---
fs/fs.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/fs/fs.c b/fs/fs.c
index 4983fc7..ace72f7 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--;
}
--
2.6.4
More information about the barebox
mailing list