diff options
author | Philipp Zabel <p.zabel@pengutronix.de> | 2017-06-01 12:37:29 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2017-06-06 09:16:23 +0200 |
commit | f3cd5b1bbcb27108496eb572ae2ff7cd526ddc55 (patch) | |
tree | 4a0e5586df03dd50f6190525c5cb71db34128113 /include/driver.h | |
parent | 7bcbc91a5eb2c3fbb3a6d67103ca0ff8fc8e4412 (diff) | |
download | barebox-f3cd5b1bbcb27108496eb572ae2ff7cd526ddc55.tar.gz barebox-f3cd5b1bbcb27108496eb572ae2ff7cd526ddc55.tar.xz |
fs: add cdev_create_loop and cdev_remove_loop for loop mount option
Allow to create a loopback cdev from a file.
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Fixed up with:
fs: Makefile: Add parseopt to all builds
parseopt.h was included to fs.c with commit 9248b, but parseopt.o has a
dependency to CONFIG_FS_NFS.
Moved parseopt.o to the default build to eliminate build failures.
Signed-off-by: Daniel Schultz <d.schultz@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include/driver.h')
-rw-r--r-- | include/driver.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/driver.h b/include/driver.h index 1edc1575c8..3d701f2439 100644 --- a/include/driver.h +++ b/include/driver.h @@ -473,6 +473,8 @@ struct cdev *lcdev_by_name(const char *filename); struct cdev *cdev_readlink(struct cdev *cdev); struct cdev *cdev_by_device_node(struct device_node *node); struct cdev *cdev_open(const char *name, unsigned long flags); +struct cdev *cdev_create_loop(const char *path, ulong flags); +void cdev_remove_loop(struct cdev *cdev); int cdev_do_open(struct cdev *, unsigned long flags); void cdev_close(struct cdev *cdev); int cdev_flush(struct cdev *cdev); |