diff options
author | Robert Karszniewicz <r.karszniewicz@phytec.de> | 2019-09-18 13:47:49 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2019-10-14 12:52:10 +0200 |
commit | dd112643c0db33ec0ea288788c02e20d26c2be40 (patch) | |
tree | e3431e4c77e3015a228847002bb4cc193d00e6e7 | |
parent | 9a198b0054742d07a84f67b8e86a537b9c836f63 (diff) | |
download | barebox-dd112643c0db33ec0ea288788c02e20d26c2be40.tar.gz barebox-dd112643c0db33ec0ea288788c02e20d26c2be40.tar.xz |
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>
-rw-r--r-- | fs/fs.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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; |