summaryrefslogtreecommitdiffstats
path: root/booster/src
diff options
context:
space:
mode:
authorShehjar Tikoo <shehjart@zresearch.com>2009-05-05 16:00:41 +0530
committerAnand V. Avati <avati@amp.gluster.com>2009-05-05 17:44:28 +0530
commit6696009a6662cc77458246ffc3dccc22f8d6c185 (patch)
treee7b073cc0788d526d1e97593764cf53591157f23 /booster/src
parent513a2d15c16a9b5c96ceb321bed08d34d659e12b (diff)
booster: Clean-up lseek64
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
Diffstat (limited to 'booster/src')
-rw-r--r--booster/src/booster.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/booster/src/booster.c b/booster/src/booster.c
index 3c4f487d899..46db2b621a2 100644
--- a/booster/src/booster.c
+++ b/booster/src/booster.c
@@ -919,12 +919,17 @@ lseek64 (int filedes, uint64_t offset, int whence)
int ret;
glusterfs_file_t glfs_fd = 0;
- ret = real_lseek64 (filedes, offset, whence);
glfs_fd = booster_get_glfs_fd (booster_glfs_fdtable, filedes);
if (glfs_fd) {
ret = glusterfs_lseek (glfs_fd, offset, whence);
booster_put_glfs_fd (glfs_fd);
+ } else {
+ if (real_lseek64 == NULL) {
+ errno = ENOSYS;
+ ret = -1;
+ } else
+ ret = real_lseek64 (filedes, offset, whence);
}
return ret;