mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] chdir(): add LOOKUP_DIRECTORY flag to filename_lookup()
@ 2019-09-18 11:47 Robert Karszniewicz
  2019-09-23  6:50 ` Sascha Hauer
  0 siblings, 1 reply; 2+ messages in thread
From: Robert Karszniewicz @ 2019-09-18 11:47 UTC (permalink / raw)
  To: barebox

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>
---
 fs/fs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/fs.c b/fs/fs.c
index c6cb499..901beab 100644
--- a/fs/fs.c
+++ b/fs/fs.c
@@ -2690,7 +2690,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;
 
-- 
2.7.4


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-09-23  6:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-18 11:47 [PATCH] chdir(): add LOOKUP_DIRECTORY flag to filename_lookup() Robert Karszniewicz
2019-09-23  6:50 ` Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox