diff options
author | Simon Rettberg | 2018-06-13 16:12:24 +0200 |
---|---|---|
committer | Simon Rettberg | 2018-06-13 16:12:24 +0200 |
commit | 1a64e1c37fa58f00b010b1a77e82b93fc7fa8527 (patch) | |
tree | 0094dfcd72674ce5564c03d65d4c332d84fc26b4 | |
parent | [FUSE] Move variables into block where they're being used (diff) | |
download | dnbd3-1a64e1c37fa58f00b010b1a77e82b93fc7fa8527.tar.gz dnbd3-1a64e1c37fa58f00b010b1a77e82b93fc7fa8527.tar.xz dnbd3-1a64e1c37fa58f00b010b1a77e82b93fc7fa8527.zip |
[FUSE] Return 0 instead of EIO if trying to read past end
read() calls are supposed to return 0 when reading at EOF,
so properly mimic that behavior.
-rw-r--r-- | src/fuse/main.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/fuse/main.c b/src/fuse/main.c index b064a9b..69659b5 100644 --- a/src/fuse/main.c +++ b/src/fuse/main.c @@ -158,7 +158,7 @@ static int image_read(const char *path, char *buf, size_t size, off_t offset, st } if ( (uint64_t)offset >= imageSize ) { - return -EIO; + return 0; } if ( offset + size > imageSize ) { |