Thread: [Libsysio-commit] HEAD: libsysio/src chdir.c chmod.c chown.c dup.c fcntl.c fsync.c getdirentries.c i
Brought to you by:
lward
|
From: Lee W. <lw...@us...> - 2004-01-21 14:44:59
|
Update of /cvsroot/libsysio/libsysio/src
In directory sc8-pr-cvs1:/tmp/cvs-serv23555/src
Modified Files:
chdir.c chmod.c chown.c dup.c fcntl.c fsync.c getdirentries.c
init.c ioctl.c iowait.c lseek.c mkdir.c mknod.c open.c read.c
rmdir.c stat.c stat64.c statvfs.c statvfs64.c symlink.c
truncate.c unlink.c utime.c write.c
Log Message:
A roll-up patch from CFS (Eric Mei <er...@cl...>)
- intent.diff
small changes on intent related behavior. I simply follow the lustre
kernel code here.
- open() need to pass down param 'flags'.
- 'setattr' related syscalls, like chown/chmod/utime/..., don't need
intent during path resolution.
- sockets.diff
your socket driver.
- nativefs.diff
only add fcntl code into native driver. not sure whether it's
complete, but ok for current testing.
- trace.diff
this patch add SYSIO_ENTER/SYSIO_LEAVE macros.
Index: chdir.c
===================================================================
RCS file: /cvsroot/libsysio/libsysio/src/chdir.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -w -b -B -p -r1.10 -r1.11
--- chdir.c 27 Oct 2003 23:42:29 -0000 1.10
+++ chdir.c 21 Jan 2004 14:44:53 -0000 1.11
@@ -119,14 +119,19 @@ chdir(const char *path)
{
int err;
struct pnode *pno;
+ SYSIO_ENTER;
err = _sysio_namei(_sysio_cwd, path, 0, NULL, &pno);
if (err) {
errno = -err;
+ SYSIO_LEAVE;
return -1;
}
- return _sysio_p_chdir(pno);
+ err = _sysio_p_chdir(pno);
+
+ SYSIO_LEAVE;
+ return err;
}
/*
@@ -219,12 +224,15 @@ char *
getcwd(char *buf, size_t size)
{
int err;
+ SYSIO_ENTER;
err = _sysio_p_path(_sysio_cwd, &buf, buf ? size : 0);
if (err) {
errno = -err;
+ SYSIO_LEAVE;
return NULL;
}
+ SYSIO_LEAVE;
return buf;
}
Index: chmod.c
===================================================================
RCS file: /cvsroot/libsysio/libsysio/src/chmod.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -w -b -B -p -r1.4 -r1.5
--- chmod.c 27 Sep 2003 19:42:02 -0000 1.4
+++ chmod.c 21 Jan 2004 14:44:53 -0000 1.5
@@ -70,12 +70,11 @@ do_chmod(struct pnode *pno, struct inode
int
chmod(const char *path, mode_t mode)
{
- struct intent intent;
int err;
struct pnode *pno;
+ SYSIO_ENTER;
- INTENT_INIT(&intent, INT_SETATTR, NULL, NULL);
- err = _sysio_namei(_sysio_cwd, path, 0, &intent, &pno);
+ err = _sysio_namei(_sysio_cwd, path, 0, NULL, &pno);
if (err)
goto out;
err = do_chmod(pno, pno->p_base->pb_ino, mode);
@@ -85,6 +84,7 @@ out:
errno = -err;
err = -1;
}
+ SYSIO_LEAVE;
return err;
}
Index: chown.c
===================================================================
RCS file: /cvsroot/libsysio/libsysio/src/chown.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -w -b -B -p -r1.4 -r1.5
--- chown.c 27 Sep 2003 19:42:02 -0000 1.4
+++ chown.c 21 Jan 2004 14:44:53 -0000 1.5
@@ -59,6 +59,7 @@ _do_chown(struct pnode *pno, struct inod
int err;
struct intnl_stat stbuf;
unsigned mask;
+ SYSIO_ENTER;
(void )memset(&stbuf, 0, sizeof(struct intnl_stat));
mask = 0;
@@ -91,6 +92,7 @@ out:
errno = -err;
err = -1;
}
+ SYSIO_LEAVE;
return err;
}
Index: dup.c
===================================================================
RCS file: /cvsroot/libsysio/libsysio/src/dup.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -w -b -B -p -r1.2 -r1.3
--- dup.c 23 Oct 2003 15:16:05 -0000 1.2
+++ dup.c 21 Jan 2004 14:44:53 -0000 1.3
@@ -54,23 +54,44 @@
int
dup2(int oldfd, int newfd)
{
+ int rc;
+ SYSIO_ENTER;
if (newfd < 0) {
errno = EBADF;
+ SYSIO_LEAVE;
return -1;
}
- if (oldfd == newfd)
+ if (oldfd == newfd) {
+ SYSIO_LEAVE;
return newfd;
+ }
+
+ rc = _sysio_fd_dup2(oldfd, newfd);
+ if (rc < 0) {
+ errno = -rc;
+ rc = -1;
+ }
- return _sysio_fd_dup2(oldfd, newfd);
+ SYSIO_LEAVE;
+ return rc;
}
int
dup(int oldfd)
{
+ int rc;
+ SYSIO_ENTER;
+
+ rc = _sysio_fd_dup2(oldfd, -1);
+ if (rc < 0) {
+ errno = -rc;
+ rc = -1;
+ }
- return _sysio_fd_dup2(oldfd, -1);
+ SYSIO_LEAVE;
+ return rc;
}
#ifdef __GLIBC__
Index: fcntl.c
===================================================================
RCS file: /cvsroot/libsysio/libsysio/src/fcntl.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -w -b -B -p -r1.6 -r1.7
--- fcntl.c 14 Oct 2003 18:00:29 -0000 1.6
+++ fcntl.c 21 Jan 2004 14:44:53 -0000 1.7
@@ -59,6 +59,7 @@ fcntl(int fd, int cmd, ...)
int err;
struct file *fil;
va_list ap;
+ SYSIO_ENTER;
err = 0;
fil = _sysio_fd_find(fd);
@@ -72,6 +73,7 @@ fcntl(int fd, int cmd, ...)
case F_DUPFD:
{
long newfd;
+ int rc;
va_start(ap, cmd);
newfd = va_arg(ap, long);
@@ -80,7 +82,10 @@ fcntl(int fd, int cmd, ...)
err = -EBADF;
goto out;
}
- return _sysio_fd_dup2(fd, (int )newfd);
+ rc = _sysio_fd_dup2(fd, (int )newfd);
+
+ SYSIO_LEAVE;
+ return rc;
}
break;
default:
@@ -95,6 +100,7 @@ out:
errno = -err;
err = -1;
}
+ SYSIO_LEAVE;
return err;
}
Index: fsync.c
===================================================================
RCS file: /cvsroot/libsysio/libsysio/src/fsync.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -w -b -B -p -r1.2 -r1.3
--- fsync.c 9 Mar 2003 06:22:43 -0000 1.2
+++ fsync.c 21 Jan 2004 14:44:53 -0000 1.3
@@ -55,17 +55,22 @@ fsync(int fd)
{
struct file *fil;
int err;
+ SYSIO_ENTER;
fil = _sysio_fd_find(fd);
if (!(fil && fil->f_ino)) {
errno = -EBADF;
+ SYSIO_LEAVE;
return -1;
}
err = (*fil->f_ino->i_ops.inop_sync)(fil->f_ino);
if (err) {
errno = -err;
+ SYSIO_LEAVE;
return -1;
}
+
+ SYSIO_LEAVE;
return 0;
}
@@ -74,16 +79,21 @@ fdatasync(int fd)
{
struct file *fil;
int err;
+ SYSIO_ENTER;
fil = _sysio_fd_find(fd);
if (!(fil && fil->f_ino)) {
errno = -EBADF;
+ SYSIO_LEAVE;
return -1;
}
err = (*fil->f_ino->i_ops.inop_datasync)(fil->f_ino);
if (err) {
errno = -err;
+ SYSIO_LEAVE;
return -1;
}
+
+ SYSIO_LEAVE;
return 0;
}
Index: getdirentries.c
===================================================================
RCS file: /cvsroot/libsysio/libsysio/src/getdirentries.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -w -b -B -p -r1.4 -r1.5
--- getdirentries.c 14 Oct 2003 18:00:29 -0000 1.4
+++ getdirentries.c 21 Jan 2004 14:44:53 -0000 1.5
@@ -96,6 +96,7 @@ getdirentries(int fd,
size_t n;
size_t reclen;
char *cp;
+ SYSIO_ENTER;
#define _dbaselen ((size_t )&((struct dirent *)0)->d_name[0])
#ifdef __GLIBC__
@@ -128,6 +129,7 @@ getdirentries(int fd,
ibuf = _fast_alloc(inbytes);
if (!ibuf) {
errno = ENOMEM;
+ SYSIO_LEAVE;
return -1;
}
@@ -199,6 +201,7 @@ out:
if (dp == (struct dirent *)buf && cc < 0) {
errno = (int )-cc;
+ SYSIO_LEAVE;
return -1;
}
cc = (char *)dp - buf;
@@ -209,6 +212,7 @@ out:
#else
off;
#endif
+ SYSIO_LEAVE;
return cc;
#ifdef __GLIBC__
Index: init.c
===================================================================
RCS file: /cvsroot/libsysio/libsysio/src/init.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -w -b -B -p -r1.3 -r1.4
--- init.c 24 Mar 2003 22:09:06 -0000 1.3
+++ init.c 21 Jan 2004 14:44:53 -0000 1.4
@@ -64,6 +64,9 @@ int
_sysio_init()
{
int err;
+#ifdef WITH_SOCKETS
+ int _sysio_sockets_init(void);
+#endif
err = _sysio_ioctx_init();
if (err)
@@ -75,6 +78,7 @@ _sysio_init()
if (err)
goto error;
+#ifndef __CYGWIN__
err = _sysio_dev_init();
if (err)
goto error;
@@ -83,6 +87,12 @@ _sysio_init()
if (err)
goto error;
#endif
+#endif
+#ifdef WITH_SOCKETS
+ err = _sysio_sockets_init();
+ if (err)
+ goto error;
+#endif
goto out;
error:
Index: ioctl.c
===================================================================
RCS file: /cvsroot/libsysio/libsysio/src/ioctl.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -w -b -B -p -r1.4 -r1.5
--- ioctl.c 14 Oct 2003 18:00:30 -0000 1.4
+++ ioctl.c 21 Jan 2004 14:44:53 -0000 1.5
@@ -58,6 +58,7 @@ ioctl(int fd, unsigned long request, ...
int err;
struct file *fil;
va_list ap;
+ SYSIO_ENTER;
err = 0;
fil = _sysio_fd_find(fd);
@@ -75,6 +76,7 @@ out:
errno = -err;
err = -1;
}
+ SYSIO_LEAVE;
return err;
}
Index: iowait.c
===================================================================
RCS file: /cvsroot/libsysio/libsysio/src/iowait.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -w -b -B -p -r1.4 -r1.5
--- iowait.c 17 Oct 2003 21:30:29 -0000 1.4
+++ iowait.c 21 Jan 2004 14:44:53 -0000 1.5
@@ -70,13 +70,19 @@ int
iodone(ioid_t ioid)
{
struct ioctx *ioctx;
+ int rc;
+ SYSIO_ENTER;
ioctx = lookup_ioid(ioid);
- if (!ioctx)
+ if (!ioctx) {
+ SYSIO_LEAVE;
return -1;
+ }
- return (ioctx->ioctx_done ||
+ rc = (ioctx->ioctx_done ||
(*ioctx->ioctx_ino->i_ops.inop_iodone)(ioctx));
+ SYSIO_LEAVE;
+ return rc;
}
/*
@@ -90,15 +96,19 @@ iowait(ioid_t ioid)
{
struct ioctx *ioctx;
ssize_t cc;
+ SYSIO_ENTER;
ioctx = lookup_ioid(ioid);
- if (!ioctx)
+ if (!ioctx) {
+ SYSIO_LEAVE;
return -1;
+ }
cc = _sysio_ioctx_wait(ioctx);
if (cc < 0) {
errno = -(int )cc;
cc = -1;
}
+ SYSIO_LEAVE;
return cc;
}
Index: lseek.c
===================================================================
RCS file: /cvsroot/libsysio/libsysio/src/lseek.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -w -b -B -p -r1.9 -r1.10
--- lseek.c 29 Oct 2003 00:10:42 -0000 1.9
+++ lseek.c 21 Jan 2004 14:44:53 -0000 1.10
@@ -119,15 +119,20 @@ lseek(int fd, off_t offset, int whence)
{
_SYSIO_OFF_T off;
off_t rtn;
+ SYSIO_ENTER;
off = _sysio_lseek(fd, offset, whence);
- if (off < 0)
+ if (off < 0) {
+ SYSIO_LEAVE;
return -1;
+ }
rtn = (off_t )off;
if ((_SYSIO_OFF_T )rtn != off) {
errno = EINVAL;
+ SYSIO_LEAVE;
return -1;
}
+ SYSIO_LEAVE;
return rtn;
}
Index: mkdir.c
===================================================================
RCS file: /cvsroot/libsysio/libsysio/src/mkdir.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -w -b -B -p -r1.3 -r1.4
--- mkdir.c 24 Mar 2003 22:09:06 -0000 1.3
+++ mkdir.c 21 Jan 2004 14:44:53 -0000 1.4
@@ -58,6 +58,7 @@ mkdir(const char *path, mode_t mode)
int err;
struct intent intent;
struct pnode *pno;
+ SYSIO_ENTER;
INTENT_INIT(&intent, INT_CREAT, &mode, NULL);
err = _sysio_namei(_sysio_cwd, path, ND_NEGOK, &intent, &pno);
@@ -80,5 +81,7 @@ out:
errno = -err;
err = -1;
}
+
+ SYSIO_LEAVE;
return err;
}
Index: mknod.c
===================================================================
RCS file: /cvsroot/libsysio/libsysio/src/mknod.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -w -b -B -p -r1.5 -r1.6
--- mknod.c 12 Jan 2004 18:05:22 -0000 1.5
+++ mknod.c 21 Jan 2004 14:44:53 -0000 1.6
@@ -115,8 +115,13 @@ out:
static int
__mknod(const char *path, mode_t mode, dev_t dev)
{
+ int rc;
+ SYSIO_ENTER;
- return __xmknod(_MKNOD_VER, path, mode, &dev);
+ rc = __xmknod(_MKNOD_VER, path, mode, &dev);
+
+ SYSIO_LEAVE;
+ return rc;
}
sysio_sym_weak_alias(__mknod, mknod)
Index: open.c
===================================================================
RCS file: /cvsroot/libsysio/libsysio/src/open.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -w -b -B -p -r1.11 -r1.12
--- open.c 14 Oct 2003 18:00:30 -0000 1.11
+++ open.c 21 Jan 2004 14:44:53 -0000 1.12
@@ -55,6 +55,7 @@
#include "file.h"
#include "fs.h"
#include "mount.h"
+#include "sysio-symbols.h"
#include "sysio-symbols.h"
@@ -129,6 +130,7 @@ open(const char *path, int flags, ...)
int err;
struct pnode *pno;
struct file *fil;
+ SYSIO_ENTER;
/*
* Get mode argument and determine parameters for namei
@@ -169,7 +171,7 @@ open(const char *path, int flags, ...)
* Find the file.
*/
fil = NULL;
- INTENT_INIT(&intent, intent.int_opmask, &mode, NULL);
+ INTENT_INIT(&intent, intent.int_opmask, &mode, &flags);
pno = NULL;
err = _sysio_namei(_sysio_cwd, path, ndflags, &intent, &pno);
if (err) {
@@ -196,6 +198,7 @@ open(const char *path, int flags, ...)
P_RELE(pno);
+ SYSIO_LEAVE;
return err;
error:
@@ -204,6 +207,7 @@ error:
if (pno)
P_RELE(pno);
errno = -err;
+ SYSIO_LEAVE;
return -1;
}
@@ -225,10 +229,12 @@ int
close(int fd)
{
int err;
+ SYSIO_ENTER;
err = _sysio_fd_close(fd);
if (err)
errno = -err;
+ SYSIO_LEAVE;
return err ? -1 : 0;
}
Index: read.c
===================================================================
RCS file: /cvsroot/libsysio/libsysio/src/read.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -w -b -B -p -r1.9 -r1.10
--- read.c 14 Oct 2003 18:00:30 -0000 1.9
+++ read.c 21 Jan 2004 14:44:53 -0000 1.10
@@ -112,14 +112,18 @@ ipreadv(int fd, const struct iovec *iov,
{
struct file *fil;
struct ioctx *ioctxp;
+ ioid_t rc;
+ SYSIO_ENTER;
fil = _sysio_fd_find(fd);
if (!fil) {
errno = -EBADF;
+ SYSIO_LEAVE;
return IOID_FAIL;
}
ioctxp = do_ixreadv(fil, iov, count, offset, NULL);
+ SYSIO_LEAVE;
return ioctxp ? ioctxp->ioctx_id : IOID_FAIL;
}
@@ -189,16 +193,22 @@ ireadv(int fd, const struct iovec *iov,
{
struct file *fil;
struct ioctx *ioctxp;
+ ioid_t rc;
+ SYSIO_ENTER;
fil = _sysio_fd_find(fd);
if (!fil) {
errno = -EBADF;
+ SYSIO_LEAVE;
return IOID_FAIL;
}
ioctxp = do_ixreadv(fil, iov, count, fil->f_pos, _sysio_fcompletio);
- if (!ioctxp)
+ if (!ioctxp) {
+ SYSIO_LEAVE;
return IOID_FAIL;
+ }
+ SYSIO_LEAVE;
return ioctxp->ioctx_id;
}
Index: rmdir.c
===================================================================
RCS file: /cvsroot/libsysio/libsysio/src/rmdir.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -w -b -B -p -r1.4 -r1.5
--- rmdir.c 27 Sep 2003 19:42:03 -0000 1.4
+++ rmdir.c 21 Jan 2004 14:44:53 -0000 1.5
@@ -58,6 +58,7 @@ rmdir(const char *path)
struct intent intent;
int err;
struct pnode *pno;
+ SYSIO_ENTER;
INTENT_INIT(&intent, INT_UPDPARENT, NULL, NULL);
err = _sysio_namei(_sysio_cwd, path, 0, &intent, &pno);
@@ -82,5 +83,6 @@ out:
errno = -err;
err = -1;
}
+ SYSIO_LEAVE;
return err;
}
Index: stat.c
===================================================================
RCS file: /cvsroot/libsysio/libsysio/src/stat.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -w -b -B -p -r1.7 -r1.8
--- stat.c 24 Oct 2003 18:49:24 -0000 1.7
+++ stat.c 21 Jan 2004 14:44:53 -0000 1.8
@@ -129,8 +129,13 @@ out:
static int
__fstat(int fd, struct stat *buf)
{
+ int rc;
+ SYSIO_ENTER;
- return __fxstat(_STAT_VER, fd, buf);
+ rc = __fxstat(_STAT_VER, fd, buf);
+
+ SYSIO_LEAVE;
+ return rc;
}
sysio_sym_weak_alias(__fstat, fstat)
@@ -186,8 +191,13 @@ out:
static int
__stat(const char *filename, struct stat *buf)
{
+ int rc;
+ SYSIO_ENTER;
+
+ rc = __xstat(_STAT_VER, filename, buf);
- return __xstat(_STAT_VER, filename, buf);
+ SYSIO_LEAVE;
+ return rc;
}
sysio_sym_weak_alias(__stat, stat)
@@ -243,8 +253,13 @@ out:
static int
__lstat(const char *filename, struct stat *buf)
{
+ int rc;
+ SYSIO_ENTER;
+
+ rc = __lxstat(_STAT_VER, filename, buf);
- return __lxstat(_STAT_VER, filename, buf);
+ SYSIO_LEAVE;
+ return rc;
}
sysio_sym_weak_alias(__lstat, lstat)
Index: stat64.c
===================================================================
RCS file: /cvsroot/libsysio/libsysio/src/stat64.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -w -b -B -p -r1.5 -r1.6
--- stat64.c 21 Oct 2003 01:13:58 -0000 1.5
+++ stat64.c 21 Jan 2004 14:44:53 -0000 1.6
@@ -91,8 +91,13 @@ out:
int
fstat64(int fd, struct stat64 *buf)
{
+ int rc;
+ SYSIO_ENTER;
- return __fxstat64(_STAT_VER, fd, buf);
+ rc = __fxstat64(_STAT_VER, fd, buf);
+
+ SYSIO_LEAVE;
+ return rc;
}
int
@@ -127,8 +132,13 @@ out:
int
stat64(const char *filename, struct stat64 *buf)
{
+ int rc;
+ SYSIO_ENTER;
+
+ rc = __xstat64(_STAT_VER, filename, buf);
- return __xstat64(_STAT_VER, filename, buf);
+ SYSIO_LEAVE;
+ return rc;
}
int
@@ -163,7 +173,12 @@ out:
int
lstat64(const char *filename, struct stat64 *buf)
{
+ int rc;
+ SYSIO_ENTER;
+
+ rc = __lxstat64(_STAT_VER, filename, buf);
- return __lxstat64(_STAT_VER, filename, buf);
+ SYSIO_LEAVE;
+ return rc;
}
#endif /* !_LARGEFILE64_SOURCE */
Index: statvfs.c
===================================================================
RCS file: /cvsroot/libsysio/libsysio/src/statvfs.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -w -b -B -p -r1.4 -r1.5
--- statvfs.c 10 Oct 2003 18:50:31 -0000 1.4
+++ statvfs.c 21 Jan 2004 14:44:53 -0000 1.5
@@ -88,6 +88,7 @@ statvfs(const char *path, struct statvfs
struct intnl_statvfs _call_buffer;
struct intnl_statvfs *_call_buf = &_call_buffer;
#endif
+ SYSIO_ENTER;
err = _sysio_namei(_sysio_cwd, path, 0, NULL, &pno);
if (err)
@@ -105,6 +106,7 @@ err:
errno = -err;
err = -1;
out:
+ SYSIO_LEAVE;
return err;
}
@@ -119,6 +121,7 @@ fstatvfs(int fd, struct statvfs *buf)
struct intnl_statvfs _call_buffer;
struct intnl_statvfs *_call_buf = &_call_buffer;
#endif
+ SYSIO_ENTER;
err = 0;
filp = _sysio_fd_find(fd);
@@ -138,6 +141,7 @@ err:
errno = -err;
err = -1;
out:
+ SYSIO_LEAVE;
return err;
}
#endif /* if !(defined(BSD) || defined(REDSTORM)) */
Index: statvfs64.c
===================================================================
RCS file: /cvsroot/libsysio/libsysio/src/statvfs64.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -w -b -B -p -r1.5 -r1.6
--- statvfs64.c 21 Oct 2003 13:38:47 -0000 1.5
+++ statvfs64.c 21 Jan 2004 14:44:53 -0000 1.6
@@ -60,6 +60,7 @@ statvfs64(const char *path, struct statv
{
int err;
struct pnode *pno;
+ SYSIO_ENTER;
err = _sysio_namei(_sysio_cwd, path, 0, NULL, &pno);
if (err)
@@ -72,6 +73,8 @@ out:
errno = -err;
err = -1;
}
+
+ SYSIO_LEAVE;
return err;
}
@@ -80,6 +83,7 @@ fstatvfs64(int fd, struct statvfs64 *buf
{
int err;
struct file *filp;
+ SYSIO_ENTER;
err = 0;
filp = _sysio_fd_find(fd);
@@ -94,6 +98,8 @@ out:
errno = -err;
err = -1;
}
+
+ SYSIO_LEAVE;
return err;
}
#endif /* if !(defined(BSD) || defined(REDSTORM)) */
Index: symlink.c
===================================================================
RCS file: /cvsroot/libsysio/libsysio/src/symlink.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -w -b -B -p -r1.3 -r1.4
--- symlink.c 24 Mar 2003 22:09:07 -0000 1.3
+++ symlink.c 21 Jan 2004 14:44:53 -0000 1.4
@@ -58,6 +58,7 @@ symlink(const char *oldpath, const char
int err;
struct intent intent;
struct pnode *pno;
+ SYSIO_ENTER;
INTENT_INIT(&intent, INT_CREAT, NULL, NULL);
err = _sysio_namei(_sysio_cwd, newpath, ND_NEGOK, &intent, &pno);
@@ -81,5 +82,6 @@ out:
errno = -err;
err = -1;
}
+ SYSIO_LEAVE;
return err;
}
Index: truncate.c
===================================================================
RCS file: /cvsroot/libsysio/libsysio/src/truncate.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -w -b -B -p -r1.5 -r1.6
--- truncate.c 23 Oct 2003 15:20:31 -0000 1.5
+++ truncate.c 21 Jan 2004 14:44:53 -0000 1.6
@@ -84,6 +84,7 @@ _truncate(const char *path, _SYSIO_OFF_T
{
int err;
struct pnode *pno;
+ SYSIO_ENTER;
err = _sysio_namei(_sysio_cwd, path, 0, NULL, &pno);
if (err)
@@ -96,6 +97,7 @@ out:
errno = -err;
err = -1;
}
+ SYSIO_LEAVE;
return err;
}
@@ -120,6 +122,7 @@ _ftruncate(int fd, _SYSIO_OFF_T length)
{
int err;
struct file *fil;
+ SYSIO_ENTER;
err = 0;
fil = _sysio_fd_find(fd);
@@ -133,6 +136,7 @@ out:
errno = -err;
err = -1;
}
+ SYSIO_LEAVE;
return err;
}
Index: unlink.c
===================================================================
RCS file: /cvsroot/libsysio/libsysio/src/unlink.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -w -b -B -p -r1.5 -r1.6
--- unlink.c 30 Oct 2003 15:20:49 -0000 1.5
+++ unlink.c 21 Jan 2004 14:44:53 -0000 1.6
@@ -58,6 +58,7 @@ unlink(const char *path)
struct intent intent;
int err;
struct pnode *pno;
+ SYSIO_ENTER;
INTENT_INIT(&intent, INT_UPDPARENT, NULL, NULL);
err = _sysio_namei(_sysio_cwd, path, ND_NOFOLLOW, &intent, &pno);
@@ -82,5 +83,6 @@ out:
errno = -err;
err = -1;
}
+ SYSIO_LEAVE;
return err;
}
Index: utime.c
===================================================================
RCS file: /cvsroot/libsysio/libsysio/src/utime.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -w -b -B -p -r1.1 -r1.2
--- utime.c 27 Sep 2003 19:42:03 -0000 1.1
+++ utime.c 21 Jan 2004 14:44:53 -0000 1.2
@@ -58,14 +58,12 @@
int
utime(const char *path, const struct utimbuf *buf)
{
- struct intent intent;
int err;
struct pnode *pno;
struct utimbuf _utbuffer;
struct intnl_stat stbuf;
- INTENT_INIT(&intent, INT_SETATTR, NULL, NULL);
- err = _sysio_namei(_sysio_cwd, path, 0, &intent, &pno);
+ err = _sysio_namei(_sysio_cwd, path, 0, NULL, &pno);
if (err)
goto out;
if (!buf) {
Index: write.c
===================================================================
RCS file: /cvsroot/libsysio/libsysio/src/write.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -w -b -B -p -r1.10 -r1.11
--- write.c 20 Oct 2003 15:51:22 -0000 1.10
+++ write.c 21 Jan 2004 14:44:53 -0000 1.11
@@ -112,14 +112,18 @@ ipwritev(int fd, const struct iovec *iov
{
struct file *fil;
struct ioctx *ioctxp;
+ ioid_t rc;
+ SYSIO_ENTER;
fil = _sysio_fd_find(fd);
if (!fil) {
errno = -EBADF;
+ SYSIO_LEAVE;
return IOID_FAIL;
}
ioctxp = do_ixwritev(fil, iov, count, offset, NULL);
+ SYSIO_LEAVE;
return ioctxp ? ioctxp->ioctx_id : IOID_FAIL;
}
@@ -189,16 +193,22 @@ iwritev(int fd, const struct iovec *iov,
{
struct file *fil;
struct ioctx *ioctxp;
+ ioid_t rc;
+ SYSIO_ENTER;
fil = _sysio_fd_find(fd);
if (!fil) {
- errno = -EBADF;
+ errno = EBADF;
+ SYSIO_LEAVE;
return IOID_FAIL;
}
ioctxp = do_ixwritev(fil, iov, count, fil->f_pos, _sysio_fcompletio);
- if (!ioctxp)
+ if (!ioctxp) {
+ SYSIO_LEAVE;
return IOID_FAIL;
+ }
+ SYSIO_LEAVE;
return ioctxp->ioctx_id;
}
|