diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2013-11-27 11:21:59 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2013-11-27 11:22:01 +0100 |
commit | 812c6f2beace08c1af3c851c30d87e8c55d357ff (patch) | |
tree | c52af52064bdd07d247fae91ef514f897f89d153 /fs | |
parent | 239699fc831434c8697dda088dc9c971a3f5542d (diff) | |
download | barebox-812c6f2beace08c1af3c851c30d87e8c55d357ff.tar.gz barebox-812c6f2beace08c1af3c851c30d87e8c55d357ff.tar.xz |
Fix endless loop in automount code
A chdir to a path registered as an automount path followed by a 'ls'
results in an endless loop. This happens because the command the
automounter executes results in another automount request.
Fix this by running the automounter from the chdir code before
the cwd is actually changed.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/fs.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -579,6 +579,8 @@ int chdir(const char *pathname) if (ret) goto out; + automount_mount(p, 0); + strcpy(cwd, p); out: |