summaryrefslogtreecommitdiffstats
path: root/booster
diff options
context:
space:
mode:
authorShehjar Tikoo <shehjart@zresearch.com>2009-05-05 16:00:34 +0530
committerAnand V. Avati <avati@amp.gluster.com>2009-05-05 17:44:23 +0530
commit513a2d15c16a9b5c96ceb321bed08d34d659e12b (patch)
tree2ffee3f0d5271f39b321db45fd185d47b3ee7f27 /booster
parent24b360d865dbf344f8369e656d282739f07c18e8 (diff)
booster: Clean-up lseek
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
Diffstat (limited to 'booster')
-rw-r--r--booster/src/booster.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/booster/src/booster.c b/booster/src/booster.c
index 48603c1fa63..3c4f487d899 100644
--- a/booster/src/booster.c
+++ b/booster/src/booster.c
@@ -897,12 +897,16 @@ lseek (int filedes, unsigned long offset, int whence)
int ret;
glusterfs_file_t glfs_fd = 0;
- ret = real_lseek (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_lseek == NULL) {
+ errno = ENOSYS;
+ ret = -1;
+ } else
+ ret = real_lseek (filedes, offset, whence);
}
return ret;