diff options
author | Andrey Smirnov <andrew.smirnov@gmail.com> | 2019-01-28 22:55:40 -0800 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2019-02-04 15:30:11 +0100 |
commit | 0b80e3dae75c32e5f30bf4d9052d4f390cc0bb6e (patch) | |
tree | ab214800c21830022497a60925741850e9bcd1c8 /fs/efi.c | |
parent | 5c9408572406c8718a35931ecf74a5cf38632914 (diff) | |
download | barebox-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 'fs/efi.c')
-rw-r--r-- | fs/efi.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -292,7 +292,7 @@ static int efifs_write(struct device_d *_dev, FILE *f, const void *buf, size_t i return bufsize; } -static loff_t efifs_lseek(struct device_d *dev, FILE *f, loff_t pos) +static int efifs_lseek(struct device_d *dev, FILE *f, loff_t pos) { struct efifs_file *ufile = f->priv; efi_status_t efiret; @@ -302,7 +302,7 @@ static loff_t efifs_lseek(struct device_d *dev, FILE *f, loff_t pos) return -efi_errno(efiret); } - return pos; + return 0; } static int efifs_truncate(struct device_d *dev, FILE *f, unsigned long size) |