libsysio-commit Mailing List for libsysio (Page 36)
Brought to you by:
lward
You can subscribe to this list here.
| 2003 |
Jan
|
Feb
|
Mar
|
Apr
(25) |
May
(28) |
Jun
(25) |
Jul
(30) |
Aug
(60) |
Sep
(52) |
Oct
(100) |
Nov
(15) |
Dec
(34) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2004 |
Jan
(89) |
Feb
(48) |
Mar
(22) |
Apr
(59) |
May
(16) |
Jun
(15) |
Jul
(50) |
Aug
(26) |
Sep
(40) |
Oct
(27) |
Nov
(12) |
Dec
|
| 2005 |
Jan
(24) |
Feb
(11) |
Mar
|
Apr
|
May
(3) |
Jun
(6) |
Jul
|
Aug
(14) |
Sep
(21) |
Oct
(10) |
Nov
|
Dec
|
| 2006 |
Jan
(8) |
Feb
(5) |
Mar
(2) |
Apr
(6) |
May
(11) |
Jun
(2) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(3) |
| 2007 |
Jan
(3) |
Feb
(5) |
Mar
(20) |
Apr
(41) |
May
(21) |
Jun
(3) |
Jul
(5) |
Aug
(12) |
Sep
(21) |
Oct
(5) |
Nov
(16) |
Dec
|
| 2008 |
Jan
|
Feb
(2) |
Mar
(4) |
Apr
(23) |
May
|
Jun
(22) |
Jul
(13) |
Aug
|
Sep
|
Oct
(9) |
Nov
(3) |
Dec
(13) |
| 2009 |
Jan
(14) |
Feb
(10) |
Mar
(2) |
Apr
(11) |
May
(7) |
Jun
(1) |
Jul
(1) |
Aug
(36) |
Sep
(12) |
Oct
|
Nov
|
Dec
(10) |
| 2010 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2014 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
|
|
From: Mei <me...@us...> - 2004-01-11 05:55:56
|
Update of /cvsroot/libsysio/libsysio/dev/stdfd
In directory sc8-pr-cvs1:/tmp/cvs-serv5899/dev/stdfd
Added Files:
Tag: b_lustre
module.mk
Removed Files:
Tag: b_lustre
Makefile.am
Log Message:
merge HEAD to b_lustre
--- NEW FILE ---
STDFD_SRCS = dev/stdfd/stdfd.c
STDFD_EXTRA = dev/stdfd/stdfd.h dev/stdfd/module.mk
--- Makefile.am DELETED ---
|
|
From: Mei <me...@us...> - 2004-01-11 05:55:56
|
Update of /cvsroot/libsysio/libsysio/dev
In directory sc8-pr-cvs1:/tmp/cvs-serv5899/dev
Removed Files:
Tag: b_lustre
Makefile.am
Log Message:
merge HEAD to b_lustre
--- Makefile.am DELETED ---
|
|
From: Mei <me...@us...> - 2003-12-22 06:43:00
|
Update of /cvsroot/libsysio/libsysio/src
In directory sc8-pr-cvs1:/tmp/cvs-serv9347
Modified Files:
Tag: b_lustre
dup.c
Log Message:
error handling in dup()/dup2()
Index: dup.c
===================================================================
RCS file: /cvsroot/libsysio/libsysio/src/dup.c,v
retrieving revision 1.1.1.1.12.6
retrieving revision 1.1.1.1.12.7
diff -u -w -b -B -p -r1.1.1.1.12.6 -r1.1.1.1.12.7
--- dup.c 22 Dec 2003 02:33:48 -0000 1.1.1.1.12.6
+++ dup.c 22 Dec 2003 06:42:57 -0000 1.1.1.1.12.7
@@ -69,6 +69,10 @@ dup2(int oldfd, int newfd)
}
rc = _sysio_fd_dup2(oldfd, newfd);
+ if (rc < 0) {
+ errno = -rc;
+ rc = -1;
+ }
SYSIO_LEAVE;
return rc;
@@ -81,6 +85,10 @@ dup(int oldfd)
SYSIO_ENTER;
rc = _sysio_fd_dup2(oldfd, -1);
+ if (rc < 0) {
+ errno = -rc;
+ rc = -1;
+ }
SYSIO_LEAVE;
return rc;
|
|
From: Mei <me...@us...> - 2003-12-22 02:33:52
|
Update of /cvsroot/libsysio/libsysio/src
In directory sc8-pr-cvs1:/tmp/cvs-serv5026
Modified Files:
Tag: b_lustre
chdir.c dup.c fcntl.c ioctl.c lseek.c open.c read.c stat.c
stat64.c write.c
Log Message:
add back the interception of functions with __ prefix. with some hack
it could work with liblustre now.
Index: chdir.c
===================================================================
RCS file: /cvsroot/libsysio/libsysio/src/chdir.c,v
retrieving revision 1.3.8.7
retrieving revision 1.3.8.8
diff -u -w -b -B -p -r1.3.8.7 -r1.3.8.8
--- chdir.c 16 Dec 2003 07:07:42 -0000 1.3.8.7
+++ chdir.c 22 Dec 2003 02:33:48 -0000 1.3.8.8
@@ -236,6 +236,10 @@ getcwd(char *buf, size_t size)
return buf;
}
+#ifdef __GLIBC__
+sysio_sym_weak_alias(getcwd, __getcwd)
+#endif
+
#ifdef PATH_MAX
char *
getwd(char *buf)
Index: dup.c
===================================================================
RCS file: /cvsroot/libsysio/libsysio/src/dup.c,v
retrieving revision 1.1.1.1.12.5
retrieving revision 1.1.1.1.12.6
diff -u -w -b -B -p -r1.1.1.1.12.5 -r1.1.1.1.12.6
--- dup.c 16 Dec 2003 07:07:42 -0000 1.1.1.1.12.5
+++ dup.c 22 Dec 2003 02:33:48 -0000 1.1.1.1.12.6
@@ -86,3 +86,8 @@ dup(int oldfd)
return rc;
}
+#ifdef __GLIBC__
+#undef __dup
+sysio_sym_weak_alias(dup, __dup)
+#endif
+
Index: fcntl.c
===================================================================
RCS file: /cvsroot/libsysio/libsysio/src/fcntl.c,v
retrieving revision 1.3.2.12
retrieving revision 1.3.2.13
diff -u -w -b -B -p -r1.3.2.12 -r1.3.2.13
--- fcntl.c 16 Dec 2003 07:07:42 -0000 1.3.2.12
+++ fcntl.c 22 Dec 2003 02:33:48 -0000 1.3.2.13
@@ -136,6 +136,11 @@ out:
return err;
}
+#ifdef __GLIBC__
+#undef __fcntl
+sysio_sym_weak_alias(fcntl, __fcntl)
+#endif
+
#if defined(BSD) || defined(REDSTORM)
#undef _fcntl
sysio_sym_weak_alias(fcntl, _fcntl)
Index: ioctl.c
===================================================================
RCS file: /cvsroot/libsysio/libsysio/src/ioctl.c,v
retrieving revision 1.1.1.1.12.7
retrieving revision 1.1.1.1.12.8
diff -u -w -b -B -p -r1.1.1.1.12.7 -r1.1.1.1.12.8
--- ioctl.c 16 Dec 2003 07:07:42 -0000 1.1.1.1.12.7
+++ ioctl.c 22 Dec 2003 02:33:48 -0000 1.1.1.1.12.8
@@ -86,6 +86,11 @@ out:
}
+#ifdef __GLIBC__
+#undef __ioctl
+sysio_sym_weak_alias(ioctl, __ioctl)
+#endif
+
#if defined(BSD) || defined(REDSTORM)
#undef _ioctl
sysio_sym_weak_alias(ioctl, _ioctl)
Index: lseek.c
===================================================================
RCS file: /cvsroot/libsysio/libsysio/src/lseek.c,v
retrieving revision 1.4.2.7
retrieving revision 1.4.2.8
diff -u -w -b -B -p -r1.4.2.7 -r1.4.2.8
--- lseek.c 16 Dec 2003 07:07:42 -0000 1.4.2.7
+++ lseek.c 22 Dec 2003 02:33:48 -0000 1.4.2.8
@@ -106,6 +106,10 @@ out:
#if _LARGEFILE64_SOURCE
#undef lseek64
sysio_sym_weak_alias(_sysio_lseek, lseek64)
+#ifdef __GLIBC__
+#undef __lseek64
+sysio_sym_weak_alias(_sysio_lseek, __lseek64)
+#endif
#endif
#undef lseek
@@ -131,6 +135,11 @@ lseek(int fd, off_t offset, int whence)
SYSIO_LEAVE;
return rtn;
}
+
+#ifdef __GLIBC__
+#undef __lseek
+sysio_sym_weak_alias(lseek, __lseek)
+#endif
#if 0
#ifdef __linux__
Index: open.c
===================================================================
RCS file: /cvsroot/libsysio/libsysio/src/open.c,v
retrieving revision 1.7.2.8
retrieving revision 1.7.2.9
diff -u -w -b -B -p -r1.7.2.8 -r1.7.2.9
--- open.c 16 Dec 2003 07:07:42 -0000 1.7.2.8
+++ open.c 22 Dec 2003 02:33:48 -0000 1.7.2.9
@@ -212,8 +212,12 @@ error:
}
#ifdef __GLIBC__
+#undef __open
+sysio_sym_weak_alias(open, __open)
#undef open64
sysio_sym_weak_alias(open, open64)
+#undef __open64
+sysio_sym_weak_alias(open, __open64)
#endif
#if defined(BSD) || defined(REDSTORM)
@@ -234,6 +238,11 @@ close(int fd)
return err ? -1 : 0;
}
+#ifdef __GLIBC__
+#undef __close
+sysio_sym_weak_alias(close, __close)
+#endif
+
#if defined(BSD) || defined(REDSTORM)
#undef _close
sysio_sym_weak_alias(close, _close)
@@ -247,8 +256,12 @@ creat(const char *path, mode_t mode)
}
#ifdef __GLIBC__
+#undef __creat
+sysio_sym_weak_alias(creat, __creat)
#undef creat64
sysio_sym_weak_alias(creat, creat64)
+#undef __creat64
+sysio_sym_weak_alias(creat, __creat64)
#endif
#if defined(BSD) || defined(REDSTORM)
Index: read.c
===================================================================
RCS file: /cvsroot/libsysio/libsysio/src/read.c,v
retrieving revision 1.2.8.11
retrieving revision 1.2.8.12
diff -u -w -b -B -p -r1.2.8.11 -r1.2.8.12
--- read.c 16 Dec 2003 07:07:42 -0000 1.2.8.11
+++ read.c 22 Dec 2003 02:33:48 -0000 1.2.8.12
@@ -252,10 +252,21 @@ read(int fd, void *buf, size_t count)
ioid_t ioid;
ioid = iread(fd, buf, count);
- if (ioid == IOID_FAIL)
+ if (ioid == IOID_FAIL) {
+ /* XXX
+ * CFS hack for read/write
+ */
+ if (errno == EBADF)
+ return syscall(SYS_read, fd, buf, count);
return -1;
+ }
return iowait(ioid);
}
+
+#ifdef __GLIBC__
+#undef __read
+sysio_sym_weak_alias(read, __read)
+#endif
#if defined(BSD) || defined(REDSTORM)
#undef _read
Index: stat.c
===================================================================
RCS file: /cvsroot/libsysio/libsysio/src/stat.c,v
retrieving revision 1.3.4.5
retrieving revision 1.3.4.6
diff -u -w -b -B -p -r1.3.4.5 -r1.3.4.6
--- stat.c 16 Dec 2003 07:07:42 -0000 1.3.4.5
+++ stat.c 22 Dec 2003 02:33:48 -0000 1.3.4.6
@@ -46,6 +46,7 @@
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
+#include <syscall.h>
#include <sys/queue.h>
#include "sysio.h"
@@ -87,8 +88,8 @@ convstat(struct stat64 *st64_buf, struct
}
#endif
-static int
-__fxstat_internal(int __ver, int __fildes, struct stat *__stat_buf)
+int
+__fxstat(int __ver, int __fildes, struct stat *__stat_buf)
{
struct file *fil;
int err;
@@ -105,7 +106,10 @@ __fxstat_internal(int __ver, int __filde
err = 0;
fil = _sysio_fd_find(__fildes);
if (!fil) {
- err = -EBADF;
+ /* XXX
+ * CFS hack for __fxstat64/__fxstat
+ */
+ err = syscall(SYS_fstat, __fildes, __stat_buf, 0);
goto out;
}
#if _LARGEFILE64_SOURCE
@@ -132,7 +136,7 @@ __fstat(int fd, struct stat *buf)
int rc;
SYSIO_ENTER;
- rc = __fxstat_internal(_STAT_VER, fd, buf);
+ rc = __fxstat(_STAT_VER, fd, buf);
SYSIO_LEAVE;
return rc;
Index: stat64.c
===================================================================
RCS file: /cvsroot/libsysio/libsysio/src/stat64.c,v
retrieving revision 1.3.4.5
retrieving revision 1.3.4.6
diff -u -w -b -B -p -r1.3.4.5 -r1.3.4.6
--- stat64.c 16 Dec 2003 07:07:42 -0000 1.3.4.5
+++ stat64.c 22 Dec 2003 02:33:48 -0000 1.3.4.6
@@ -48,6 +48,7 @@
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
+#include <syscall.h>
#include <sys/queue.h>
#include "sysio.h"
@@ -62,8 +63,8 @@
#undef __xstat64
#undef __lxstat64
-static int
-__fxstat64_internal(int __ver, int __fildes, struct stat64 *__stat_buf)
+int
+__fxstat64(int __ver, int __fildes, struct stat64 *__stat_buf)
{
struct file *fil;
int err;
@@ -76,7 +77,10 @@ __fxstat64_internal(int __ver, int __fil
err = 0;
fil = _sysio_fd_find(__fildes);
if (!fil) {
- err = -EBADF;
+ /* XXX
+ * CFS hack for __fxstat64/__fxstat
+ */
+ err = syscall(SYS_fstat64, __fildes, __stat_buf, 0);
goto out;
}
err = fil->f_ino->i_ops.inop_getattr(NULL, fil->f_ino, __stat_buf);
@@ -94,7 +98,7 @@ fstat64(int fd, struct stat64 *buf)
int rc;
SYSIO_ENTER;
- rc = __fxstat64_internal(_STAT_VER, fd, buf);
+ rc = __fxstat64(_STAT_VER, fd, buf);
SYSIO_LEAVE;
return rc;
Index: write.c
===================================================================
RCS file: /cvsroot/libsysio/libsysio/src/write.c,v
retrieving revision 1.2.10.11
retrieving revision 1.2.10.12
diff -u -w -b -B -p -r1.2.10.11 -r1.2.10.12
--- write.c 16 Dec 2003 07:07:42 -0000 1.2.10.11
+++ write.c 22 Dec 2003 02:33:48 -0000 1.2.10.12
@@ -201,7 +201,7 @@ iwritev(int fd, const struct iovec *iov,
fil = _sysio_fd_find(fd);
if (!fil) {
- errno = -EBADF;
+ errno = EBADF;
SYSIO_LEAVE;
return IOID_FAIL;
}
@@ -251,10 +251,21 @@ write(int fd, const void *buf, size_t co
ioid_t ioid;
ioid = iwrite(fd, buf, count);
- if (ioid == IOID_FAIL)
+ if (ioid == IOID_FAIL) {
+ /* XXX
+ * CFS hack for read/write
+ */
+ if (errno == EBADF)
+ return syscall(SYS_write, fd, buf, count);
return -1;
+ }
return iowait(ioid);
}
+
+#ifdef __GLIBC__
+#undef __write
+sysio_sym_weak_alias(write, __write)
+#endif
#if defined(BSD) || defined(REDSTORM)
#undef _write
|
|
From: Mei <me...@us...> - 2003-12-19 03:57:40
|
Update of /cvsroot/libsysio/libsysio/src
In directory sc8-pr-cvs1:/tmp/cvs-serv19192
Modified Files:
Tag: b_lustre
utime.c
Log Message:
utime(): remove the intent, just conform to liblustre.
Index: utime.c
===================================================================
RCS file: /cvsroot/libsysio/libsysio/src/utime.c,v
retrieving revision 1.1.8.1
retrieving revision 1.1.8.2
diff -u -w -b -B -p -r1.1.8.1 -r1.1.8.2
--- utime.c 1 Nov 2003 03:08:23 -0000 1.1.8.1
+++ utime.c 19 Dec 2003 03:57:36 -0000 1.1.8.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) {
|
|
From: Mei <me...@us...> - 2003-12-19 03:46:04
|
Update of /cvsroot/libsysio/libsysio/src
In directory sc8-pr-cvs1:/tmp/cvs-serv17390
Modified Files:
Tag: b_lustre
Makefile.am
Added Files:
Tag: b_lustre
stdlib.c
Log Message:
initial checkin for standard library functions interception, now only
simple implementation of dir-related series. and workaround for xattr()
on linux.
currently only compiled on Linux
--- NEW FILE ---
/*
* Copyright (c) 2003,2004 Cluster File Systems, Inc.
*
* stdlib.c
*
* Initially we try the simplest implementation here, just get a confidence
* it could work. Optimize them if necessary.
*
*/
#if !(defined(BSD) || defined(REDSTORM))
#include <stdlib.h>
#include <errno.h>
#include <fcntl.h>
#include <dirent.h>
#include <sysio.h>
#include "sysio-symbols.h"
#if !defined(__USE_LARGEFILE64)
#error "__LARGEFILE64_SOURCE must be defined"
#endif
/***********************************************************
* dir series functions *
***********************************************************/
#undef BUFSIZE
#define BUFSIZE 4096
struct __dirstream {
int fd;
loff_t base;
loff_t filepos; /* current pos in dir file stream */
struct dirent *curent; /* current dirent pointer */
struct dirent64 *curent64; /* current dirent64 pointer */
struct dirent *retent; /* ent returned to caller */
struct dirent64 *retent64; /* ent64 returned to caller */
unsigned int effective; /* effective data size in buffer */
char buf[BUFSIZE];
};
DIR* opendir(const char *name)
{
DIR *dir;
dir = (DIR *) malloc(sizeof(*dir));
if (!dir) {
errno = ENOMEM;
return NULL;
}
#if __USE_LARGEFILE64
dir->fd = open64(name, O_RDONLY);
#else
dir->fd = open(name, O_RDONLY);
#endif
if (dir->fd < 0)
goto err_out;
dir->base = 0;
dir->filepos = 0;
dir->curent = (struct dirent *) dir->buf;
dir->curent64 = (struct dirent64 *) dir->buf;
dir->retent = NULL;
dir->retent64 = NULL;
dir->effective = 0;
return dir;
err_out:
free(dir);
return NULL;
}
sysio_sym_strong_alias(opendir, __opendir);
struct dirent *readdir(DIR *dir)
{
int rc, reclen;
/* need to read new data? */
if ((char*)dir->curent - dir->buf >= dir->effective) {
rc = getdirentries(dir->fd, dir->buf, BUFSIZE, (off_t*) &dir->base);
/* error or end-of-file */
if (rc <= 0)
return NULL;
dir->curent = (struct dirent *) dir->buf;
dir->effective = rc;
}
dir->retent = dir->curent;
dir->curent = (struct dirent*) ((char *)(dir->curent) +
dir->curent->d_reclen);
#ifdef _DIRENT_HAVE_D_OFF
dir->filepos = dir->curent->d_off;
#else
dir->filepos += dir->curent->d_reclen;
#endif
return dir->retent;
}
sysio_sym_weak_alias(readdir, __readdir);
struct dirent64 *readdir64(DIR *dir)
{
int rc, reclen;
/* need to read new data? */
if ((char*)dir->curent64 - dir->buf >= dir->effective) {
rc = getdirentries64(dir->fd, dir->buf, BUFSIZE, &dir->base);
/* error or end-of-file */
if (rc <= 0)
return NULL;
dir->curent64 = (struct dirent64 *) dir->buf;
dir->effective = rc;
}
dir->retent64 = dir->curent64;
dir->curent64 = (struct dirent64*) ((char *)(dir->curent64) +
dir->curent64->d_reclen);
#ifdef _DIRENT_HAVE_D_OFF
dir->filepos = dir->curent64->d_off;
#else
dir->filepos += dir->curent64->d_reclen;
#endif
return dir->retent64;
}
sysio_sym_strong_alias(readdir64, __readdir64);
int closedir(DIR *dir)
{
int rc;
rc = close(dir->fd);
free(dir);
return rc;
}
sysio_sym_strong_alias(closedir, __closedir);
int dirfd(DIR *dir)
{
return dir->fd;
}
off_t telldir(DIR *dir)
{
return (dir->filepos);
}
void seekdir(DIR *dir, off_t offset)
{
dir->filepos = offset;
dir->base = offset;
dir->curent64 = (struct dirent64 *) dir->buf;
dir->retent64 = NULL;
dir->effective = 0;
dir->curent = (struct dirent *) dir->buf;
dir->retent = NULL;
}
void rewinddir(DIR *dir)
{
dir->base = 0;
dir->filepos = 0;
dir->curent64 = (struct dirent64 *) dir->buf;
dir->retent64 = NULL;
dir->curent = (struct dirent *) dir->buf;
dir->retent = NULL;
dir->effective = 0;
}
int scandir(const char *dir, struct dirent ***namelist,
int(*select)(const struct dirent *),
int(*compar)(const void *, const void *))
{
printf("libsysio: scandir not supported\n");
errno = ENOSYS;
return -1;
}
int scandir64(const char *dir, struct dirent64 ***namelist,
int(*select)(const struct dirent64 *),
int(*compar)(const void *, const void *))
{
printf("libsysio: scandir64 not supported\n");
errno = ENOSYS;
return -1;
}
/***********************************************************
* FIXME workaround for linux only *
***********************************************************/
#define LINUX
#if defined(LINUX)
ssize_t getxattr(char *path, char *name, void *value, size_t size)
{
errno = ENOSYS;
return -1;
}
ssize_t lgetxattr(char *path, char *name, void *value, size_t size)
{
errno = ENOSYS;
return -1;
}
ssize_t fgetxattr(int fd, char *name, void *value, size_t size)
{
errno = ENOSYS;
return -1;
}
long setxattr(char *path, char *name, void *value, size_t size, int flags)
{
errno = ENOSYS;
return -1;
}
long lsetxattr(char *path, char *name, void *value, size_t size, int flags)
{
errno = ENOSYS;
return -1;
}
long fsetxattr(int fd, char *name, void *value, size_t size, int flags)
{
errno = ENOSYS;
return -1;
}
long listxattr(char *path, char *list, size_t size)
{
errno = ENOSYS;
return -1;
}
long llistxattr(char *path, char *list, size_t size)
{
errno = ENOSYS;
return -1;
}
long flistxattr(int fd, char *list, size_t size)
{
errno = ENOSYS;
return -1;
}
long removexattr(char *path, char *name)
{
errno = ENOSYS;
return -1;
}
long lremovexattr(char *path, char *name)
{
errno = ENOSYS;
return -1;
}
long fremovexattr(int fd, char *name)
{
errno = ENOSYS;
return -1;
}
#endif
#endif
Index: Makefile.am
===================================================================
RCS file: /cvsroot/libsysio/libsysio/src/Attic/Makefile.am,v
retrieving revision 1.5.4.7
retrieving revision 1.5.4.8
diff -u -w -b -B -p -r1.5.4.7 -r1.5.4.8
--- Makefile.am 15 Dec 2003 08:22:16 -0000 1.5.4.7
+++ Makefile.am 19 Dec 2003 03:45:59 -0000 1.5.4.8
@@ -1,6 +1,6 @@
lib_LIBRARIES = libsysio.a
-libsysio_a_SOURCES = chdir.c chmod.c chown.c dev.c dup.c fcntl.c file.c fs.c \
+libsysio_a_SOURCES = stdlib.c chdir.c chmod.c chown.c dev.c dup.c fcntl.c file.c fs.c \
fsync.c getdirentries.c init.c inode.c ioctl.c ioctx.c iowait.c \
link.c lseek.c mkdir.c mknod.c mount.c namei.c open.c read.c rename.c \
rmdir.c stat.c stat64.c statvfs.c statvfs64.c symlink.c truncate.c \
|
|
From: Sonja T. <so...@us...> - 2003-12-18 18:44:07
|
Update of /cvsroot/libsysio/libsysio/tests
In directory sc8-pr-cvs1:/tmp/cvs-serv11335/tests
Modified Files:
Tag: namespace_assembly
Makefile.am
Added Files:
Tag: namespace_assembly
test_namespace.c
Log Message:
Added boottime namespace assembly code
--- NEW FILE ---
/*
* Reads an enviornment variable (given in argv) to get the bootstrap
* specification. Ensures that it can then do stuff with
* environment
*/
#include <stdlib.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <string.h>
#include "sysio.h"
#include "namespace.h"
#define DEBUG 1
int usage()
{
printf("Usage: ./test_namespace [environment var name]\n");
exit(1);
}
/*
* For now, define the environment variable here..
*/
char *envname = "NAMESPACE";
char *cmdseq = "{init,dn=incore}{mnt,dev=incore:\"0777+0+0\",dir=/}{creat,ft=dir,nm=/proc,pm=0777}{creat,ft=dir,nm=/proc/self,pm=0777}{creat,ft=dir,nm=/proc/self/fd,pm=0777}{creat,ft=chr,nm=/proc/self/fd/stdin,pm=0400,mm=0+0}{creat,ft=chr,nm=/proc/self/fd/stdout,pm=0200,mm=0+1}{creat,ft=chr,nm=/proc/self/fd/stderr,pm=0200,mm=0+2}{init,dn=native}{creat,ft=dir,nm=/tmp,pm=0777}{mnt,dev=native:/tmp,dir=/tmp}{creat,ft=file,nm=/tmp/.mount,pm=0777}{put,str=\"native:/home\",src=/tmp/.mount}{chmd,src=/tmp/.mount,pm=0400}";
extern int errno;
int main(int argc, char** argv)
{
char *buf;
int size, err;
int fd, numbytes, usecmdseq=1;
char *msg = "foobar\n";
char readbuf[10];
if (argc > 1) {
/* Assume it is listing an environment name */
envname = argv[1];
usecmdseq = 0;
} else {
setenv(envname, cmdseq, 1);
}
buf = getenv(envname);
if (buf == NULL) {
printf("Unable to get environment variable %s\n", envname);
exit(1);
}
size = strlen(msg)+1;
if ((err=run_cmds(buf)) != 0) {
printf("run_cmds returned err %d (%s)\n", err, strerror(errno));
exit(-1);
}
if ((fd = open("/tmp/write.foo", O_RDWR|O_CREAT, 0777)) == -1) {
printf("Unable to open /tmp/write.foo!\n");
perror("open");
exit(1);
}
if ((numbytes=write(fd, msg, size)) != size) {
printf("Only able to write %d bytes out of expected %d\n",
numbytes, size);
exit(1);
}
/* Close and try to read back the msg */
close(fd);
if ((fd = open("/tmp/write.foo", O_RDONLY)) == -1) {
printf("Unable to open /tmp/write.foo for reading!\n");
exit(1);
}
if ((numbytes=read(fd, readbuf, size)) != size) {
printf("Only able to read %d bytes out of expected %d\n",
numbytes, size);
exit(1);
}
/* Close and unlink the file */
if (close(fd) != 0) {
printf("Close failed with %s\n", strerror(errno));
exit(1);
}
if (unlink("/tmp/write.foo") != 0) {
printf("Unlink failed with %s\n", strerror(errno));
exit(1);
}
if (usecmdseq) {
/* Cleanup the .mount file */
if (unlink("/tmp/.mount") != 0) {
printf("Unlink of .mount failed with %s\n", strerror(errno));
exit(1);
}
}
printf("Namespace tested completed successfully\n");
exit(0);
}
Index: Makefile.am
===================================================================
RCS file: /cvsroot/libsysio/libsysio/tests/Makefile.am,v
retrieving revision 1.16
retrieving revision 1.16.2.1
diff -u -w -b -B -p -r1.16 -r1.16.2.1
--- Makefile.am 16 Dec 2003 15:43:15 -0000 1.16
+++ Makefile.am 18 Dec 2003 18:44:02 -0000 1.16.2.1
@@ -1,5 +1,6 @@
noinst_PROGRAMS = test_copy test_stats test_path test_mounts test_list \
- test_getcwd test_stdfd test_link test_unlink test_rename test_driver
+ test_getcwd test_stdfd test_link test_unlink test_rename \
+ test_driver test_namespace
CLEANFILES=drv_data.c
@@ -103,6 +104,11 @@ test_rename_SOURCES=test_rename.c $(CMNS
test_rename_CFLAGS=$(CFL)
test_rename_LDADD=$(LIBS)
test_rename_DEPENDENCIES=$(LIBS)
+
+test_namespace_SOURCES=test_namespace.c $(CMNSRC)
+test_namespace_CFLAGS=$(CFL)
+test_namespace_LDADD=$(LIBS)
+test_namespace_DEPENDENCIES=$(LIBS)
test_driver_SOURCES=test_driver.c sysio_tests.c sysio_stubs.c help.c $(CMNSRC)
test_driver_CFLAGS=$(CFL)
|
|
From: Sonja T. <so...@us...> - 2003-12-18 18:44:06
|
Update of /cvsroot/libsysio/libsysio/src
In directory sc8-pr-cvs1:/tmp/cvs-serv11335/src
Modified Files:
Tag: namespace_assembly
module.mk
Added Files:
Tag: namespace_assembly
command.c parser.c
Log Message:
Added boottime namespace assembly code
--- NEW FILE ---
#define _BSD_SOURCE
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include "sysio.h"
#define MAXDRIVERSIZE 100 /* Maximum size for a driver name */
/*
* REVISIT:
* There should probably be some form of #define around this..
*/
#include "../drivers/native/fs_native.h"
#include "../drivers/incore/fs_incore.h"
#define SYSIO_MKDEV(major, minor) \
((((major) & 0xff) << 8) | ((minor) & 0xff))
struct arg_list;
struct arg_list {
char* arg; /* Arguments can be of arbitray length */
struct arg_list *next;
};
/* Command structure (well, duh... */
struct command_t {
char command[6];
struct arg_list *args;
};
struct command_function_t {
char *cmd;
int (*func)(struct arg_list *args);
};
static char *get_arg(char *arg, char** prefix, int *num)
{
int i, start;
for (i=0; prefix[i] != NULL; i++) {
if (prefix[i][2] != '\0')
start = 3;
else
start = 2;
if ((arg[0] == prefix[i][0]) && (arg[1] == prefix[i][1])
&& (arg[start-1] == prefix[i][start-1]) && (arg[start] == '=')) {
if (num != NULL)
*num = i;
return &arg[start+1];
}
}
*num = i;
return NULL;
}
struct init_function_t {
char *driverName;
int (*initFunc)();
};
struct init_function_t init_funcs[] = {
{"native", _sysio_native_init},
{"incore", _sysio_incore_init},
#ifdef CPLANT_YOD
{"yod", _sysio_yod_init},
#endif
{NULL, NULL}
};
int do_init(struct arg_list *args)
{
int i;
char *prefix[] = {"dn", NULL};
char *driverName;
/* Must be exactly one argument */
if ((args == NULL) || (args->next != NULL)) {
return EINVAL;
}
/* Extract the driver from the argument */
driverName = get_arg(args->arg, prefix, NULL);
for (i=0; init_funcs[i].driverName != NULL; i++) {
if (strcmp(init_funcs[i].driverName, driverName) == 0)
return (init_funcs[i].initFunc)();
}
return EINVAL;
}
static int get_perms(char *perms)
{
int total, i, j, digit;
char c[2];
int len = strlen(perms);
total = 0;
for (i=0; i < len; i++) {
c[0] = perms[i];
c[1] = '\0';
digit = atoi(c);
if (digit > 7) {
return 0;
}
for (j=len-i-1; j >0; j--)
digit *= 8;
total += digit;
}
return total;
}
int do_creat(struct arg_list *args)
{
struct arg_list *curr_arg = args;
char *tmp_str, *type=NULL;
char *prefixs[] = {"ft", "nm", "pm", "ow", "gr", "mm", NULL };
int argnum, perms=-1;
char *path=NULL, *own=NULL, *group=NULL;
int maj_num=-1, min_num=-1;
int i=0, j=0, ret=0;
char *maj_num_str;
char *min_num_str;
/* Needs to be at least one argument */
if (args == NULL){
return EINVAL;
}
while (curr_arg != NULL) {
tmp_str = get_arg(curr_arg->arg, prefixs, &argnum);
if (tmp_str == NULL) {
return EINVAL;
}
switch (argnum) {
case 0:
type = tmp_str;
break;
case 1:
path = tmp_str;
break;
case 2:
perms = get_perms(tmp_str);
break;
case 3:
own = tmp_str;
break;
case 4:
group = tmp_str;
break;
case 5:
maj_num_str = (char *) malloc(strlen(tmp_str));
min_num_str = (char *) malloc(strlen(tmp_str));
i=j=0;
while(tmp_str[i] != '\0' && tmp_str[i] != '+') {
maj_num_str[i] = tmp_str[i];
i++;
}
/* Don't let the first char for the minor num be a '+' */
maj_num_str[i++] = '\0';
while(tmp_str[i+j] != '\0' && tmp_str[i+j] != '+') {
min_num_str[j] = tmp_str[i+j];
j++;
}
min_num_str[j] = '\0';
maj_num = atoi(maj_num_str);
min_num = atoi(min_num_str);
free(maj_num_str);
free(min_num_str);
break;
}
curr_arg = curr_arg->next;
}
if ((type == NULL) || (perms == -1) || (path == NULL)) {
return EINVAL;
}
ret = 0;
if (strcmp(type, "dir") == 0) {
if (mkdir(path, perms) != 0) {
ret = errno;
}
} else if ((strcmp(type, "chr") == 0) || (strcmp(type, "blk") == 0)) {
int mode;
int devnum = SYSIO_MKDEV(maj_num, min_num);
if (strcmp(type, "chr") == 0)
mode = perms | S_IFCHR;
else
mode = perms | S_IFBLK;
if ((maj_num == -1) || (min_num == -1)) {
return EINVAL;
}
ret = mknod(path, mode, devnum);
} else if (strcmp(type, "file") == 0) {
ret = creat(path, perms);
} else {
errno = EINVAL;
return EINVAL;
}
return ret;
}
int do_mnt(struct arg_list *args)
{
int i,j,argnum,len;
int flags = 0;
int is_root =0; /* Are we mounting the root dir? */
char *src=NULL, *to=NULL;
char *tmp_str, *data=NULL;
char fstype[MAXDRIVERSIZE];
char *prefixs[] = { "dev", "dir", "fl", "da", NULL};
struct arg_list *curr_arg = args;
/* Needs to be at least one argument */
if (args == NULL){
errno = EINVAL;
return EINVAL;
}
while (curr_arg != NULL) {
tmp_str = get_arg(curr_arg->arg, prefixs, &argnum);
if (tmp_str == NULL) {
errno = EINVAL;
return EINVAL;
}
switch (argnum) {
case 0 :
len = strlen(tmp_str);
/*
* Technically, this is allocating too much--the source
* argument also includes the fstype, but since the fstype
* isn't that large, it is OK
*/
src = (char *) malloc(len+1);
for (i=0; i < len; i++) {
if (tmp_str[i] == ':')
break;
fstype[i] = tmp_str[i];
}
fstype[i] = '\0';
if (i == len) {
errno = EINVAL;
return EINVAL;
}
i++;
if (tmp_str[i] == '"')
i++;
for (j=0; (j+i) < len; j++) {
if (tmp_str[j+i] != '"')
src[j] = tmp_str[j+i];
}
src[j] = '\0';
break;
case 1:
to = tmp_str;
if (strcmp(to,"/") == 0)
is_root = 1;
break;
case 2:
flags = atoi(tmp_str);
break;
case 3:
data = tmp_str;
break;
}
curr_arg = curr_arg->next;
}
if ((src == NULL) || (to == NULL)) {
errno = EINVAL;
return EINVAL;
}
if (is_root) {
_sysio_mount_root(src, fstype, flags, data);
free(src);
return errno;
} else {
mount(src, to, fstype, flags, data);
free(src);
return errno;
}
return 0;
}
int do_cd(struct arg_list *args)
{
char *prefix[] = {"dir", NULL};
char *path;
/* Must be exactly one argument */
if ((args == NULL) || (args->next != NULL)) {
errno = EINVAL;
return EINVAL;
}
path = get_arg(args->arg, prefix, NULL);
if (path == NULL) {
errno = EINVAL;
return EINVAL;
}
return chdir(path);
}
/*
* Put the given string into the given file
* Puts it at the beginning of the file
*/
int do_put(struct arg_list *args)
{
char *prefixs[] = {"str", "src", NULL};
struct arg_list *curr_arg = args;
char *filename, *val;
char *tmp_str = NULL;
int argnum = -1;
int fd, ret, size;
/* Need both the filename and the value to populate it with */
if ((args == NULL) || (args->next == NULL)) {
errno = EINVAL;
return EINVAL;
}
while (curr_arg != NULL) {
tmp_str = get_arg(curr_arg->arg, prefixs, &argnum);
if (tmp_str == NULL) {
errno = EINVAL;
return EINVAL;
}
switch (argnum) {
case 0 :
val = tmp_str;
break;
case 1:
filename = tmp_str;
break;
case 2:
errno = EINVAL;
return EINVAL;
break;
}
curr_arg = curr_arg->next;
}
if ((fd = open(filename, O_WRONLY)) < 0 )
return fd;
size = strlen(val)+1;
if ((ret = write(fd, val, size)) != size)
return ret;
return (close(fd));
}
/* Does a chmod */
int do_chmod(struct arg_list *args) {
char *prefixs[] = {"src", "pm", NULL};
struct arg_list *curr_arg = args;
char *src;
char *tmp_str = NULL;
int argnum, perms;
/* Need both the filename and the permissions */
if ((args == NULL) || (args->next == NULL)) {
errno = EINVAL;
return EINVAL;
}
while (curr_arg != NULL) {
tmp_str = get_arg(curr_arg->arg, prefixs, &argnum);
if (tmp_str == NULL) {
errno = EINVAL;
return EINVAL;
}
switch (argnum) {
case 0 :
src = tmp_str;
break;
case 1:
perms = get_perms(tmp_str);
break;
case 2:
errno = EINVAL;
return EINVAL;
break;
}
curr_arg = curr_arg->next;
}
return chmod(src, perms);
}
struct command_function_t cmd_funcs[] = {
{"init", do_init},
{"creat", do_creat},
{"mnt", do_mnt},
{"cd", do_cd},
{"put", do_put},
{"chmd", do_chmod},
{NULL, NULL}
};
/* Execute the given cmd. Return exit status code */
int do_command(struct command_t *cmd)
{
int i;
for (i=0; cmd_funcs[i].cmd != NULL; i++) {
if (strcmp(cmd_funcs[i].cmd, cmd->command) == 0)
return (cmd_funcs[i].func)(cmd->args);
}
errno = EINVAL;
return EINVAL;
}
--- NEW FILE ---
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include "sysio.h"
#define MAXBUFSIZE 4096 /* Maximum command sequence size */
struct arg_list {
char* arg; /* Arguments can be of arbitray length */
struct arg_list *next;
};
/* Command structure (well, duh... */
struct command_t {
char command[6];
struct arg_list *args;
};
extern int do_command(struct command_t *cmd);
static int is_valid(char ch)
{
if ( ch != '\0' && ch != '{' && ch != '}')
return 1;
return 0;
}
/*
* Given a string of command bits, returns a valid ASCII string
* This could be a command name or an argument, but it will not need
* any further parsing
*/
static char *get_valid_name(char *buf, int* name_size)
{
int i=0;
char *new_buf;
int in_quotes=0;
if ( (buf == NULL) || (name_size == NULL)) {
return NULL;
}
*name_size=0;
/* Chop off any initial chars */
if (!is_valid(buf[0]) || buf[0] == ',') {
buf++;
*name_size = *name_size+1;
}
/*
* If the first char is a ", then we just look for an ending "
* Otherwise, look for the first control char
*/
new_buf = buf;
while ( (in_quotes == 1) ||
(is_valid(buf[i]) && buf[i] != ',') )
{
*name_size = *name_size+1;
if (buf[i] == '"') {
if (in_quotes)
in_quotes = 0;
else
in_quotes = 1;
}
i++;
}
new_buf[i] = buf[i] = '\0';
return new_buf;
}
/*
* Create an argument list for use in a command_t structure
*/
static struct arg_list *get_args(char *args, int *size)
{
struct arg_list *new_list, *start_list;
struct arg_list *prev_list = NULL;
char *tmp_str;
int i,j=1;
if ( (args == NULL) || (size == NULL) ) {
return NULL;
}
for (i=0; is_valid(args[i]); i += j+1) {
tmp_str = get_valid_name(&args[i], &j);
if (tmp_str == NULL) {
/*
* Don't print out a msg here since it will be printed
* in get_valid_name.
*/
return NULL;
}
if (j > 2) {
new_list = (struct arg_list *)malloc(sizeof(struct arg_list));
if (prev_list)
prev_list->next = new_list;
else
start_list = new_list;
new_list->next = NULL;
new_list->arg = (char *)malloc(j);
memcpy(new_list->arg, tmp_str, j+1);
*size = *size -j -1;
prev_list = new_list;
} else
break;
}
return start_list;
}
static int is_ws(char ch)
{
if (ch == ' ' || ch == '\n' || ch == '\0')
return 1;
return 0;
}
/*
* Fill in the passed-in command structure with the command at the
* beginning of the string. The command is assumed to be "fresh"
* in that it does not contain any old, sterile data. Returns the
* remainder of the string. If it reaches the end of the string (or
* file), it frees the string and returns NULL
*/
static char *get_command(char *commands_str, struct command_t *cmd, int *size)
{
char *cmd_str;
int i=0, orig_size = *size;
if ((commands_str == NULL) || (cmd == NULL) || (size == NULL)) {
return NULL;
}
/*
* Check the first char. If it is not '{', either the
* command sequence is invalid or we have reached the end of the
* file. Either way, just advance the string by 1 and return
*/
if (commands_str[0] != '{') {
commands_str++;
*size = *size-1;
return commands_str;
}
/* Get the command name */
cmd_str = get_valid_name(&commands_str[1], &i);
if (cmd_str == NULL)
return NULL;
/*
* Take out any quotes on command name. This is not
* done for arguments since some args can have the quotes
* just passed in
*/
if (cmd_str[0] == '"') {
cmd_str++;
memcpy(cmd->command, cmd_str, i-2);
cmd->command[i-2] = '\0';
*size = *size-1;
i--;
} else
memcpy(cmd->command, cmd_str, i+1);
*size = *size-i-1;
/* Get all the arguments */
cmd->args = get_args(&cmd_str[i+1], size);
if (cmd->args == NULL)
return NULL;
commands_str += (orig_size - *size);
/*
* Clean up any trailing ws. This catches any ws at end
* of command sequences
*/
while (is_ws(*commands_str)){
cmd_str++;
commands_str++;
*size = *size-1;
}
if (*size <= 1)
return NULL;
return commands_str;
}
static void free_cmd(struct command_t *cmd)
{
struct arg_list *curr_arg, *next_arg;
curr_arg = cmd->args;
while (curr_arg != NULL) {
next_arg = curr_arg->next;
free(curr_arg->arg);
free(curr_arg);
curr_arg = next_arg;
}
free(cmd);
}
/*
* Given a command sequence buffer, parse it and run the given
* commands
*/
int run_cmds(char *buf)
{
int size = strlen(buf);
struct command_t *cmd;
char *cmdStr = buf;
int err;
/* Initilize sysio first */
_sysio_init();
while (1) {
cmd = (struct command_t *)malloc(sizeof(struct command_t));
cmd->args = NULL;
cmdStr = get_command(cmdStr, cmd, &size);
if (cmd == NULL)
return EINVAL;
if ((err = do_command(cmd)) == -1) {
free_cmd(cmd);
/* Something screwed up, bail */
return errno;
}
free_cmd(cmd);
if ((cmdStr == NULL) || (size == 0))
break;
}
return 0;
}
Index: module.mk
===================================================================
RCS file: /cvsroot/libsysio/libsysio/src/module.mk,v
retrieving revision 1.1
retrieving revision 1.1.2.1
diff -u -w -b -B -p -r1.1 -r1.1.2.1
--- module.mk 16 Dec 2003 15:43:14 -0000 1.1
+++ module.mk 18 Dec 2003 18:44:02 -0000 1.1.2.1
@@ -9,5 +9,5 @@ SRCDIR_SRCS = src/access.c src/chdir.c s
src/rmdir.c src/stat64.c src/stat.c \
src/statvfs64.c src/statvfs.c src/symlink.c \
src/truncate.c src/unlink.c src/utime.c \
- src/write.c
+ src/write.c src/parser.c src/command.c
SRCDIR_EXTRA = src/module.mk
|
|
From: Mei <me...@us...> - 2003-12-18 12:10:06
|
Update of /cvsroot/libsysio/libsysio/src
In directory sc8-pr-cvs1:/tmp/cvs-serv26598
Modified Files:
Tag: b_lustre
getdirentries.c
Log Message:
back out my last checkin.
Index: getdirentries.c
===================================================================
RCS file: /cvsroot/libsysio/libsysio/src/getdirentries.c,v
retrieving revision 1.1.8.6
retrieving revision 1.1.8.7
diff -u -w -b -B -p -r1.1.8.6 -r1.1.8.7
--- getdirentries.c 18 Dec 2003 05:39:47 -0000 1.1.8.6
+++ getdirentries.c 18 Dec 2003 12:10:03 -0000 1.1.8.7
@@ -205,17 +205,12 @@ out:
return -1;
}
cc = (char *)dp - buf;
-/* XXX not sure for this, but *basep should be managed by fs drivers
- * instead of here?? at least liblustre require this to be work fine.
- */
-#if 0
if (cc)
*basep =
#if !(defined(BSD) || defined(REDSTORM))
od64p->d_off;
#else
off;
-#endif
#endif
SYSIO_LEAVE;
return cc;
|
|
From: Mei <me...@us...> - 2003-12-18 05:39:50
|
Update of /cvsroot/libsysio/libsysio/src
In directory sc8-pr-cvs1:/tmp/cvs-serv1539
Modified Files:
Tag: b_lustre
getdirentries.c
Log Message:
fix getdirentries to work with liblustre, but not sure. just comment out
the related code.
Index: getdirentries.c
===================================================================
RCS file: /cvsroot/libsysio/libsysio/src/getdirentries.c,v
retrieving revision 1.1.8.5
retrieving revision 1.1.8.6
diff -u -w -b -B -p -r1.1.8.5 -r1.1.8.6
--- getdirentries.c 16 Dec 2003 07:07:42 -0000 1.1.8.5
+++ getdirentries.c 18 Dec 2003 05:39:47 -0000 1.1.8.6
@@ -205,12 +205,17 @@ out:
return -1;
}
cc = (char *)dp - buf;
+/* XXX not sure for this, but *basep should be managed by fs drivers
+ * instead of here?? at least liblustre require this to be work fine.
+ */
+#if 0
if (cc)
*basep =
#if !(defined(BSD) || defined(REDSTORM))
od64p->d_off;
#else
off;
+#endif
#endif
SYSIO_LEAVE;
return cc;
|
|
From: Ruth K. <rk...@us...> - 2003-12-16 15:43:19
|
Update of /cvsroot/libsysio/libsysio/tests In directory sc8-pr-cvs1:/tmp/cvs-serv17589/tests Modified Files: Makefile.am Added Files: module.mk Log Message: Changes to support build of one library from sources in all sysio directories. Automake 1.6 or higher is required. Default location of libsysio.a is $(top_srcdir)/lib, but is configurable. --- NEW FILE --- TESTS_EXTRA = $(shell ls tests/*.[ch] tests/*.sh tests/*.p[lm]) \ tests/Makefile.am tests/Makefile.in tests/module.mk Index: Makefile.am =================================================================== RCS file: /cvsroot/libsysio/libsysio/tests/Makefile.am,v retrieving revision 1.15 retrieving revision 1.16 diff -u -w -b -B -p -r1.15 -r1.16 --- Makefile.am 20 Oct 2003 16:32:28 -0000 1.15 +++ Makefile.am 16 Dec 2003 15:43:15 -0000 1.16 @@ -6,37 +6,30 @@ CLEANFILES=drv_data.c if WITH_NATIVE_DRIVER NATIVE_DRIVER_NAME=native NATIVE_DRIVER_CFLAGS= -I$(top_srcdir)/drivers/native -NATIVE_DRIVER_LIB= $(top_builddir)/drivers/native/libsysio_native.a else NATIVE_DRIVER_NAME=native NATIVE_DRIVER_CFLAGS= -NATIVE_DRIVER_LIB= endif if WITH_INCORE_DRIVER INCORE_DRIVER_NAME=incore INCORE_DRIVER_CFLAGS= -I$(top_srcdir)/drivers/incore -INCORE_DRIVER_LIB= $(top_builddir)/drivers/incore/libsysio_incore.a else INCORE_DRIVER_NAME=incore INCORE_DRIVER_CFLAGS= -INCORE_DRIVER_LIB= endif if WITH_STDFD_DEV STDFD_DEV_NAME=stdfd STDFD_DEV_CFLAGS= -I$(top_srcdir)/dev/stdfd -STDFD_DEV_LIB= $(top_builddir)/dev/stdfd/libsysio_stdfd.a else STDFD_DEV_NAME=stdfd STDFD_DEV_CFLAGS= -STDFD_DEV_LIB= endif if WITH_CPLANT_YOD YOD_DRIVER_NAME=yod YOD_DRIVER_CFLAGS= -DCPLANT_YOD -YOD_DRIVER_LIB=$(top_builddir)/drivers/yod/libsysio_yod.a else YOD_DRIVER_NAME= YOD_DRIVER_CFLAGS= @@ -59,9 +52,7 @@ CFL=$(AM_CFLAGS) $(AM_CPPFLAGS) \ $(NATIVE_DRIVER_CFLAGS) $(INCORE_DRIVER_CFLAGS) \ $(STDFD_DEV_CFLAGS) $(YOD_DRIVER_CFLAGS) -LIBS=$(NATIVE_DRIVER_LIB) $(INCORE_DRIVER_LIB) \ - $(STDFD_DEV_LIB) $(YOD_DRIVER_LIB) \ - $(top_builddir)/src/libsysio.a +LIBS=$(LIBBUILD_DIR)/libsysio.a test_copy_SOURCES=test_copy.c $(CMNSRC) test_copy_CFLAGS=$(CFL) @@ -118,10 +109,9 @@ test_driver_CFLAGS=$(CFL) test_driver_LDADD=$(LIBS) test_driver_DEPENDENCIES=$(LIBS) -EXTRA_DIST=$(shell ls *.pl *.pm) gendrvdata.sh test.h test_driver.h - drv_data.c: $(CONFIG_DEPENDENCIES) $(top_srcdir)/tests/gendrvdata.sh test -z "drv_data.c" && rm -f drv_data.c; \ $(SHELL) $(top_srcdir)/tests/gendrvdata.sh $(DRIVERS) > drv_data.c +AM_CFLAGS = -L$(LIBBUILD_DIR) include $(top_srcdir)/Rules.make |
|
From: Ruth K. <rk...@us...> - 2003-12-16 15:43:19
|
Update of /cvsroot/libsysio/libsysio/include In directory sc8-pr-cvs1:/tmp/cvs-serv17589/include Added Files: module.mk Log Message: Changes to support build of one library from sources in all sysio directories. Automake 1.6 or higher is required. Default location of libsysio.a is $(top_srcdir)/lib, but is configurable. --- NEW FILE --- INCLUDE_EXTRA = include/dev.h include/file.h include/fs.h \ include/inode.h include/mount.h include/sysio.h \ include/sysio-symbols.h include/cplant-yod.h include/module.mk |
|
From: Ruth K. <rk...@us...> - 2003-12-16 15:43:19
|
Update of /cvsroot/libsysio/libsysio/drivers/yod In directory sc8-pr-cvs1:/tmp/cvs-serv17589/drivers/yod Added Files: module.mk Removed Files: Makefile.am Log Message: Changes to support build of one library from sources in all sysio directories. Automake 1.6 or higher is required. Default location of libsysio.a is $(top_srcdir)/lib, but is configurable. --- NEW FILE --- if WITH_CPLANT_YOD YOD_SRCS = drivers/yod/fs_yod.c YOD_DRIVER_FLAGS = -DCPLANT_YOD else YOD_SRCS = YOD_DRIVER_FLAGS = endif # Bring yod files along in the distribution regardless YOD_EXTRA = include/cplant-yod.h drivers/yod/fs_yod.h drivers/yod/module.mk --- Makefile.am DELETED --- |
|
From: Ruth K. <rk...@us...> - 2003-12-16 15:43:18
|
Update of /cvsroot/libsysio/libsysio/drivers/incore In directory sc8-pr-cvs1:/tmp/cvs-serv17589/drivers/incore Added Files: module.mk Removed Files: Makefile.am Log Message: Changes to support build of one library from sources in all sysio directories. Automake 1.6 or higher is required. Default location of libsysio.a is $(top_srcdir)/lib, but is configurable. --- NEW FILE --- INCORE_SRCS = drivers/incore/fs_incore.c INCORE_EXTRA = drivers/incore/fs_incore.h drivers/incore/module.mk --- Makefile.am DELETED --- |
|
From: Ruth K. <rk...@us...> - 2003-12-16 15:43:18
|
Update of /cvsroot/libsysio/libsysio/src In directory sc8-pr-cvs1:/tmp/cvs-serv17589/src Added Files: module.mk Removed Files: Makefile.am Log Message: Changes to support build of one library from sources in all sysio directories. Automake 1.6 or higher is required. Default location of libsysio.a is $(top_srcdir)/lib, but is configurable. --- NEW FILE --- SRCDIR_SRCS = src/access.c src/chdir.c src/chmod.c \ src/chown.c src/dev.c src/dup.c src/fcntl.c \ src/file.c src/fs.c src/fsync.c \ src/getdirentries.c src/init.c src/inode.c \ src/ioctl.c src/ioctx.c src/iowait.c \ src/link.c src/lseek.c src/mkdir.c \ src/mknod.c src/mount.c src/namei.c \ src/open.c src/read.c src/rename.c \ src/rmdir.c src/stat64.c src/stat.c \ src/statvfs64.c src/statvfs.c src/symlink.c \ src/truncate.c src/unlink.c src/utime.c \ src/write.c SRCDIR_EXTRA = src/module.mk --- Makefile.am DELETED --- |
|
From: Ruth K. <rk...@us...> - 2003-12-16 15:43:18
|
Update of /cvsroot/libsysio/libsysio/drivers/native In directory sc8-pr-cvs1:/tmp/cvs-serv17589/drivers/native Added Files: module.mk Removed Files: Makefile.am Log Message: Changes to support build of one library from sources in all sysio directories. Automake 1.6 or higher is required. Default location of libsysio.a is $(top_srcdir)/lib, but is configurable. --- NEW FILE --- NATIVE_SRCS = drivers/native/fs_native.c NATIVE_EXTRA = drivers/native/fs_native.h drivers/native/module.mk --- Makefile.am DELETED --- |
|
From: Ruth K. <rk...@us...> - 2003-12-16 15:43:18
|
Update of /cvsroot/libsysio/libsysio/drivers In directory sc8-pr-cvs1:/tmp/cvs-serv17589/drivers Removed Files: Makefile.am Log Message: Changes to support build of one library from sources in all sysio directories. Automake 1.6 or higher is required. Default location of libsysio.a is $(top_srcdir)/lib, but is configurable. --- Makefile.am DELETED --- |
|
From: Ruth K. <rk...@us...> - 2003-12-16 15:43:17
|
Update of /cvsroot/libsysio/libsysio/dev/stdfd In directory sc8-pr-cvs1:/tmp/cvs-serv17589/dev/stdfd Added Files: module.mk Removed Files: Makefile.am Log Message: Changes to support build of one library from sources in all sysio directories. Automake 1.6 or higher is required. Default location of libsysio.a is $(top_srcdir)/lib, but is configurable. --- NEW FILE --- STDFD_SRCS = dev/stdfd/stdfd.c STDFD_EXTRA = dev/stdfd/stdfd.h dev/stdfd/module.mk --- Makefile.am DELETED --- |
|
From: Ruth K. <rk...@us...> - 2003-12-16 15:43:17
|
Update of /cvsroot/libsysio/libsysio/dev In directory sc8-pr-cvs1:/tmp/cvs-serv17589/dev Removed Files: Makefile.am Log Message: Changes to support build of one library from sources in all sysio directories. Automake 1.6 or higher is required. Default location of libsysio.a is $(top_srcdir)/lib, but is configurable. --- Makefile.am DELETED --- |
|
From: Ruth K. <rk...@us...> - 2003-12-16 15:43:17
|
Update of /cvsroot/libsysio/libsysio
In directory sc8-pr-cvs1:/tmp/cvs-serv17589
Modified Files:
Makefile.am configure.in
Log Message:
Changes to support build of one library from sources in all sysio
directories. Automake 1.6 or higher is required. Default location
of libsysio.a is $(top_srcdir)/lib, but is configurable.
Index: Makefile.am
===================================================================
RCS file: /cvsroot/libsysio/libsysio/Makefile.am,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -w -b -B -p -r1.8 -r1.9
--- Makefile.am 14 Aug 2003 18:39:32 -0000 1.8
+++ Makefile.am 16 Dec 2003 15:43:14 -0000 1.9
@@ -1,34 +1,46 @@
+AUTOMAKE_OPTIONS=1.6
if WITH_TESTS
-TESTS = tests
+TESTDIR = tests
else
-TESTS =
+TESTDIR =
endif
-if WITH_CPLANT_TESTS
-SUBDIRS = $(TESTS)
-else
-if WITH_CPLANT_YOD
-SUBDIRS = src drivers dev
-else
-SUBDIRS = src drivers dev $(TESTS)
-endif
-endif
+include $(top_srcdir)/src/module.mk
+include $(top_srcdir)/include/module.mk
+include $(top_srcdir)/tests/module.mk
+include $(top_srcdir)/dev/stdfd/module.mk
+include $(top_srcdir)/drivers/incore/module.mk
+include $(top_srcdir)/drivers/native/module.mk
+include $(top_srcdir)/drivers/yod/module.mk
+
+lib_LIBRARIES = ${LIBBUILD_DIR}/libsysio.a
-EXTRA_DIST = Rules.make \
- include/dev.h include/file.h include/fs.h include/inode.h \
- include/mount.h include/sysio.h include/sysio-symbols.h
+__LIBBUILD_DIR__libsysio_a_SOURCES = $(SRCDIR_SRCS) $(STDFD_SRCS) \
+ $(INCORE_SRCS) $(NATIVE_SRCS) $(YOD_SRCS)
-really-clean: maintainer-clean
+include $(top_srcdir)/Rules.make
+
+EXTRA_DIST = Rules.make $(TESTS_EXTRA) $(SRCDIR_EXTRA) \
+ $(INCLUDE_EXTRA) $(STDFD_EXTRA) $(INCORE_EXTRA) \
+ $(NATIVE_EXTRA) $(YOD_EXTRA)
+
+AM_CPPFLAGS += ${YOD_DRIVER_FLAGS}
+
+really-clean: testsclean maintainer-clean
-rm -rf autom4te-2.53.cache
-rm -rf .deps
- -rm -f Makefile.in \
- drivers/native/Makefile.in drivers/incore/Makefile.in \
- drivers/yod/Makefile.in \
- drivers/Makefile.in \
- dev/stdfd/Makefile.in \
- dev/Makefile.in \
- src/Makefile.in tests/Makefile.in
+ -rm -f Makefile.in
-rm -f compile depcomp INSTALL install-sh missing mkinstalldirs \
configure aclocal.m4
-rm -f config.guess config.sub
+ -rm -rf $(LIBBUILD_DIR)
+ -rm -f libsysio*.tar.gz
+ cd $(TESTDIR); rm -rf Makefile Makefile.in .deps
+
+tests: $(lib_LIBRARIES) FORCE
+ cd $(TESTDIR); make
+testsclean: FORCE
+ cd $(TESTDIR); make clean
+clean: testsclean clean-am
+FORCE:
Index: configure.in
===================================================================
RCS file: /cvsroot/libsysio/libsysio/configure.in,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -w -b -B -p -r1.11 -r1.12
--- configure.in 23 Oct 2003 16:06:13 -0000 1.11
+++ configure.in 16 Dec 2003 15:43:14 -0000 1.12
@@ -10,7 +10,8 @@ case "$host_os" in
;;
esac
-AM_INIT_AUTOMAKE
+AM_INIT_AUTOMAKE([subdir-objects])
+AM_PROG_CC_C_O
AC_PROG_CC
AC_PROG_RANLIB
@@ -19,6 +20,25 @@ AC_HEADER_STDC
AC_HEADER_STAT
AC_HEADER_TIME
+have_lib_dir=yes;
+AC_ARG_WITH(lib-dir,
+ AC_HELP_STRING([--with-lib-dir=<sysio lib build directory>],
+ [directory for sysio library]),
+ [ case "${withval}" in
+ "yes"|"no"|"") have_lib_dir=no ;;
+ *) LIBBUILD_DIR=${withval};
+ test -d ${LIBBUILD_DIR} || mkdir ${LIBBUILD_DIR} ||
+ have_lib_dir=no;;
+ esac;],
+ [ LIBBUILD_DIR=`pwd`/lib;
+ test -d ${LIBBUILD_DIR} || mkdir ${LIBBUILD_DIR} || have_lib_dir=no;])
+if test x${have_lib_dir} == xyes; then
+ echo "Using sysio library directory ${LIBBUILD_DIR}"
+else
+ AC_MSG_ERROR(Need writeable path to sysio library directory ${LIBBUILD_DIR})
+fi
+AC_SUBST(LIBBUILD_DIR)
+
AC_ARG_WITH(native_driver,
AC_HELP_STRING([--with-native-driver],[build native test driver]),
[ case "${withval}" in
@@ -367,12 +387,5 @@ fi
AC_OUTPUT(
Makefile
- src/Makefile
- drivers/Makefile
- drivers/native/Makefile
- drivers/incore/Makefile
- drivers/yod/Makefile
- dev/Makefile
- dev/stdfd/Makefile
tests/Makefile)
|
Update of /cvsroot/libsysio/libsysio/src
In directory sc8-pr-cvs1:/tmp/cvs-serv29118/src
Modified Files:
Tag: b_lustre
chdir.c chmod.c chown.c dup.c fcntl.c fsync.c getdirentries.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 write.c
Log Message:
add back the syscall enter/leave tracking which Lee want to keep.
Index: chdir.c
===================================================================
RCS file: /cvsroot/libsysio/libsysio/src/chdir.c,v
retrieving revision 1.3.8.6
retrieving revision 1.3.8.7
diff -u -w -b -B -p -r1.3.8.6 -r1.3.8.7
--- chdir.c 15 Dec 2003 08:22:16 -0000 1.3.8.6
+++ chdir.c 16 Dec 2003 07:07:42 -0000 1.3.8.7
@@ -119,15 +119,18 @@ 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;
}
err = _sysio_p_chdir(pno);
+ SYSIO_LEAVE;
return err;
}
@@ -221,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.3.4.4
retrieving revision 1.3.4.5
diff -u -w -b -B -p -r1.3.4.4 -r1.3.4.5
--- chmod.c 15 Dec 2003 08:22:16 -0000 1.3.4.4
+++ chmod.c 16 Dec 2003 07:07:42 -0000 1.3.4.5
@@ -72,6 +72,7 @@ chmod(const char *path, mode_t mode)
{
int err;
struct pnode *pno;
+ SYSIO_ENTER;
err = _sysio_namei(_sysio_cwd, path, 0, NULL, &pno);
if (err)
@@ -83,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.3.4.3
retrieving revision 1.3.4.4
diff -u -w -b -B -p -r1.3.4.3 -r1.3.4.4
--- chown.c 15 Dec 2003 08:22:16 -0000 1.3.4.3
+++ chown.c 16 Dec 2003 07:07:42 -0000 1.3.4.4
@@ -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.1.1.1.12.4
retrieving revision 1.1.1.1.12.5
diff -u -w -b -B -p -r1.1.1.1.12.4 -r1.1.1.1.12.5
--- dup.c 15 Dec 2003 08:22:16 -0000 1.1.1.1.12.4
+++ dup.c 16 Dec 2003 07:07:42 -0000 1.1.1.1.12.5
@@ -54,22 +54,35 @@
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);
- return _sysio_fd_dup2(oldfd, newfd);
+ SYSIO_LEAVE;
+ return rc;
}
int
dup(int oldfd)
{
+ int rc;
+ SYSIO_ENTER;
+
+ rc = _sysio_fd_dup2(oldfd, -1);
- return _sysio_fd_dup2(oldfd, -1);
+ SYSIO_LEAVE;
+ return rc;
}
Index: fcntl.c
===================================================================
RCS file: /cvsroot/libsysio/libsysio/src/fcntl.c,v
retrieving revision 1.3.2.11
retrieving revision 1.3.2.12
diff -u -w -b -B -p -r1.3.2.11 -r1.3.2.12
--- fcntl.c 15 Dec 2003 08:22:16 -0000 1.3.2.11
+++ fcntl.c 16 Dec 2003 07:07:42 -0000 1.3.2.12
@@ -88,6 +88,7 @@ fcntl(int fd, int cmd, ...)
int err;
struct file *fil;
va_list ap;
+ SYSIO_ENTER;
err = 0;
fil = _sysio_fd_find(fd);
@@ -95,6 +96,7 @@ fcntl(int fd, int cmd, ...)
va_start(ap, cmd);
err = _sysio_fcntl_common(fd, cmd, ap);
va_end(ap);
+ SYSIO_LEAVE;
return err;
}
@@ -103,6 +105,7 @@ fcntl(int fd, int cmd, ...)
case F_DUPFD:
{
long newfd;
+ int rc;
va_start(ap, cmd);
newfd = va_arg(ap, long);
@@ -111,7 +114,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:
@@ -126,6 +132,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.8.2
retrieving revision 1.2.8.3
diff -u -w -b -B -p -r1.2.8.2 -r1.2.8.3
--- fsync.c 15 Dec 2003 08:22:16 -0000 1.2.8.2
+++ fsync.c 16 Dec 2003 07:07:42 -0000 1.2.8.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.1.8.4
retrieving revision 1.1.8.5
diff -u -w -b -B -p -r1.1.8.4 -r1.1.8.5
--- getdirentries.c 15 Dec 2003 08:22:16 -0000 1.1.8.4
+++ getdirentries.c 16 Dec 2003 07:07:42 -0000 1.1.8.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: ioctl.c
===================================================================
RCS file: /cvsroot/libsysio/libsysio/src/ioctl.c,v
retrieving revision 1.1.1.1.12.6
retrieving revision 1.1.1.1.12.7
diff -u -w -b -B -p -r1.1.1.1.12.6 -r1.1.1.1.12.7
--- ioctl.c 15 Dec 2003 08:22:16 -0000 1.1.1.1.12.6
+++ ioctl.c 16 Dec 2003 07:07:42 -0000 1.1.1.1.12.7
@@ -63,6 +63,7 @@ ioctl(int fd, unsigned long request, ...
int err;
struct file *fil;
va_list ap;
+ SYSIO_ENTER;
err = 0;
fil = _sysio_fd_find(fd);
@@ -80,6 +81,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.3.8.4
retrieving revision 1.3.8.5
diff -u -w -b -B -p -r1.3.8.4 -r1.3.8.5
--- iowait.c 15 Dec 2003 08:22:16 -0000 1.3.8.4
+++ iowait.c 16 Dec 2003 07:07:42 -0000 1.3.8.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.4.2.6
retrieving revision 1.4.2.7
diff -u -w -b -B -p -r1.4.2.6 -r1.4.2.7
--- lseek.c 15 Dec 2003 08:22:16 -0000 1.4.2.6
+++ lseek.c 16 Dec 2003 07:07:42 -0000 1.4.2.7
@@ -115,15 +115,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.4.2
retrieving revision 1.3.4.3
diff -u -w -b -B -p -r1.3.4.2 -r1.3.4.3
--- mkdir.c 15 Dec 2003 08:22:16 -0000 1.3.4.2
+++ mkdir.c 16 Dec 2003 07:07:42 -0000 1.3.4.3
@@ -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.3.4.3
retrieving revision 1.3.4.4
diff -u -w -b -B -p -r1.3.4.3 -r1.3.4.4
--- mknod.c 15 Dec 2003 08:22:16 -0000 1.3.4.3
+++ mknod.c 16 Dec 2003 07:07:42 -0000 1.3.4.4
@@ -114,8 +114,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.7.2.7
retrieving revision 1.7.2.8
diff -u -w -b -B -p -r1.7.2.7 -r1.7.2.8
--- open.c 15 Dec 2003 08:22:16 -0000 1.7.2.7
+++ open.c 16 Dec 2003 07:07:42 -0000 1.7.2.8
@@ -130,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
@@ -197,6 +198,7 @@ open(const char *path, int flags, ...)
P_RELE(pno);
+ SYSIO_LEAVE;
return err;
error:
@@ -205,6 +207,7 @@ error:
if (pno)
P_RELE(pno);
errno = -err;
+ SYSIO_LEAVE;
return -1;
}
@@ -222,10 +225,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.2.8.10
retrieving revision 1.2.8.11
diff -u -w -b -B -p -r1.2.8.10 -r1.2.8.11
--- read.c 15 Dec 2003 08:22:16 -0000 1.2.8.10
+++ read.c 16 Dec 2003 07:07:42 -0000 1.2.8.11
@@ -116,14 +116,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;
}
@@ -193,16 +197,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.3.4.3
retrieving revision 1.3.4.4
diff -u -w -b -B -p -r1.3.4.3 -r1.3.4.4
--- rmdir.c 15 Dec 2003 08:22:16 -0000 1.3.4.3
+++ rmdir.c 16 Dec 2003 07:07:42 -0000 1.3.4.4
@@ -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.3.4.4
retrieving revision 1.3.4.5
diff -u -w -b -B -p -r1.3.4.4 -r1.3.4.5
--- stat.c 15 Dec 2003 08:22:16 -0000 1.3.4.4
+++ stat.c 16 Dec 2003 07:07:42 -0000 1.3.4.5
@@ -129,7 +129,13 @@ out:
static int
__fstat(int fd, struct stat *buf)
{
- return __fxstat_internal(_STAT_VER, fd, buf);
+ int rc;
+ SYSIO_ENTER;
+
+ rc = __fxstat_internal(_STAT_VER, fd, buf);
+
+ SYSIO_LEAVE;
+ return rc;
}
sysio_sym_weak_alias(__fstat, fstat)
@@ -185,8 +191,13 @@ out:
static int
__stat(const char *filename, struct stat *buf)
{
+ int rc;
+ SYSIO_ENTER;
- return __xstat(_STAT_VER, filename, buf);
+ rc = __xstat(_STAT_VER, filename, buf);
+
+ SYSIO_LEAVE;
+ return rc;
}
sysio_sym_weak_alias(__stat, stat)
@@ -242,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.3.4.4
retrieving revision 1.3.4.5
diff -u -w -b -B -p -r1.3.4.4 -r1.3.4.5
--- stat64.c 15 Dec 2003 08:22:16 -0000 1.3.4.4
+++ stat64.c 16 Dec 2003 07:07:42 -0000 1.3.4.5
@@ -91,7 +91,13 @@ out:
int
fstat64(int fd, struct stat64 *buf)
{
- return __fxstat64_internal(_STAT_VER, fd, buf);
+ int rc;
+ SYSIO_ENTER;
+
+ rc = __fxstat64_internal(_STAT_VER, fd, buf);
+
+ SYSIO_LEAVE;
+ return rc;
}
int
@@ -126,8 +132,13 @@ out:
int
stat64(const char *filename, struct stat64 *buf)
{
+ int rc;
+ SYSIO_ENTER;
- return __xstat64(_STAT_VER, filename, buf);
+ rc = __xstat64(_STAT_VER, filename, buf);
+
+ SYSIO_LEAVE;
+ return rc;
}
int
@@ -162,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.3.4.4
retrieving revision 1.3.4.5
diff -u -w -b -B -p -r1.3.4.4 -r1.3.4.5
--- statvfs.c 15 Dec 2003 08:22:16 -0000 1.3.4.4
+++ statvfs.c 16 Dec 2003 07:07:42 -0000 1.3.4.5
@@ -92,6 +92,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)
@@ -109,6 +110,7 @@ err:
errno = -err;
err = -1;
out:
+ SYSIO_LEAVE;
return err;
}
@@ -123,6 +125,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);
@@ -142,6 +145,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.3.4.3
retrieving revision 1.3.4.4
diff -u -w -b -B -p -r1.3.4.3 -r1.3.4.4
--- statvfs64.c 15 Dec 2003 08:22:16 -0000 1.3.4.3
+++ statvfs64.c 16 Dec 2003 07:07:42 -0000 1.3.4.4
@@ -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.4.2
retrieving revision 1.3.4.3
diff -u -w -b -B -p -r1.3.4.2 -r1.3.4.3
--- symlink.c 15 Dec 2003 08:22:16 -0000 1.3.4.2
+++ symlink.c 16 Dec 2003 07:07:42 -0000 1.3.4.3
@@ -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.3.4.4
retrieving revision 1.3.4.5
diff -u -w -b -B -p -r1.3.4.4 -r1.3.4.5
--- truncate.c 15 Dec 2003 08:22:16 -0000 1.3.4.4
+++ truncate.c 16 Dec 2003 07:07:42 -0000 1.3.4.5
@@ -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.3.4.4
retrieving revision 1.3.4.5
diff -u -w -b -B -p -r1.3.4.4 -r1.3.4.5
--- unlink.c 15 Dec 2003 08:22:16 -0000 1.3.4.4
+++ unlink.c 16 Dec 2003 07:07:42 -0000 1.3.4.5
@@ -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: write.c
===================================================================
RCS file: /cvsroot/libsysio/libsysio/src/write.c,v
retrieving revision 1.2.10.10
retrieving revision 1.2.10.11
diff -u -w -b -B -p -r1.2.10.10 -r1.2.10.11
--- write.c 15 Dec 2003 08:22:16 -0000 1.2.10.10
+++ write.c 16 Dec 2003 07:07:42 -0000 1.2.10.11
@@ -115,14 +115,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;
}
@@ -192,16 +196,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;
+ 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;
}
|
|
From: Mei <me...@us...> - 2003-12-16 07:07:45
|
Update of /cvsroot/libsysio/libsysio/include
In directory sc8-pr-cvs1:/tmp/cvs-serv29118/include
Modified Files:
Tag: b_lustre
sysio.h
Log Message:
add back the syscall enter/leave tracking which Lee want to keep.
Index: sysio.h
===================================================================
RCS file: /cvsroot/libsysio/libsysio/include/sysio.h,v
retrieving revision 1.7.4.6
retrieving revision 1.7.4.7
diff -u -w -b -B -p -r1.7.4.6 -r1.7.4.7
--- sysio.h 15 Dec 2003 08:22:16 -0000 1.7.4.6
+++ sysio.h 16 Dec 2003 07:07:42 -0000 1.7.4.7
@@ -267,3 +267,42 @@ extern int mount(const char *source, con
unsigned long mountflags,
const void *data);
extern int umount(const char *target);
+
+/* for debugging */
+#if 1
+#define ASSERT(cond) \
+ if (!(cond)) { \
+ printf("ASSERTION(" #cond ") failed: " __FILE__ ":" \
+ __FUNCTION__ ":%d\n", __LINE__); \
+ abort(); \
+ }
+
+#define ERROR(fmt, a...) \
+ do { \
+ printf("ERROR(" __FILE__ ":%d):" fmt, __LINE__, ##a); \
+ while(0)
+
+#else
+#define ERROR(fmt) do{}while(0)
+#define ASSERT do{}while(0)
+#endif
+
+/* syscall enter/leave hook functions */
+#if 1
+#define SYSIO_ENTER
+#define SYSIO_LEAVE
+
+#else
+extern void _sysio_sysenter();
+extern void _sysio_sysleave();
+
+#define SYSIO_ENTER \
+ do { \
+ _sysio_sysenter(); \
+ } while(0)
+
+#define SYSIO_LEAVE \
+ do { \
+ _sysio_sysleave(); \
+ } while(0)
+#endif
|
|
From: Mei <me...@us...> - 2003-12-15 08:32:04
|
Update of /cvsroot/libsysio/libsysio
In directory sc8-pr-cvs1:/tmp/cvs-serv5347
Modified Files:
Tag: b_lustre
configure.in
Log Message:
make --with-sockets default yes.
Index: configure.in
===================================================================
RCS file: /cvsroot/libsysio/libsysio/configure.in,v
retrieving revision 1.5.4.4
retrieving revision 1.5.4.5
diff -u -w -b -B -p -r1.5.4.4 -r1.5.4.5
--- configure.in 1 Nov 2003 03:08:21 -0000 1.5.4.4
+++ configure.in 15 Dec 2003 08:32:01 -0000 1.5.4.5
@@ -114,7 +114,7 @@ AC_ARG_WITH(sockets,
no) ;;
*) AC_MSG_ERROR(bad value ${withval} for --with-sockets) ;;
esac],
- [with_stdfd_dev=yes])
+ [with_sockets=yes])
AM_CONDITIONAL(WITH_SOCKETS, test x$with_sockets = xyes)
# We keep the original values in `$config_*' and never modify them, so we
|
|
From: Mei <me...@us...> - 2003-12-15 08:25:48
|
Update of /cvsroot/libsysio/libsysio/drivers/sockets
In directory sc8-pr-cvs1:/tmp/cvs-serv4246
Modified Files:
Tag: b_lustre
sockets.c
Log Message:
compile warning in sockets driver.
Index: sockets.c
===================================================================
RCS file: /cvsroot/libsysio/libsysio/drivers/sockets/Attic/sockets.c,v
retrieving revision 1.1.2.4
retrieving revision 1.1.2.5
diff -u -w -b -B -p -r1.1.2.4 -r1.1.2.5
--- sockets.c 4 Dec 2003 04:36:24 -0000 1.1.2.4
+++ sockets.c 15 Dec 2003 08:25:43 -0000 1.1.2.5
@@ -406,8 +406,10 @@ accept(int s, struct sockaddr *addr, soc
addr, addrlen);
#else
{
- unsigned long avec[3] = {I2SKI(ofil->f_ino)->ski_fd, addr,
- addrlen};
+ unsigned long avec[3] = {
+ (unsigned long) I2SKI(ofil->f_ino)->ski_fd,
+ (unsigned long) addr,
+ (unsigned long) addrlen};
ski->ski_fd = syscall(SYS_socketcall, SYS_ACCEPT, avec);
}
#endif
|
|
From: Mei <me...@us...> - 2003-12-15 08:22:20
|
Update of /cvsroot/libsysio/libsysio/src
In directory sc8-pr-cvs1:/tmp/cvs-serv3191/src
Modified Files:
Tag: b_lustre
Makefile.am 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 write.c
Log Message:
remove the enter/leave syscalls intercept, now liblustre don't need them.
Index: Makefile.am
===================================================================
RCS file: /cvsroot/libsysio/libsysio/src/Makefile.am,v
retrieving revision 1.5.4.6
retrieving revision 1.5.4.7
diff -u -w -b -B -p -r1.5.4.6 -r1.5.4.7
--- Makefile.am 12 Dec 2003 06:05:25 -0000 1.5.4.6
+++ Makefile.am 15 Dec 2003 08:22:16 -0000 1.5.4.7
@@ -1,7 +1,7 @@
lib_LIBRARIES = libsysio.a
libsysio_a_SOURCES = chdir.c chmod.c chown.c dev.c dup.c fcntl.c file.c fs.c \
- fsync.c init.c inode.c ioctl.c ioctx.c iowait.c \
+ fsync.c getdirentries.c init.c inode.c ioctl.c ioctx.c iowait.c \
link.c lseek.c mkdir.c mknod.c mount.c namei.c open.c read.c rename.c \
rmdir.c stat.c stat64.c statvfs.c statvfs64.c symlink.c truncate.c \
unlink.c \
Index: chdir.c
===================================================================
RCS file: /cvsroot/libsysio/libsysio/src/chdir.c,v
retrieving revision 1.3.8.5
retrieving revision 1.3.8.6
diff -u -w -b -B -p -r1.3.8.5 -r1.3.8.6
--- chdir.c 4 Dec 2003 04:39:17 -0000 1.3.8.5
+++ chdir.c 15 Dec 2003 08:22:16 -0000 1.3.8.6
@@ -119,18 +119,15 @@ 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;
}
err = _sysio_p_chdir(pno);
- SYSIO_LEAVE;
return err;
}
@@ -224,15 +221,12 @@ 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.3.4.3
retrieving revision 1.3.4.4
diff -u -w -b -B -p -r1.3.4.3 -r1.3.4.4
--- chmod.c 1 Nov 2003 03:08:22 -0000 1.3.4.3
+++ chmod.c 15 Dec 2003 08:22:16 -0000 1.3.4.4
@@ -72,7 +72,6 @@ chmod(const char *path, mode_t mode)
{
int err;
struct pnode *pno;
- SYSIO_ENTER;
err = _sysio_namei(_sysio_cwd, path, 0, NULL, &pno);
if (err)
@@ -84,7 +83,6 @@ out:
errno = -err;
err = -1;
}
- SYSIO_LEAVE;
return err;
}
Index: chown.c
===================================================================
RCS file: /cvsroot/libsysio/libsysio/src/chown.c,v
retrieving revision 1.3.4.2
retrieving revision 1.3.4.3
diff -u -w -b -B -p -r1.3.4.2 -r1.3.4.3
--- chown.c 1 Nov 2003 03:08:22 -0000 1.3.4.2
+++ chown.c 15 Dec 2003 08:22:16 -0000 1.3.4.3
@@ -59,7 +59,6 @@ _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;
@@ -92,7 +91,6 @@ out:
errno = -err;
err = -1;
}
- SYSIO_LEAVE;
return err;
}
Index: dup.c
===================================================================
RCS file: /cvsroot/libsysio/libsysio/src/dup.c,v
retrieving revision 1.1.1.1.12.3
retrieving revision 1.1.1.1.12.4
diff -u -w -b -B -p -r1.1.1.1.12.3 -r1.1.1.1.12.4
--- dup.c 4 Dec 2003 04:39:17 -0000 1.1.1.1.12.3
+++ dup.c 15 Dec 2003 08:22:16 -0000 1.1.1.1.12.4
@@ -54,35 +54,22 @@
int
dup2(int oldfd, int newfd)
{
- int rc;
- SYSIO_ENTER;
if (newfd < 0) {
errno = EBADF;
- SYSIO_LEAVE;
return -1;
}
- if (oldfd == newfd) {
- SYSIO_LEAVE;
+ if (oldfd == newfd)
return newfd;
- }
-
- rc = _sysio_fd_dup2(oldfd, newfd);
- SYSIO_LEAVE;
- return rc;
+ return _sysio_fd_dup2(oldfd, newfd);
}
int
dup(int oldfd)
{
- int rc;
- SYSIO_ENTER;
-
- rc = _sysio_fd_dup2(oldfd, -1);
- SYSIO_LEAVE;
- return rc;
+ return _sysio_fd_dup2(oldfd, -1);
}
Index: fcntl.c
===================================================================
RCS file: /cvsroot/libsysio/libsysio/src/fcntl.c,v
retrieving revision 1.3.2.10
retrieving revision 1.3.2.11
diff -u -w -b -B -p -r1.3.2.10 -r1.3.2.11
--- fcntl.c 12 Dec 2003 06:05:25 -0000 1.3.2.10
+++ fcntl.c 15 Dec 2003 08:22:16 -0000 1.3.2.11
@@ -66,8 +66,6 @@ int _sysio_fcntl_common(int fd, int cmd,
case F_GETFD:
case F_GETFL:
case F_GETOWN:
-// case F_GETSIG:
-// case F_GETLEASE:
return syscall(SYS_fcntl, fd, cmd);
case F_DUPFD:
case F_SETFD:
@@ -76,9 +74,6 @@ int _sysio_fcntl_common(int fd, int cmd,
case F_SETLK:
case F_SETLKW:
case F_SETOWN:
-// case F_SETSIG:
-// case F_SETLEASE:
-// case F_NOTIFY:
arg = va_arg(ap, long);
return syscall(SYS_fcntl, fd, cmd, arg);
}
@@ -93,7 +88,6 @@ fcntl(int fd, int cmd, ...)
int err;
struct file *fil;
va_list ap;
- SYSIO_ENTER;
err = 0;
fil = _sysio_fd_find(fd);
@@ -101,7 +95,6 @@ fcntl(int fd, int cmd, ...)
va_start(ap, cmd);
err = _sysio_fcntl_common(fd, cmd, ap);
va_end(ap);
- SYSIO_LEAVE;
return err;
}
@@ -110,7 +103,6 @@ fcntl(int fd, int cmd, ...)
case F_DUPFD:
{
long newfd;
- int rc;
va_start(ap, cmd);
newfd = va_arg(ap, long);
@@ -119,10 +111,7 @@ fcntl(int fd, int cmd, ...)
err = -EBADF;
goto out;
}
- rc = _sysio_fd_dup2(fd, (int )newfd);
-
- SYSIO_LEAVE;
- return rc;
+ return _sysio_fd_dup2(fd, (int )newfd);
}
break;
default:
@@ -137,7 +126,6 @@ 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.8.1
retrieving revision 1.2.8.2
diff -u -w -b -B -p -r1.2.8.1 -r1.2.8.2
--- fsync.c 29 Jun 2003 10:15:32 -0000 1.2.8.1
+++ fsync.c 15 Dec 2003 08:22:16 -0000 1.2.8.2
@@ -55,22 +55,17 @@ 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;
}
@@ -79,21 +74,16 @@ 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.1.8.3
retrieving revision 1.1.8.4
diff -u -w -b -B -p -r1.1.8.3 -r1.1.8.4
--- getdirentries.c 1 Nov 2003 03:08:22 -0000 1.1.8.3
+++ getdirentries.c 15 Dec 2003 08:22:16 -0000 1.1.8.4
@@ -95,7 +96,6 @@ 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,7 +128,6 @@ getdirentries(int fd,
ibuf = _fast_alloc(inbytes);
if (!ibuf) {
errno = ENOMEM;
- SYSIO_LEAVE;
return -1;
}
@@ -200,7 +199,6 @@ out:
if (dp == (struct dirent *)buf && cc < 0) {
errno = (int )-cc;
- SYSIO_LEAVE;
return -1;
}
cc = (char *)dp - buf;
@@ -211,7 +209,6 @@ 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.4.3
retrieving revision 1.3.4.4
diff -u -w -b -B -p -r1.3.4.3 -r1.3.4.4
--- init.c 8 Sep 2003 03:52:28 -0000 1.3.4.3
+++ init.c 15 Dec 2003 08:22:16 -0000 1.3.4.4
@@ -56,9 +56,6 @@
#include "stdfd.h"
#endif
-int __sysio_in_syscall = 0;
-__sysio_hook_func *__sysio_hook_sys_enter = NULL;
-__sysio_hook_func *__sysio_hook_sys_leave = NULL;
/*
* Sysio library initialization. Must be called before anything else in the
* library.
Index: ioctl.c
===================================================================
RCS file: /cvsroot/libsysio/libsysio/src/ioctl.c,v
retrieving revision 1.1.1.1.12.5
retrieving revision 1.1.1.1.12.6
diff -u -w -b -B -p -r1.1.1.1.12.5 -r1.1.1.1.12.6
--- ioctl.c 4 Dec 2003 04:39:17 -0000 1.1.1.1.12.5
+++ ioctl.c 15 Dec 2003 08:22:16 -0000 1.1.1.1.12.6
@@ -63,7 +63,6 @@ ioctl(int fd, unsigned long request, ...
int err;
struct file *fil;
va_list ap;
- SYSIO_ENTER;
err = 0;
fil = _sysio_fd_find(fd);
@@ -81,7 +80,6 @@ out:
errno = -err;
err = -1;
}
- SYSIO_LEAVE;
return err;
}
Index: iowait.c
===================================================================
RCS file: /cvsroot/libsysio/libsysio/src/iowait.c,v
retrieving revision 1.3.8.3
retrieving revision 1.3.8.4
diff -u -w -b -B -p -r1.3.8.3 -r1.3.8.4
--- iowait.c 12 Dec 2003 06:05:25 -0000 1.3.8.3
+++ iowait.c 15 Dec 2003 08:22:16 -0000 1.3.8.4
@@ -92,9 +92,8 @@ iowait(ioid_t ioid)
ssize_t cc;
ioctx = lookup_ioid(ioid);
- if (!ioctx) {
+ if (!ioctx)
return -1;
- }
cc = _sysio_ioctx_wait(ioctx);
if (cc < 0) {
Index: lseek.c
===================================================================
RCS file: /cvsroot/libsysio/libsysio/src/lseek.c,v
retrieving revision 1.4.2.5
retrieving revision 1.4.2.6
diff -u -w -b -B -p -r1.4.2.5 -r1.4.2.6
--- lseek.c 4 Dec 2003 04:39:17 -0000 1.4.2.5
+++ lseek.c 15 Dec 2003 08:22:16 -0000 1.4.2.6
@@ -115,20 +115,15 @@ 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) {
- SYSIO_LEAVE;
+ if (off < 0)
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.4.1
retrieving revision 1.3.4.2
diff -u -w -b -B -p -r1.3.4.1 -r1.3.4.2
--- mkdir.c 29 Jun 2003 10:15:32 -0000 1.3.4.1
+++ mkdir.c 15 Dec 2003 08:22:16 -0000 1.3.4.2
@@ -58,7 +58,6 @@ 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);
@@ -81,7 +80,5 @@ out:
errno = -err;
err = -1;
}
-
- SYSIO_LEAVE;
return err;
}
Index: mknod.c
===================================================================
RCS file: /cvsroot/libsysio/libsysio/src/mknod.c,v
retrieving revision 1.3.4.2
retrieving revision 1.3.4.3
diff -u -w -b -B -p -r1.3.4.2 -r1.3.4.3
--- mknod.c 1 Nov 2003 03:08:22 -0000 1.3.4.2
+++ mknod.c 15 Dec 2003 08:22:16 -0000 1.3.4.3
@@ -114,13 +114,8 @@ out:
static int
__mknod(const char *path, mode_t mode, dev_t dev)
{
- int rc;
- SYSIO_ENTER;
- rc = __xmknod(_MKNOD_VER, path, mode, &dev);
-
- SYSIO_LEAVE;
- return rc;
+ return __xmknod(_MKNOD_VER, path, mode, &dev);
}
sysio_sym_weak_alias(__mknod, mknod)
Index: open.c
===================================================================
RCS file: /cvsroot/libsysio/libsysio/src/open.c,v
retrieving revision 1.7.2.6
retrieving revision 1.7.2.7
diff -u -w -b -B -p -r1.7.2.6 -r1.7.2.7
--- open.c 4 Dec 2003 04:39:17 -0000 1.7.2.6
+++ open.c 15 Dec 2003 08:22:16 -0000 1.7.2.7
@@ -130,7 +130,6 @@ open(const char *path, int flags, ...)
int err;
struct pnode *pno;
struct file *fil;
- SYSIO_ENTER;
/*
* Get mode argument and determine parameters for namei
@@ -198,7 +197,6 @@ open(const char *path, int flags, ...)
P_RELE(pno);
- SYSIO_LEAVE;
return err;
error:
@@ -207,7 +205,6 @@ error:
if (pno)
P_RELE(pno);
errno = -err;
- SYSIO_LEAVE;
return -1;
}
@@ -225,12 +222,10 @@ 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.2.8.9
retrieving revision 1.2.8.10
diff -u -w -b -B -p -r1.2.8.9 -r1.2.8.10
--- read.c 4 Dec 2003 04:39:17 -0000 1.2.8.9
+++ read.c 15 Dec 2003 08:22:16 -0000 1.2.8.10
@@ -116,18 +116,14 @@ 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;
}
@@ -197,22 +193,16 @@ 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) {
- SYSIO_LEAVE;
+ if (!ioctxp)
return IOID_FAIL;
- }
- SYSIO_LEAVE;
return ioctxp->ioctx_id;
}
Index: rmdir.c
===================================================================
RCS file: /cvsroot/libsysio/libsysio/src/rmdir.c,v
retrieving revision 1.3.4.2
retrieving revision 1.3.4.3
diff -u -w -b -B -p -r1.3.4.2 -r1.3.4.3
--- rmdir.c 1 Nov 2003 03:08:22 -0000 1.3.4.2
+++ rmdir.c 15 Dec 2003 08:22:16 -0000 1.3.4.3
@@ -58,7 +58,6 @@ 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);
@@ -83,6 +82,5 @@ out:
errno = -err;
err = -1;
}
- SYSIO_LEAVE;
return err;
}
Index: stat.c
===================================================================
RCS file: /cvsroot/libsysio/libsysio/src/stat.c,v
retrieving revision 1.3.4.3
retrieving revision 1.3.4.4
diff -u -w -b -B -p -r1.3.4.3 -r1.3.4.4
--- stat.c 4 Dec 2003 04:39:17 -0000 1.3.4.3
+++ stat.c 15 Dec 2003 08:22:16 -0000 1.3.4.4
@@ -129,13 +129,7 @@ out:
static int
__fstat(int fd, struct stat *buf)
{
- int rc;
- SYSIO_ENTER;
-
- rc = __fxstat_internal(_STAT_VER, fd, buf);
-
- SYSIO_LEAVE;
- return rc;
+ return __fxstat_internal(_STAT_VER, fd, buf);
}
sysio_sym_weak_alias(__fstat, fstat)
@@ -191,13 +185,8 @@ out:
static int
__stat(const char *filename, struct stat *buf)
{
- int rc;
- SYSIO_ENTER;
- rc = __xstat(_STAT_VER, filename, buf);
-
- SYSIO_LEAVE;
- return rc;
+ return __xstat(_STAT_VER, filename, buf);
}
sysio_sym_weak_alias(__stat, stat)
@@ -253,13 +242,8 @@ out:
static int
__lstat(const char *filename, struct stat *buf)
{
- int rc;
- SYSIO_ENTER;
-
- rc = __lxstat(_STAT_VER, filename, buf);
- SYSIO_LEAVE;
- return rc;
+ return __lxstat(_STAT_VER, filename, buf);
}
sysio_sym_weak_alias(__lstat, lstat)
Index: stat64.c
===================================================================
RCS file: /cvsroot/libsysio/libsysio/src/stat64.c,v
retrieving revision 1.3.4.3
retrieving revision 1.3.4.4
diff -u -w -b -B -p -r1.3.4.3 -r1.3.4.4
--- stat64.c 4 Dec 2003 04:39:17 -0000 1.3.4.3
+++ stat64.c 15 Dec 2003 08:22:16 -0000 1.3.4.4
@@ -91,13 +91,7 @@ out:
int
fstat64(int fd, struct stat64 *buf)
{
- int rc;
- SYSIO_ENTER;
-
- rc = __fxstat64_internal(_STAT_VER, fd, buf);
-
- SYSIO_LEAVE;
- return rc;
+ return __fxstat64_internal(_STAT_VER, fd, buf);
}
int
@@ -132,13 +126,8 @@ out:
int
stat64(const char *filename, struct stat64 *buf)
{
- int rc;
- SYSIO_ENTER;
- rc = __xstat64(_STAT_VER, filename, buf);
-
- SYSIO_LEAVE;
- return rc;
+ return __xstat64(_STAT_VER, filename, buf);
}
int
@@ -173,12 +162,7 @@ out:
int
lstat64(const char *filename, struct stat64 *buf)
{
- int rc;
- SYSIO_ENTER;
-
- rc = __lxstat64(_STAT_VER, filename, buf);
- SYSIO_LEAVE;
- return rc;
+ return __lxstat64(_STAT_VER, filename, buf);
}
#endif /* !_LARGEFILE64_SOURCE */
Index: statvfs.c
===================================================================
RCS file: /cvsroot/libsysio/libsysio/src/statvfs.c,v
retrieving revision 1.3.4.3
retrieving revision 1.3.4.4
diff -u -w -b -B -p -r1.3.4.3 -r1.3.4.4
--- statvfs.c 1 Nov 2003 03:08:22 -0000 1.3.4.3
+++ statvfs.c 15 Dec 2003 08:22:16 -0000 1.3.4.4
@@ -92,7 +92,6 @@ 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)
@@ -110,7 +109,6 @@ err:
errno = -err;
err = -1;
out:
- SYSIO_LEAVE;
return err;
}
@@ -125,7 +123,6 @@ 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);
@@ -145,7 +142,6 @@ 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.3.4.2
retrieving revision 1.3.4.3
diff -u -w -b -B -p -r1.3.4.2 -r1.3.4.3
--- statvfs64.c 1 Nov 2003 03:08:22 -0000 1.3.4.2
+++ statvfs64.c 15 Dec 2003 08:22:16 -0000 1.3.4.3
@@ -60,7 +60,6 @@ statvfs64(const char *path, struct statv
{
int err;
struct pnode *pno;
- SYSIO_ENTER;
err = _sysio_namei(_sysio_cwd, path, 0, NULL, &pno);
if (err)
@@ -73,8 +72,6 @@ out:
errno = -err;
err = -1;
}
-
- SYSIO_LEAVE;
return err;
}
@@ -83,7 +80,6 @@ fstatvfs64(int fd, struct statvfs64 *buf
{
int err;
struct file *filp;
- SYSIO_ENTER;
err = 0;
filp = _sysio_fd_find(fd);
@@ -98,8 +94,6 @@ 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.4.1
retrieving revision 1.3.4.2
diff -u -w -b -B -p -r1.3.4.1 -r1.3.4.2
--- symlink.c 29 Jun 2003 10:15:32 -0000 1.3.4.1
+++ symlink.c 15 Dec 2003 08:22:16 -0000 1.3.4.2
@@ -58,7 +58,6 @@ 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);
@@ -82,6 +81,5 @@ out:
errno = -err;
err = -1;
}
- SYSIO_LEAVE;
return err;
}
Index: truncate.c
===================================================================
RCS file: /cvsroot/libsysio/libsysio/src/truncate.c,v
retrieving revision 1.3.4.3
retrieving revision 1.3.4.4
diff -u -w -b -B -p -r1.3.4.3 -r1.3.4.4
--- truncate.c 1 Nov 2003 03:08:23 -0000 1.3.4.3
+++ truncate.c 15 Dec 2003 08:22:16 -0000 1.3.4.4
@@ -84,7 +84,6 @@ _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)
@@ -97,7 +96,6 @@ out:
errno = -err;
err = -1;
}
- SYSIO_LEAVE;
return err;
}
@@ -122,7 +120,6 @@ _ftruncate(int fd, _SYSIO_OFF_T length)
{
int err;
struct file *fil;
- SYSIO_ENTER;
err = 0;
fil = _sysio_fd_find(fd);
@@ -136,7 +133,6 @@ out:
errno = -err;
err = -1;
}
- SYSIO_LEAVE;
return err;
}
Index: unlink.c
===================================================================
RCS file: /cvsroot/libsysio/libsysio/src/unlink.c,v
retrieving revision 1.3.4.3
retrieving revision 1.3.4.4
diff -u -w -b -B -p -r1.3.4.3 -r1.3.4.4
--- unlink.c 1 Nov 2003 03:08:23 -0000 1.3.4.3
+++ unlink.c 15 Dec 2003 08:22:16 -0000 1.3.4.4
@@ -58,7 +58,6 @@ 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);
@@ -83,6 +82,5 @@ out:
errno = -err;
err = -1;
}
- SYSIO_LEAVE;
return err;
}
Index: write.c
===================================================================
RCS file: /cvsroot/libsysio/libsysio/src/write.c,v
retrieving revision 1.2.10.9
retrieving revision 1.2.10.10
diff -u -w -b -B -p -r1.2.10.9 -r1.2.10.10
--- write.c 4 Dec 2003 04:39:17 -0000 1.2.10.9
+++ write.c 15 Dec 2003 08:22:16 -0000 1.2.10.10
@@ -115,18 +115,14 @@ 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;
}
@@ -195,22 +192,16 @@ 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;
- SYSIO_LEAVE;
return IOID_FAIL;
}
ioctxp = do_ixwritev(fil, iov, count, fil->f_pos, _sysio_fcompletio);
- if (!ioctxp) {
- SYSIO_LEAVE;
+ if (!ioctxp)
return IOID_FAIL;
- }
- SYSIO_LEAVE;
return ioctxp->ioctx_id;
}
|