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

* Re: [PATCH] chdir(): add LOOKUP_DIRECTORY flag to filename_lookup()
  2019-09-18 11:47 [PATCH] chdir(): add LOOKUP_DIRECTORY flag to filename_lookup() Robert Karszniewicz
@ 2019-09-23  6:50 ` Sascha Hauer
  0 siblings, 0 replies; 2+ messages in thread
From: Sascha Hauer @ 2019-09-23  6:50 UTC (permalink / raw)
  To: Robert Karszniewicz; +Cc: barebox

On Wed, Sep 18, 2019 at 01:47:49PM +0200, Robert Karszniewicz wrote:
> 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(-)

Applied, thanks

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
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