summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2012-04-15 00:30:46 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2012-04-15 16:50:58 +0200
commit09334a95b47c7d403e6b56ea3caee8e9a28b384e (patch)
tree12539513261d3d5ba6bb53448d65cad57779816a /fs
parenteeb3440419f2f282810c4afd45d20086e76d496c (diff)
downloadbarebox-09334a95b47c7d403e6b56ea3caee8e9a28b384e.tar.gz
barebox-09334a95b47c7d403e6b56ea3caee8e9a28b384e.tar.xz
automount: remove existing automountpoint
Before creating a new mountpoint on an already existing mountpoint we have to remove it. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'fs')
-rw-r--r--fs/fs.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/fs.c b/fs/fs.c
index 64997cc8d2..04dace49d2 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) {
/*