summaryrefslogtreecommitdiffstats
path: root/fs/smhfs.c
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 /fs/smhfs.c
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 'fs/smhfs.c')
-rw-r--r--fs/smhfs.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/smhfs.c b/fs/smhfs.c
index 18eaa9dfcf..7a6933630c 100644
--- a/fs/smhfs.c
+++ b/fs/smhfs.c
@@ -109,13 +109,13 @@ static int smhfs_read(struct device_d __always_unused *dev,
return -semihosting_errno();
}
-static loff_t smhfs_lseek(struct device_d __always_unused *dev,
+static int smhfs_lseek(struct device_d __always_unused *dev,
FILE *f, loff_t pos)
{
if (semihosting_seek(file_to_fd(f), pos))
return -semihosting_errno();
- return pos;
+ return 0;
}
static DIR* smhfs_opendir(struct device_d __always_unused *dev,