
Implement jlseek, a lseek wrapper.

---

 cur-root/libjio.h |    1 +
 cur-root/unix.c   |   12 ++++++++++++
 2 files changed, 13 insertions(+)

diff -puN unix.c~jseek unix.c
--- cur/unix.c~jseek	2004-07-21 00:34:53.000000000 -0300
+++ cur-root/unix.c	2004-07-22 09:49:50.701861336 -0300
@@ -169,3 +169,15 @@ int jtruncate(struct jfs *fs, off_t leng
 	return rv;
 }
 
+/* lseek wrapper */
+off_t jlseek(struct jfs *fs, off_t offset, int whence)
+{
+	int rv;
+
+	pthread_mutex_lock(&(fs->lock));
+	rv = lseek(fs->fd, offset, whence);
+	pthread_mutex_unlock(&(fs->lock));
+
+	return rv;
+}
+
diff -puN libjio.h~jseek libjio.h
--- cur/libjio.h~jseek	2004-07-21 00:34:53.000000000 -0300
+++ cur-root/libjio.h	2004-07-21 00:46:33.000000000 -0300
@@ -114,6 +114,7 @@ ssize_t jwrite(struct jfs *fs, const voi
 ssize_t jpwrite(struct jfs *fs, const void *buf, size_t count, off_t offset);
 ssize_t jwritev(struct jfs *fs, const struct iovec *vector, int count);
 int jtruncate(struct jfs *fs, off_t length);
+off_t jlseek(struct jfs *fs, off_t offset, int whence);
 
 /* ANSI C stdio wrappers */
 struct jfs *jfopen(const char *path, const char *mode);
_
