diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2013-11-01 09:33:17 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2013-11-05 08:37:55 +0100 |
commit | b7a66554dcbc2525b719f7216cb77c2037e6af80 (patch) | |
tree | 4480342c5a832b36d75400a4703c431ecd72d2af /fs/fs.c | |
parent | d85c580eebaad93c2dd3dfc72c89088c9d6e0210 (diff) | |
download | barebox-b7a66554dcbc2525b719f7216cb77c2037e6af80.tar.gz barebox-b7a66554dcbc2525b719f7216cb77c2037e6af80.tar.xz |
fs: Add function to get cdev by mountpath
This is useful to know for the bootloader spec implementation.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'fs/fs.c')
-rw-r--r-- | fs/fs.c | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -283,6 +283,19 @@ static struct fs_device_d *get_fsdevice_by_path(const char *path) return fs_dev_root; } +/* + * get_cdev_by_mountpath - return the cdev the given path + * is mounted on + */ +struct cdev *get_cdev_by_mountpath(const char *path) +{ + struct fs_device_d *fsdev; + + fsdev = get_fsdevice_by_path(path); + + return fsdev->cdev; +} + char *get_mounted_path(const char *path) { struct fs_device_d *fdev; |