summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2022-02-07 10:49:51 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2022-02-08 09:13:58 +0100
commit627c2701c8561266cd6657e56af439cb1f984f07 (patch)
treef321ef5f74a48570a3c30aad9db459c532b39e96 /include
parent5da1c3066a33a193a3fd92c022b6339d447d2d7e (diff)
downloadbarebox-627c2701c8561266cd6657e56af439cb1f984f07.tar.gz
barebox-627c2701c8561266cd6657e56af439cb1f984f07.tar.xz
cdev: Create missing cdev_* functions
We have several functions like cdev_read(), cdev_write() and others. For consistency create the remaining functions: cdev_lseek(), cdev_protect(), cdev_discard_range(), cdev_memmap() and cdev_truncate() Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Link: https://lore.barebox.org/20220207094953.949868-6-s.hauer@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include')
-rw-r--r--include/driver.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/driver.h b/include/driver.h
index 4937091ca9..83815df8d1 100644
--- a/include/driver.h
+++ b/include/driver.h
@@ -503,6 +503,11 @@ ssize_t cdev_read(struct cdev *cdev, void *buf, size_t count, loff_t offset, ulo
ssize_t cdev_write(struct cdev *cdev, const void *buf, size_t count, loff_t offset, ulong flags);
int cdev_ioctl(struct cdev *cdev, int cmd, void *buf);
int cdev_erase(struct cdev *cdev, loff_t count, loff_t offset);
+int cdev_lseek(struct cdev*, loff_t);
+int cdev_protect(struct cdev*, size_t count, loff_t offset, int prot);
+int cdev_discard_range(struct cdev*, loff_t count, loff_t offset);
+int cdev_memmap(struct cdev*, void **map, int flags);
+int cdev_truncate(struct cdev*, size_t size);
loff_t cdev_unallocated_space(struct cdev *cdev);
#define DEVFS_PARTITION_FIXED (1U << 0)