9
0
Fork 0

fs: introduce get_mounted_path to get the path where a file is mounted

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
This commit is contained in:
Jean-Christophe PLAGNIOL-VILLARD 2012-08-17 15:28:15 +08:00
parent c3defd0504
commit 1483f45879
2 changed files with 11 additions and 0 deletions

View File

@ -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)

View File

@ -168,6 +168,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);