diff options
Diffstat (limited to 'fs/smhfs.c')
-rw-r--r-- | fs/smhfs.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/fs/smhfs.c b/fs/smhfs.c index f1b6d6bb1b..2e99b05979 100644 --- a/fs/smhfs.c +++ b/fs/smhfs.c @@ -56,7 +56,7 @@ static int smhfs_rm(struct device_d __always_unused *dev, static int smhfs_truncate(struct device_d __always_unused *dev, FILE __always_unused *f, - ulong __always_unused size) + loff_t __always_unused size) { return 0; } @@ -109,15 +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)) { + if (semihosting_seek(file_to_fd(f), pos)) return -semihosting_errno(); - } else { - f->pos = pos; - return f->pos; - } + + return 0; } static DIR* smhfs_opendir(struct device_d __always_unused *dev, |