summaryrefslogtreecommitdiffstats
path: root/booster
diff options
context:
space:
mode:
authorShehjar Tikoo <shehjart@zresearch.com>2009-05-05 16:00:12 +0530
committerAnand V. Avati <avati@amp.gluster.com>2009-05-05 17:44:07 +0530
commit0c86f9686f2c91ef8838972ad038ba0c587cd09d (patch)
tree3f449bb6322af897628462a3db4ccc6dd0533426 /booster
parent2763f86eea23898501c5299f58edc37e2c1262e5 (diff)
booster: Clean-up pread64
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
Diffstat (limited to 'booster')
-rw-r--r--booster/src/booster.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/booster/src/booster.c b/booster/src/booster.c
index 81c605746..ec726178e 100644
--- a/booster/src/booster.c
+++ b/booster/src/booster.c
@@ -723,12 +723,13 @@ pread64 (int fd, void *buf, size_t count, uint64_t offset)
glfs_fd = booster_get_glfs_fd (booster_glfs_fdtable, fd);
if (!glfs_fd) {
- ret = real_pread (fd, buf, count, offset);
+ if (real_pread64 == NULL) {
+ errno = ENOSYS;
+ ret = -1;
+ } else
+ ret = real_pread64 (fd, buf, count, offset);
} else {
ret = glusterfs_pread (glfs_fd, buf, count, offset);
- if (ret == -1) {
- ret = real_pread (fd, buf, count, offset);
- }
}
return ret;