diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2016-01-07 14:34:18 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2016-01-08 08:30:56 +0100 |
commit | 1c8bc03d629d97224c5f3ab0a910e021fed943d6 (patch) | |
tree | c4adde71fcc06e99b0a38b054e0e95701f02d7ab /fs/fs.c | |
parent | 1cc4ba2aa100200e5cdae59fa397e09d22818da5 (diff) | |
download | barebox-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.c | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -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--; } |