aboutsummaryrefslogtreecommitdiff
path: root/example/null.c
diff options
context:
space:
mode:
authorGravatar Miklos Szeredi <miklos@szeredi.hu>2008-03-05 13:03:59 +0000
committerGravatar Miklos Szeredi <miklos@szeredi.hu>2008-03-05 13:03:59 +0000
commit230dc7115f1cbb3cb5030e6b89dc1fd3a9af691d (patch)
treeb0cefdc147dc62728ecb06fc17ba9c38eac0ae9c /example/null.c
parente4fcdcb34e3767b1fe409bf742d3f35fa80dc38a (diff)
Make example/null work with -odirect_io
Diffstat (limited to 'example/null.c')
-rw-r--r--example/null.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/example/null.c b/example/null.c
index a98226e..0845586 100644
--- a/example/null.c
+++ b/example/null.c
@@ -62,6 +62,9 @@ static int null_read(const char *path, char *buf, size_t size,
if(strcmp(path, "/") != 0)
return -ENOENT;
+ if (offset >= (1ULL << 32))
+ return 0;
+
return size;
}