[PATCH 4/4] automount: remove existing automountpoint

Sascha Hauer s.hauer at pengutronix.de
Sun Apr 15 10:51:57 EDT 2012


Before creating a new mountpoint on an already existing mountpoint
we have to remove it.

Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
---
 fs/fs.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/fs/fs.c b/fs/fs.c
index 64997cc..04dace4 100644
--- a/fs/fs.c
+++ b/fs/fs.c
@@ -259,6 +259,8 @@ int automount_add(const char *path, const char *cmd)
 	am->path = normalise_path(path);
 	am->cmd = xstrdup(cmd);
 
+	automount_remove(am->path);
+
 	ret = stat(path, &s);
 	if (!ret) {
 		/*
-- 
1.7.10




More information about the barebox mailing list