summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2014-10-08 14:01:37 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2014-10-08 16:09:17 +0200
commit4f7a18cdb58aaef1c265e0359608a465355d9863 (patch)
tree1dedd2e995bf465bc7e4f4fb6d5959f31e158092 /fs
parent59f91ec6c0d448acc041e33d48be1c66214da317 (diff)
downloadbarebox-4f7a18cdb58aaef1c265e0359608a465355d9863.tar.gz
barebox-4f7a18cdb58aaef1c265e0359608a465355d9863.tar.xz
fs: Store the path in struct filep
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'fs')
-rw-r--r--fs/fs.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/fs.c b/fs/fs.c
index 04b6408802..436f5cb751 100644
--- a/fs/fs.c
+++ b/fs/fs.c
@@ -251,6 +251,8 @@ static FILE *get_file(void)
static void put_file(FILE *f)
{
+ free(f->path);
+ f->path = NULL;
f->in_use = 0;
}
@@ -670,6 +672,9 @@ int open(const char *pathname, int flags, ...)
if (ret)
goto out;
}
+
+ f->path = xstrdup(path);
+
ret = fsdrv->open(&fsdev->dev, f, path);
if (ret)
goto out;