summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorAndrey Smirnov <andrew.smirnov@gmail.com>2019-01-28 22:55:40 -0800
committerSascha Hauer <s.hauer@pengutronix.de>2019-02-04 15:30:11 +0100
commit0b80e3dae75c32e5f30bf4d9052d4f390cc0bb6e (patch)
treeab214800c21830022497a60925741850e9bcd1c8 /include
parent5c9408572406c8718a35931ecf74a5cf38632914 (diff)
downloadbarebox-0b80e3dae75c32e5f30bf4d9052d4f390cc0bb6e.tar.gz
barebox-0b80e3dae75c32e5f30bf4d9052d4f390cc0bb6e.tar.xz
fs: devfs: Change .lseek callbacks to return 'int'
Returning requested offset from .lseek() callback doesn't really give us any new information while bringing unnecessary complications. Change all .lseek() types (both in struct struct cdev_operations and in struct fs_driver_d) to return 'int' and adjust the rest of the codebase accordingly. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include')
-rw-r--r--include/driver.h2
-rw-r--r--include/fs.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/include/driver.h b/include/driver.h
index bcb31afdc2..a8e046ed7f 100644
--- a/include/driver.h
+++ b/include/driver.h
@@ -434,7 +434,7 @@ struct cdev_operations {
ssize_t (*write)(struct cdev*, const void* buf, size_t count, loff_t offset, ulong flags);
int (*ioctl)(struct cdev*, int, void *);
- loff_t (*lseek)(struct cdev*, loff_t);
+ int (*lseek)(struct cdev*, loff_t);
int (*open)(struct cdev*, unsigned long flags);
int (*close)(struct cdev*);
int (*flush)(struct cdev*);
diff --git a/include/fs.h b/include/fs.h
index 181318f404..68b6380bc6 100644
--- a/include/fs.h
+++ b/include/fs.h
@@ -53,7 +53,7 @@ struct fs_driver_d {
int (*read)(struct device_d *dev, FILE *f, void *buf, size_t size);
int (*write)(struct device_d *dev, FILE *f, const void *buf, size_t size);
int (*flush)(struct device_d *dev, FILE *f);
- loff_t (*lseek)(struct device_d *dev, FILE *f, loff_t pos);
+ int (*lseek)(struct device_d *dev, FILE *f, loff_t pos);
int (*ioctl)(struct device_d *dev, FILE *f, int request, void *buf);
int (*erase)(struct device_d *dev, FILE *f, loff_t count,