Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@xxxxxxxxxxxx> --- fs/fs.c | 9 +++++++++ include/fs.h | 2 ++ 2 files changed, 11 insertions(+) diff --git a/fs/fs.c b/fs/fs.c index 5b7e641..53d8316 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) diff --git a/include/fs.h b/include/fs.h index ae6c464..3d5714c 100644 --- a/include/fs.h +++ b/include/fs.h @@ -173,6 +173,8 @@ void *read_file(const char *filename, size_t *size); char *normalise_path(const char *path); char *normalise_link(const char *pathname, const char* symlink); +char *get_mounted_path(const char *path); + /* Register a new filesystem driver */ int register_fs_driver(struct fs_driver_d *fsdrv); -- 1.7.10.4 _______________________________________________ barebox mailing list barebox@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/barebox