From 1483f45879c6676eebc3cd4298393aec2af105e6 Mon Sep 17 00:00:00 2001 From: Jean-Christophe PLAGNIOL-VILLARD Date: Fri, 17 Aug 2012 15:28:15 +0800 Subject: fs: introduce get_mounted_path to get the path where a file is mounted Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD --- fs/fs.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'fs') diff --git a/fs/fs.c b/fs/fs.c index 5bfd7136a1..7e670ec023 100644 --- a/fs/fs.c +++ b/fs/fs.c @@ -243,6 +243,15 @@ static struct fs_device_d *get_fsdevice_by_path(const char *path) return fs_dev_root; } +char *get_mounted_path(const char *path) +{ + struct fs_device_d *fdev; + + fdev = get_fsdevice_by_path(path); + + return fdev->path; +} + static FILE files[MAX_FILES]; static FILE *get_file(void) -- cgit v1.2.3