diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2018-09-26 10:24:34 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2018-09-26 10:24:37 +0200 |
commit | 31cc20b53ce4b319e6e3523b54d6953be6ca49c0 (patch) | |
tree | 00ce21ef9076ec5d752ac5614134d527714983bc | |
parent | 197489ba31b70c51f76151d2c58a1d8f5d73dfe6 (diff) | |
download | barebox-31cc20b53ce4b319e6e3523b54d6953be6ca49c0.tar.gz barebox-31cc20b53ce4b319e6e3523b54d6953be6ca49c0.tar.xz |
fs: stat: Do not forget to set errno
stat() needs to set errno correctly when returning with an error.
Fixes: b3fbfad7ae ("fs: dentry cache implementation")
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rw-r--r-- | fs/fs.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -2535,6 +2535,9 @@ static int stat_filename(const char *filename, struct stat *s, unsigned int flag out_put: path_put(&path); out: + if (ret) + errno = -ret; + return ret; } |