From f3cd5b1bbcb27108496eb572ae2ff7cd526ddc55 Mon Sep 17 00:00:00 2001
From: Philipp Zabel
Date: Thu, 1 Jun 2017 12:37:29 +0200
Subject: 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
Signed-off-by: Sascha Hauer
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
Signed-off-by: Sascha Hauer
---
include/driver.h | 2 ++
1 file changed, 2 insertions(+)
(limited to 'include/driver.h')
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);
--
cgit v1.2.3