[Libsysio-commit] cplant: libsysio/drivers/native fs_native.c
Brought to you by:
lward
From: Ruth K. <rk...@us...> - 2003-06-12 23:35:26
|
Update of /cvsroot/libsysio/libsysio/drivers/native In directory sc8-pr-cvs1:/tmp/cvs-serv7886 Modified Files: Tag: cplant fs_native.c Log Message: SYS_lseek has a different interface on alpha Index: fs_native.c =================================================================== RCS file: /cvsroot/libsysio/libsysio/drivers/native/fs_native.c,v retrieving revision 1.8.2.2 retrieving revision 1.8.2.3 diff -u -w -b -B -p -r1.8.2.2 -r1.8.2.3 --- fs_native.c 12 Jun 2003 19:59:49 -0000 1.8.2.2 +++ fs_native.c 12 Jun 2003 23:35:24 -0000 1.8.2.3 @@ -116,9 +116,19 @@ do { (dest)->st_gen = (src)->st_gen; \ } while (0); +/* SYS_lseek has a different interface on alpha + */ +#define CALL_LSEEK(fd, off, rc, wh) \ + (rc = syscall(SYS_lseek, fd, off, wh)) + #else + #define __native_stat intnl_stat #define COPY_STAT(src, dest) *(dest) = *(src) + +#define CALL_LSEEK(fd, off, rc, wh) \ + (syscall(SYS_lseek, fd, off, &result, wh)) + #endif #if defined(USE_NATIVE_STAT) @@ -790,10 +800,9 @@ native_getdirentries(struct inode *ino, result = *basep; if (*basep != nino->ni_fpos && - syscall(SYS_lseek, - nino->ni_fd, + CALL_LSEEK(nino->ni_fd, *basep, - &result, + result, SEEK_SET) == -1) return -errno; nino->ni_fpos = result; @@ -1035,10 +1044,9 @@ doio(ssize_t (*f)(int, const struct iove !(S_ISCHR(ino->i_mode) || S_ISSOCK(ino->i_mode) || S_ISFIFO(ino->i_mode)) && - syscall(SYS_lseek, - nino->ni_fd, + CALL_LSEEK(nino->ni_fd, ioctx->ioctx_offset, - &result, + result, SEEK_SET) == -1) { ioctx->ioctx_cc = -1; ioctx->ioctx_errno = errno; |