Make example/null work with -odirect_io
authorMiklos Szeredi <miklos@szeredi.hu>
Wed, 5 Mar 2008 13:03:59 +0000 (13:03 +0000)
committerMiklos Szeredi <miklos@szeredi.hu>
Wed, 5 Mar 2008 13:03:59 +0000 (13:03 +0000)
example/null.c

index a98226e4965a5e3831661b4516445a2188b38b93..08455860e7a4b386561d2792ee599d3abad7382a 100644 (file)
@@ -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;
 }