summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorRobert Karszniewicz <r.karszniewicz@phytec.de>2019-09-18 13:47:49 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2019-10-14 12:52:10 +0200
commitdd112643c0db33ec0ea288788c02e20d26c2be40 (patch)
treee3431e4c77e3015a228847002bb4cc193d00e6e7 /fs
parent9a198b0054742d07a84f67b8e86a537b9c836f63 (diff)
downloadbarebox-dd112643c0db33ec0ea288788c02e20d26c2be40.tar.gz
chdir(): add LOOKUP_DIRECTORY flag to filename_lookup()
This makes sure that automount points get handled even if the path doesn't end with a '/'. Signed-off-by: Robert Karszniewicz <r.karszniewicz@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'fs')
-rw-r--r--fs/fs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/fs.c b/fs/fs.c
index dda19db..12faaeb 100644
--- a/fs/fs.c
+++ b/fs/fs.c
@@ -2699,7 +2699,7 @@ int chdir(const char *pathname)
struct path path;
int ret;
- ret = filename_lookup(AT_FDCWD, getname(pathname), LOOKUP_FOLLOW, &path);
+ ret = filename_lookup(AT_FDCWD, getname(pathname), LOOKUP_FOLLOW | LOOKUP_DIRECTORY, &path);
if (ret)
goto out;