summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorTeresa Remmet <t.remmet@phytec.de>2016-11-25 09:06:03 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2017-01-11 08:06:48 +0100
commita6785bae3b30232c126b2432d2391f89963d100d (patch)
treee44e7046ad6766ddc00f66e71dca24614587e6c7 /include
parent0ec6bd3e1be84da991091fab5bbe20f168471a39 (diff)
downloadbarebox-a6785bae3b30232c126b2432d2391f89963d100d.tar.gz
barebox-a6785bae3b30232c126b2432d2391f89963d100d.tar.xz
devfs: Add optional truncate callback for device files
Not all device files have trivial fix device sizes like static ubi volumes. Here the device file size equals the image size it contains. Signed-off-by: Teresa Remmet <t.remmet@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include')
-rw-r--r--include/driver.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/driver.h b/include/driver.h
index 80aa8d821c..6abaaad8b4 100644
--- a/include/driver.h
+++ b/include/driver.h
@@ -434,6 +434,7 @@ struct file_operations {
int (*erase)(struct cdev*, loff_t count, loff_t offset);
int (*protect)(struct cdev*, size_t count, loff_t offset, int prot);
int (*memmap)(struct cdev*, void **map, int flags);
+ int (*truncate)(struct cdev*, size_t size);
};
#define MAX_PARTUUID_STR sizeof("00112233-4455-6677-8899-AABBCCDDEEFF")