libsysio-commit Mailing List for libsysio (Page 11)
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: Lee W. <lw...@us...> - 2007-07-02 18:58:48
|
Update of /cvsroot/libsysio/libsysio In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv18012 Modified Files: autogen.sh configure.in Log Message: Altered tracing support to include a format now. Re-introducing _HAVE_STATVFS6 for binary compatibility. Index: autogen.sh =================================================================== RCS file: /cvsroot/libsysio/libsysio/autogen.sh,v retrieving revision 1.2 retrieving revision 1.3 diff -u -w -b -B -p -r1.2 -r1.3 --- autogen.sh 14 Apr 2004 15:51:47 -0000 1.2 +++ autogen.sh 2 Jul 2007 18:58:15 -0000 1.3 @@ -1,5 +1,5 @@ #!/bin/sh aclocal && -automake --add-missing --copy && +automake --add-missing --copy --force && ${AUTOCONF:-autoconf} Index: configure.in =================================================================== RCS file: /cvsroot/libsysio/libsysio/configure.in,v retrieving revision 1.33 retrieving revision 1.34 diff -u -w -b -B -p -r1.33 -r1.34 --- configure.in 9 May 2007 23:36:15 -0000 1.33 +++ configure.in 2 Jul 2007 18:58:15 -0000 1.34 @@ -71,16 +71,6 @@ AC_ARG_WITH(tests, [with_tests=yes]) AM_CONDITIONAL(WITH_TESTS, test x$with_tests = xyes) -AC_ARG_WITH(statvfs, - AC_HELP_STRING([--with-statvfs],[include statvfs code]), - [ case "${withval}" in - yes) ;; - no) ;; - *) AC_MSG_ERROR(bad value ${withval} for --with-statvfs) ;; - esac], - [with_statvfs=no]) -AM_CONDITIONAL(_HAVE_STATVFS, test x$with_statvfs = xyes) - AC_ARG_WITH(automount, AC_HELP_STRING([--with-automount@<:@=<automount-file-name>@:>@], [with automounts @<:@<automount-file-name>=.mount@:>@]), @@ -124,6 +114,18 @@ AC_ARG_WITH(defer-init-cwd, [with_defer_init_cwd=no]) AC_SUBST(DEFER_INIT_CWD) +AC_ARG_WITH(with-statvfs, + AC_HELP_STRING([--with-statvfs], + [enable support for statvfs]), + [ case "${withval}" in + yes) _HAVE_STATVFS=-D_HAVE_STATVFS=1 ;; + no) ;; + *) AC_MSG_ERROR(bad value ${withval} for --with-statvfs) ;; + esac], + [with_statvfs=no]) +AM_CONDITIONAL(WITH_STATVFS, test x$with_statvfs = xyes) +AC_SUBST(_HAVE_STATVFS) + AC_ARG_WITH(tracing, AC_HELP_STRING([--with-tracing], [enable tracing support]), @@ -353,10 +355,6 @@ if test x$have_st_gen = xyes; then AC_DEFINE(HAVE_GENERATION) fi -# -# Backward compatibility. The core no longer needs it. We used to check for -# this. Now we assume it and, so, want to provoke support from the drivers. -# AC_MSG_CHECKING(whether .text pseudo-op must be used) AC_CACHE_VAL(sysio_asm_dot_text, [dnl cat > conftest.s <<EOF |
From: Lee W. <lw...@us...> - 2007-07-02 18:58:48
|
Update of /cvsroot/libsysio/libsysio/drivers/incore In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv18012/drivers/incore Modified Files: fs_incore.c Log Message: Altered tracing support to include a format now. Re-introducing _HAVE_STATVFS6 for binary compatibility. Index: fs_incore.c =================================================================== RCS file: /cvsroot/libsysio/libsysio/drivers/incore/fs_incore.c,v retrieving revision 1.32 retrieving revision 1.33 diff -u -w -b -B -p -r1.32 -r1.33 --- fs_incore.c 9 May 2007 23:16:20 -0000 1.32 +++ fs_incore.c 2 Jul 2007 18:58:15 -0000 1.33 @@ -56,7 +56,9 @@ #include <sys/types.h> #include <dirent.h> #include <sys/stat.h> +#ifdef _HAVE_STATVFS #include <sys/statvfs.h> +#endif #include <sys/queue.h> #include "sysio.h" |
From: Lee W. <lw...@us...> - 2007-07-02 18:58:29
|
Update of /cvsroot/libsysio/libsysio/src In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv18012/src Modified Files: access.c chdir.c chmod.c chown.c dup.c fcntl.c fsync.c getdirentries.c init.c ioctl.c iowait.c link.c lseek.c mkdir.c mknod.c module.mk mount.c open.c readlink.c rename.c rmdir.c rw.c stat.c statvfs.c stddir.c symlink.c truncate.c unlink.c utime.c Log Message: Altered tracing support to include a format now. Re-introducing _HAVE_STATVFS6 for binary compatibility. Index: access.c =================================================================== RCS file: /cvsroot/libsysio/libsysio/src/access.c,v retrieving revision 1.16 retrieving revision 1.17 diff -u -w -b -B -p -r1.16 -r1.17 --- access.c 30 Apr 2007 16:56:25 -0000 1.16 +++ access.c 2 Jul 2007 18:58:15 -0000 1.17 @@ -101,6 +101,16 @@ _sysio_check_permission(struct pnode *pn err = -EACCES; /* assume error */ stat = &ino->i_stbuf; do { +#ifdef _SYSIO_ROOT_UID + /* + * Root? + */ + if (_sysio_is_root(crp)) { + err = 0; + break; + } +#endif + /* * Owner? */ @@ -260,12 +270,12 @@ SYSIO_INTERFACE_NAME(access)(const char SYSIO_INTERFACE_DISPLAY_BLOCK; - SYSIO_INTERFACE_ENTER(access, path, amode); + SYSIO_INTERFACE_ENTER(access, "%s%d", path, amode); INTENT_INIT(&intent, INT_GETATTR, NULL, NULL); err = _sysio_namei(_sysio_cwd, path, 0, &intent, &pno); if (err) - SYSIO_INTERFACE_RETURN(-1, err, access, 0); + SYSIO_INTERFACE_RETURN(-1, err, access, "%d", 0); err = _sysio_ldcreds(geteuid(), getegid(), &cr); if (err < 0) goto out; @@ -273,7 +283,7 @@ SYSIO_INTERFACE_NAME(access)(const char _sysio_check_permission(pno, &cr, amode); out: P_RELE(pno); - SYSIO_INTERFACE_RETURN(err ? -1 : 0, err, access, 0); + SYSIO_INTERFACE_RETURN(err ? -1 : 0, err, access, "%d", 0); } #ifdef REDSTORM Index: chdir.c =================================================================== RCS file: /cvsroot/libsysio/libsysio/src/chdir.c,v retrieving revision 1.29 retrieving revision 1.30 diff -u -w -b -B -p -r1.29 -r1.30 --- chdir.c 1 May 2007 16:33:53 -0000 1.29 +++ chdir.c 2 Jul 2007 18:58:15 -0000 1.30 @@ -126,15 +126,15 @@ SYSIO_INTERFACE_NAME(chdir)(const char * struct pnode *pno; SYSIO_INTERFACE_DISPLAY_BLOCK; - SYSIO_INTERFACE_ENTER(chdir, path); + SYSIO_INTERFACE_ENTER(chdir, "%s", path); err = _sysio_namei(_sysio_cwd, path, 0, NULL, &pno); if (err) - SYSIO_INTERFACE_RETURN(-1, err, chdir, 0); + SYSIO_INTERFACE_RETURN(-1, err, chdir, "%d", 0); err = _sysio_p_chdir(pno); if (err) P_RELE(pno); - SYSIO_INTERFACE_RETURN(err ? -1 : 0, err, chdir, 0); + SYSIO_INTERFACE_RETURN(err ? -1 : 0, err, chdir, "%d", 0); } #ifdef REDSTORM @@ -243,7 +243,7 @@ SYSIO_INTERFACE_NAME(getcwd)(char *buf, int err; SYSIO_INTERFACE_DISPLAY_BLOCK; - SYSIO_INTERFACE_ENTER(getcwd, buf, size); + SYSIO_INTERFACE_ENTER(getcwd, "%zu", size); #ifdef DEFER_INIT_CWD if (!_sysio_cwd) { struct pnode *pno; @@ -258,7 +258,7 @@ SYSIO_INTERFACE_NAME(getcwd)(char *buf, } #endif err = _sysio_p_path(_sysio_cwd, &buf, buf ? size : 0); - SYSIO_INTERFACE_RETURN(err ? NULL : buf, err, getcwd, buf, size); + SYSIO_INTERFACE_RETURN(err ? NULL : buf, err, getcwd, "%s", 0); } #ifdef __GLIBC__ Index: chmod.c =================================================================== RCS file: /cvsroot/libsysio/libsysio/src/chmod.c,v retrieving revision 1.15 retrieving revision 1.16 diff -u -w -b -B -p -r1.15 -r1.16 --- chmod.c 30 Apr 2007 16:52:20 -0000 1.15 +++ chmod.c 2 Jul 2007 18:58:16 -0000 1.16 @@ -75,14 +75,14 @@ SYSIO_INTERFACE_NAME(chmod)(const char * struct pnode *pno; SYSIO_INTERFACE_DISPLAY_BLOCK; - SYSIO_INTERFACE_ENTER(chmod, path, mode); + SYSIO_INTERFACE_ENTER(chmod, "%s%mY", path, mode); err = _sysio_namei(_sysio_cwd, path, 0, NULL, &pno); if (err) goto out; err = do_chmod(pno, mode); P_RELE(pno); out: - SYSIO_INTERFACE_RETURN(err ? -1 : 0, err, chmod, 0); + SYSIO_INTERFACE_RETURN(err ? -1 : 0, err, chmod, "%d", 0); } #ifdef REDSTORM @@ -98,7 +98,7 @@ SYSIO_INTERFACE_NAME(fchmod)(int fd, mod struct file *fil; SYSIO_INTERFACE_DISPLAY_BLOCK; - SYSIO_INTERFACE_ENTER(fchmod, fd, mode); + SYSIO_INTERFACE_ENTER(fchmod, "%d%mY", fd, mode); err = 0; fil = _sysio_fd_find(fd); if (!fil) { @@ -108,7 +108,7 @@ SYSIO_INTERFACE_NAME(fchmod)(int fd, mod err = do_chmod(fil->f_pno, mode); out: - SYSIO_INTERFACE_RETURN(err ? -1 : 0, err, fchmod, 0); + SYSIO_INTERFACE_RETURN(err ? -1 : 0, err, fchmod, "%d", 0); } #ifdef REDSTORM Index: chown.c =================================================================== RCS file: /cvsroot/libsysio/libsysio/src/chown.c,v retrieving revision 1.14 retrieving revision 1.15 diff -u -w -b -B -p -r1.14 -r1.15 --- chown.c 30 Apr 2007 16:52:20 -0000 1.14 +++ chown.c 2 Jul 2007 18:58:16 -0000 1.15 @@ -82,7 +82,7 @@ SYSIO_INTERFACE_NAME(chown)(const char * struct pnode *pno; SYSIO_INTERFACE_DISPLAY_BLOCK; - SYSIO_INTERFACE_ENTER(chown, path, owner, group); + SYSIO_INTERFACE_ENTER(chown, "%s%uY%gY", path, owner, group); err = _sysio_namei(_sysio_cwd, path, 0, NULL, &pno); if (err) goto out; @@ -90,7 +90,7 @@ SYSIO_INTERFACE_NAME(chown)(const char * err = _do_chown(pno, owner, group); P_RELE(pno); out: - SYSIO_INTERFACE_RETURN(err ? -1 : 0, err, chown, 0); + SYSIO_INTERFACE_RETURN(err ? -1 : 0, err, chown, "%d", 0); } #ifdef REDSTORM @@ -106,7 +106,7 @@ SYSIO_INTERFACE_NAME(fchown)(int fd, uid struct file *fil; SYSIO_INTERFACE_DISPLAY_BLOCK; - SYSIO_INTERFACE_ENTER(fchown, fd, owner, group); + SYSIO_INTERFACE_ENTER(fchown, "%d%uY%gY", fd, owner, group); err = 0; fil = _sysio_fd_find(fd); if (!fil) { @@ -116,7 +116,7 @@ SYSIO_INTERFACE_NAME(fchown)(int fd, uid err = _do_chown(fil->f_pno, owner, group); out: - SYSIO_INTERFACE_RETURN(err ? -1 : 0, err, fchown, 0); + SYSIO_INTERFACE_RETURN(err ? -1 : 0, err, fchown, "%d", 0); } #ifdef REDSTORM Index: dup.c =================================================================== RCS file: /cvsroot/libsysio/libsysio/src/dup.c,v retrieving revision 1.13 retrieving revision 1.14 diff -u -w -b -B -p -r1.13 -r1.14 --- dup.c 30 Apr 2007 16:52:20 -0000 1.13 +++ dup.c 2 Jul 2007 18:58:16 -0000 1.14 @@ -56,11 +56,13 @@ SYSIO_INTERFACE_NAME(dup2)(int oldfd, in int fd; SYSIO_INTERFACE_DISPLAY_BLOCK; - SYSIO_INTERFACE_ENTER(dup2, oldfd, newfd); + SYSIO_INTERFACE_ENTER(dup2, "%d%d", oldfd, newfd); if (newfd < 0) - SYSIO_INTERFACE_RETURN(-1, -EBADF, dup2, 0); + SYSIO_INTERFACE_RETURN(-1, -EBADF, dup2, "%d", 0); fd = _sysio_fd_dup(oldfd, newfd, 1); - SYSIO_INTERFACE_RETURN(fd < 0 ? -1 : fd, fd < 0 ? fd : 0, dup2, 0); + SYSIO_INTERFACE_RETURN(fd < 0 ? -1 : fd, + fd < 0 ? fd : 0, + dup2, "%d", 0); } #ifdef REDSTORM @@ -75,9 +77,11 @@ SYSIO_INTERFACE_NAME(dup)(int oldfd) int fd; SYSIO_INTERFACE_DISPLAY_BLOCK; - SYSIO_INTERFACE_ENTER(dup, oldfd); + SYSIO_INTERFACE_ENTER(dup, "%d", oldfd); fd = _sysio_fd_dup(oldfd, -1, 0); - SYSIO_INTERFACE_RETURN(fd < 0 ? -1 : fd, fd < 0 ? fd : 0, dup, 0); + SYSIO_INTERFACE_RETURN(fd < 0 ? -1 : fd, + fd < 0 ? fd : 0, + dup, "%d", 0); } #ifdef __GLIBC__ Index: fcntl.c =================================================================== RCS file: /cvsroot/libsysio/libsysio/src/fcntl.c,v retrieving revision 1.29 retrieving revision 1.30 diff -u -w -b -B -p -r1.29 -r1.30 --- fcntl.c 1 May 2007 16:33:53 -0000 1.29 +++ fcntl.c 2 Jul 2007 18:58:16 -0000 1.30 @@ -161,7 +161,7 @@ _sysio_vfcntl(int fd, int cmd, va_list a struct file *fil; SYSIO_INTERFACE_DISPLAY_BLOCK; - SYSIO_INTERFACE_ENTER(vfcntl, fd, cmd); + SYSIO_INTERFACE_ENTER(vfcntl, "%d%d", fd, cmd); err = 0; fil = _sysio_fd_find(fd); if (!fil) { @@ -269,7 +269,7 @@ _sysio_vfcntl(int fd, int cmd, va_list a } out: - SYSIO_INTERFACE_RETURN(rtn, err, vfcntl, 0); + SYSIO_INTERFACE_RETURN(rtn, err, vfcntl, "%d", 0); } int Index: fsync.c =================================================================== RCS file: /cvsroot/libsysio/libsysio/src/fsync.c,v retrieving revision 1.9 retrieving revision 1.10 diff -u -w -b -B -p -r1.9 -r1.10 --- fsync.c 30 Apr 2007 16:52:20 -0000 1.9 +++ fsync.c 2 Jul 2007 18:58:16 -0000 1.10 @@ -58,12 +58,12 @@ SYSIO_INTERFACE_NAME(fsync)(int fd) int err; SYSIO_INTERFACE_DISPLAY_BLOCK; - SYSIO_INTERFACE_ENTER(fsync, fd); + SYSIO_INTERFACE_ENTER(fsync, "%d", fd); fil = _sysio_fd_find(fd); if (!(fil && fil->f_pno)) - SYSIO_INTERFACE_RETURN(-1, -EBADF, fsync, 0); + SYSIO_INTERFACE_RETURN(-1, -EBADF, fsync, "%d", 0); err = PNOP_SYNC(fil->f_pno); - SYSIO_INTERFACE_RETURN(err ? -1 : 0, err, fsync, 0); + SYSIO_INTERFACE_RETURN(err ? -1 : 0, err, fsync, "%d", 0); } int @@ -73,10 +73,10 @@ SYSIO_INTERFACE_NAME(fdatasync)(int fd) int err; SYSIO_INTERFACE_DISPLAY_BLOCK; - SYSIO_INTERFACE_ENTER(fdatasync, fd); + SYSIO_INTERFACE_ENTER(fdatasync, "%d", fd); fil = _sysio_fd_find(fd); if (!(fil && fil->f_pno)) - SYSIO_INTERFACE_RETURN(-1, -EBADF, fdatasync, 0); + SYSIO_INTERFACE_RETURN(-1, -EBADF, fdatasync, "%d", 0); err = PNOP_DATASYNC(fil->f_pno); - SYSIO_INTERFACE_RETURN(err ? -1 : 0, err, fdatasync, 0); + SYSIO_INTERFACE_RETURN(err ? -1 : 0, err, fdatasync, "%d", 0); } Index: getdirentries.c =================================================================== RCS file: /cvsroot/libsysio/libsysio/src/getdirentries.c,v retrieving revision 1.24 retrieving revision 1.25 diff -u -w -b -B -p -r1.24 -r1.25 --- getdirentries.c 1 May 2007 16:33:53 -0000 1.24 +++ getdirentries.c 2 Jul 2007 18:58:16 -0000 1.25 @@ -84,6 +84,7 @@ filldirents(struct file *fil, return cc; } +#ifdef _LARGEFILE64_SOURCE static ssize_t PREPEND(_, SYSIO_INTERFACE_NAME(getdirentries64))(int fd, char *buf, @@ -95,16 +96,16 @@ PREPEND(_, SYSIO_INTERFACE_NAME(getdiren ssize_t cc; SYSIO_INTERFACE_DISPLAY_BLOCK; - SYSIO_INTERFACE_ENTER(getdirentries64, fd, buf, nbytes, basep); + SYSIO_INTERFACE_ENTER(getdirentries64, + "%d%zu%oZ", fd, nbytes, basep); fil = _sysio_fd_find(fd); cc = filldirents(fil, buf, nbytes, basep); SYSIO_INTERFACE_RETURN(cc < 0 ? -1 : cc, cc < 0 ? (int )cc : 0, - getdirentries64, buf, basep); + getdirentries64, "%zd%oZ", basep); } -#ifdef _LARGEFILE64_SOURCE #undef getdirentries64 sysio_sym_strong_alias(PREPEND(_, SYSIO_INTERFACE_NAME(getdirentries64)), SYSIO_INTERFACE_NAME(getdirentries64)) @@ -164,7 +165,7 @@ SYSIO_INTERFACE_NAME(getdirentries)(int char *cp; SYSIO_INTERFACE_DISPLAY_BLOCK; - SYSIO_INTERFACE_ENTER(getdirentries, fd, buf, nbytes, basep); + SYSIO_INTERFACE_ENTER(getdirentries, "%d%zu%d", fd, nbytes, *basep); fil = _sysio_fd_find(fd); count = cc = filldirents(fil, buf, nbytes, &b); @@ -223,11 +224,26 @@ SYSIO_INTERFACE_NAME(getdirentries)(int d64p = (struct dirent64 *)((char *)d64p + d64.d_reclen); } - if (cc < 0) - SYSIO_INTERFACE_RETURN(-1, cc, getdirentries, buf, basep); + if (cc < 0) { +#ifndef BSD +#define _basefmt "%oY" +#else +#define _basefmt "%ld" +#endif + SYSIO_INTERFACE_RETURN(-1, + cc, + getdirentries, "%zd" _basefmt, *basep); +#undef _basefmt + } cc = (char *)dp - buf; *basep = b; - SYSIO_INTERFACE_RETURN(cc, 0, getdirentries, buf, basep); +#ifndef BSD +#define _basefmt "%oY" +#else +#define _basefmt "%ld" +#endif + SYSIO_INTERFACE_RETURN(cc, 0, getdirentries, "%zd" _basefmt, *basep); +#undef _basefmt } #else /* !defined(DIRENT64_IS_NATURAL) */ sysio_sym_strong_alias(PREPEND(_, SYSIO_INTERFACE_NAME(getdirentries64), Index: init.c =================================================================== RCS file: /cvsroot/libsysio/libsysio/src/init.c,v retrieving revision 1.35 retrieving revision 1.36 diff -u -w -b -B -p -r1.35 -r1.36 --- init.c 9 May 2007 23:40:20 -0000 1.35 +++ init.c 2 Jul 2007 18:58:16 -0000 1.36 @@ -93,6 +93,7 @@ struct trace_callback { int line, void *data, int tag, + const char *fmt, va_list ap); void *data; /* callback data */ void (*destructor)(void *data); /* data destructor */ @@ -205,16 +206,9 @@ out: void _sysio_shutdown() { - if (!(_sysio_fd_close_all() == 0 && - _sysio_unmount_all() == 0)) - abort(); -#ifdef ZERO_SUM_MEMORY - _sysio_fd_shutdown(); - _sysio_i_shutdown(); - _sysio_fssw_shutdown(); - _sysio_access_shutdown(); #ifdef SYSIO_TRACING + _sysio_trace_dump_stop(); { struct trace_callback *tcb; @@ -227,6 +221,15 @@ _sysio_shutdown() _sysio_remove_trace(&_sysio_exit_trace_head, tcb); } #endif + if (!(_sysio_fd_close_all() == 0 && + _sysio_unmount_all() == 0)) + abort(); + +#ifdef ZERO_SUM_MEMORY + _sysio_fd_shutdown(); + _sysio_i_shutdown(); + _sysio_fssw_shutdown(); + _sysio_access_shutdown(); #endif } @@ -325,7 +328,8 @@ _sysio_register_trace(void *q, const char *func, int line, void *data, - tracing_tag tag, + int tag, + const char *fmt, va_list ap), void *data, void (*destructor)(void *data)) @@ -365,16 +369,17 @@ _sysio_run_trace_q(void *q, const char *func, int line, int tag, + const char *fmt, ...) { va_list ap, aq; struct trace_callback *tcb; - va_start(ap, tag); + va_start(ap, fmt); tcb = ((struct trace_q *)q)->tqh_first; while (tcb) { va_copy(aq, ap); - (*tcb->f)(file, func, line, tcb->data, tag, ap); + (*tcb->f)(file, func, line, tcb->data, tag, fmt, ap); va_end(aq); tcb = tcb->links.tqe_next; } @@ -387,6 +392,7 @@ _sysio_trace_entry(const char *file __IS int line __IS_UNUSED, void *data __IS_UNUSED, tracing_tag tag, + const char *fmt __IS_UNUSED, va_list ap __IS_UNUSED) { @@ -399,6 +405,7 @@ _sysio_trace_exit(const char *file __IS_ int line __IS_UNUSED, void *data __IS_UNUSED, tracing_tag tag, + const char *fmt __IS_UNUSED, va_list ap __IS_UNUSED) { @@ -933,44 +940,102 @@ do_command(char *buf) static int _sysio_boot_tracing(const char *arg) { + int err; + const char *dirpath; long l; char *cp; - static struct trace_callback - *entcb = NULL, - *exitcb = NULL; - - l = 0; - if (arg) { - l = strtol(arg, (char **)&cp, 0); - if (*cp || !(l == 0 || l == 1)) - return -EINVAL; - } - if (l) { - if (entcb == NULL) - entcb = - _sysio_register_trace(_sysio_entry_trace_q, + int stop; + struct hook { + struct trace_q *q; + void (*f)(const char *file, + const char *func, + int line, + void *data, + int tag, + const char *fmt, + va_list ap); + void *data; + void (*destructor)(void *data); + struct trace_callback *cb; + }; + static struct hook hooks[] = { + { + &_sysio_entry_trace_head, _sysio_trace_entry, NULL, - NULL); - if (entcb == NULL) - return -errno; - if (exitcb == NULL) - exitcb = - _sysio_register_trace(_sysio_exit_trace_q, + NULL, + NULL + }, + { + &_sysio_exit_trace_head, _sysio_trace_exit, NULL, - NULL); - if (exitcb == NULL) - return -errno; + NULL, + NULL + }, + { + NULL, + NULL, + NULL, + NULL, + NULL + } + }; + struct hook *h; + + err = 0; + dirpath = NULL; + l = strtol(arg, (char **)&cp, 0); + if (*arg != '\0' && *cp != '\0') + dirpath = arg; + stop = 0; + if (dirpath) + err = _sysio_trace_dump_start(dirpath); + else if (l) { + /* + * Start console tracing. + */ + do { + if (l != 1) { + err = -EINVAL; + break; + } + for (h = hooks; h->f != NULL; h++) { + if (h->cb) + continue; + h->cb = + _sysio_register_trace(h->q, + h->f, + h->data, + h->destructor); + if (!h->cb) { + err = -ENOMEM; + break; + } + } + } while (0); } else { - if (entcb != NULL) - _sysio_remove_trace(_sysio_entry_trace_q, entcb); - entcb = NULL; - if (exitcb != NULL) - _sysio_remove_trace(_sysio_exit_trace_q, exitcb); - exitcb = NULL; + /* + * Trace dump stop. + */ + stop = 1; } - return 0; + if (!(dirpath || l) || err) { + /* + * Trace dump stop. + */ + _sysio_trace_dump_stop(); + /* + * Stop console tracing. + */ + for (h = hooks; h->f != NULL; h++) { + if (!h->cb) + continue; + _sysio_remove_trace(h->q, h->cb); + h->cb = NULL; + } + } + return err; } #endif Index: ioctl.c =================================================================== RCS file: /cvsroot/libsysio/libsysio/src/ioctl.c,v retrieving revision 1.13 retrieving revision 1.14 diff -u -w -b -B -p -r1.13 -r1.14 --- ioctl.c 30 Apr 2007 16:52:20 -0000 1.13 +++ ioctl.c 2 Jul 2007 18:58:16 -0000 1.14 @@ -61,7 +61,7 @@ SYSIO_INTERFACE_NAME(ioctl)(int fd, unsi va_list ap; SYSIO_INTERFACE_DISPLAY_BLOCK; - SYSIO_INTERFACE_ENTER(ioctl, fd, request); + SYSIO_INTERFACE_ENTER(ioctl, "%d%lu", fd, request); err = 0; fil = _sysio_fd_find(fd); if (!fil) { @@ -74,7 +74,7 @@ SYSIO_INTERFACE_NAME(ioctl)(int fd, unsi va_end(ap); out: - SYSIO_INTERFACE_RETURN(err ? -1 : 0, err, ioctl, request); + SYSIO_INTERFACE_RETURN(err ? -1 : 0, err, ioctl, "%d%lu", request); } Index: iowait.c =================================================================== RCS file: /cvsroot/libsysio/libsysio/src/iowait.c,v retrieving revision 1.12 retrieving revision 1.13 diff -u -w -b -B -p -r1.12 -r1.13 --- iowait.c 30 Apr 2007 16:52:20 -0000 1.12 +++ iowait.c 2 Jul 2007 18:58:16 -0000 1.13 @@ -63,13 +63,14 @@ SYSIO_INTERFACE_NAME(iodone)(void *ioid) int rc; SYSIO_INTERFACE_DISPLAY_BLOCK; - SYSIO_INTERFACE_ENTER(iodone, ioid); + SYSIO_INTERFACE_ENTER(iodone, "%p", ioid); ioctx = _sysio_ioctx_find(ioid); if (!ioctx) - SYSIO_INTERFACE_RETURN(-1, -EINVAL, iodone, 0); + SYSIO_INTERFACE_RETURN(-1, -EINVAL, iodone, "%d", 0); rc = _sysio_ioctx_done(ioctx); - SYSIO_INTERFACE_RETURN(rc < 0 ? -1 : rc, rc < 0 ? rc : 0, iodone, 0); + SYSIO_INTERFACE_RETURN(rc < 0 ? -1 : rc, rc < 0 ? rc : 0, + iodone, "%d", 0); } /* @@ -85,12 +86,12 @@ SYSIO_INTERFACE_NAME(iowait)(void *ioid) ssize_t cc; SYSIO_INTERFACE_DISPLAY_BLOCK; - SYSIO_INTERFACE_ENTER(iowait, ioid); + SYSIO_INTERFACE_ENTER(iowait, "%p", ioid); ioctx = _sysio_ioctx_find(ioid); if (!ioctx) - SYSIO_INTERFACE_RETURN(-1, -EINVAL, iowait, 0); + SYSIO_INTERFACE_RETURN(-1, -EINVAL, iowait, "%zd", 0); cc = _sysio_ioctx_wait(ioctx); SYSIO_INTERFACE_RETURN(cc < 0 ? -1 : cc, cc < 0 ? (int )cc : 0, - iowait, 0); + iowait, "%zd", 0); } Index: link.c =================================================================== RCS file: /cvsroot/libsysio/libsysio/src/link.c,v retrieving revision 1.13 retrieving revision 1.14 diff -u -w -b -B -p -r1.13 -r1.14 --- link.c 30 Apr 2007 16:52:20 -0000 1.13 +++ link.c 2 Jul 2007 18:58:16 -0000 1.14 @@ -62,7 +62,7 @@ SYSIO_INTERFACE_NAME(link)(const char *o struct pnode *old, *new; SYSIO_INTERFACE_DISPLAY_BLOCK; - SYSIO_INTERFACE_ENTER(link, oldpath, newpath); + SYSIO_INTERFACE_ENTER(link, "%s%s", oldpath, newpath); INTENT_INIT(&intent, 0, NULL, NULL); err = _sysio_namei(_sysio_cwd, oldpath, 0, &intent, &old); if (err) @@ -104,7 +104,7 @@ error2: error1: P_RELE(old); out: - SYSIO_INTERFACE_RETURN(err ? -1 : 0, err, link, 0); + SYSIO_INTERFACE_RETURN(err ? -1 : 0, err, link, "%d", 0); } #ifdef REDSTORM Index: lseek.c =================================================================== RCS file: /cvsroot/libsysio/libsysio/src/lseek.c,v retrieving revision 1.29 retrieving revision 1.30 diff -u -w -b -B -p -r1.29 -r1.30 --- lseek.c 1 May 2007 16:33:53 -0000 1.29 +++ lseek.c 2 Jul 2007 18:58:16 -0000 1.30 @@ -36,7 +36,7 @@ * Lee Ward * Sandia National Laboratories, New Mexico * P.O. Box 5800 - * Albuquerque, NM 87185-1110 + * Albuquerque, NM 87185-1319 * * le...@sa... */ @@ -128,14 +128,16 @@ SYSIO_INTERFACE_NAME(lseek64)(int fd, of off64_t off; SYSIO_INTERFACE_DISPLAY_BLOCK; - SYSIO_INTERFACE_ENTER(lseek64, fd, offset, whence); + SYSIO_INTERFACE_ENTER(lseek64, "%d%loY%d", fd, offset, whence); fil = _sysio_fd_find(fd); if (!fil) - SYSIO_INTERFACE_RETURN((off64_t )-1, -EBADF, lseek64, 0); + SYSIO_INTERFACE_RETURN((off64_t )-1, + -EBADF, + lseek64, "%loY", 0); off = _sysio_lseek(fil, offset, whence, _SEEK_MAX(fil)); SYSIO_INTERFACE_RETURN(off < 0 ? (off64_t )-1 : off, off < 0 ? (int )off : 0, - lseek64, 0); + lseek64, "%loY", 0); } #ifdef __GLIBC__ @@ -160,16 +162,16 @@ SYSIO_INTERFACE_NAME(lseek)(int fd, off_ off_t rtn; SYSIO_INTERFACE_DISPLAY_BLOCK; - SYSIO_INTERFACE_ENTER(lseek, fd, offset, whence); + SYSIO_INTERFACE_ENTER(lseek, "%d%oY%d", fd, offset, whence); fil = _sysio_fd_find(fd); if (!fil) - SYSIO_INTERFACE_RETURN((off_t )-1, -EBADF, lseek, 0); + SYSIO_INTERFACE_RETURN((off_t )-1, -EBADF, lseek, "%oY", 0); off = _sysio_lseek(fil, offset, whence, LONG_MAX); if (off < 0) - SYSIO_INTERFACE_RETURN((off_t )-1, (int )off, lseek, 0); + SYSIO_INTERFACE_RETURN((off_t )-1, (int )off, lseek, "%oY", 0); rtn = (off_t )off; assert(rtn == off); - SYSIO_INTERFACE_RETURN(rtn, 0, lseek, 0); + SYSIO_INTERFACE_RETURN(rtn, 0, lseek, "%oY", 0); } #ifdef __GLIBC__ @@ -195,20 +197,20 @@ SYSIO_INTERFACE_NAME(llseek)(unsigned in * This is just plain goofy. */ SYSIO_INTERFACE_ENTER(llseek, + "%d%lu%lu%u", fd, offset_high, offset_low, - result, whence); fil = _sysio_fd_find(fd); if (!fil) - SYSIO_INTERFACE_RETURN(-1, -EBADF, llseek, NULL); + SYSIO_INTERFACE_RETURN(-1, -EBADF, llseek, "%d", NULL); #ifndef _LARGEFILE64_SOURCE if (offset_high) { /* * We are using 32-bit internals. This just isn't * going to work. */ - SYSIO_INTERFACE_RETURN(-1, -EOVERFLOW, llseek, NULL); + SYSIO_INTERFACE_RETURN(-1, -EOVERFLOW, llseek, "%d", NULL); } #else off = offset_high; @@ -217,9 +219,12 @@ SYSIO_INTERFACE_NAME(llseek)(unsigned in #endif off = _sysio_lseek(fil, off, whence, _SEEK_MAX(fil)); if (off < 0) - SYSIO_INTERFACE_RETURN((off_t )-1, (int )off, llseek, NULL); + SYSIO_INTERFACE_RETURN(-1, (int )off, llseek, "%d", NULL); *result = off; - SYSIO_INTERFACE_RETURN(0, 0, llseek, result); + /* + * Note: Need to add the result to the tracing info some day :( + */ + SYSIO_INTERFACE_RETURN(0, 0, llseek, "%d", 0); } #undef __llseek Index: mkdir.c =================================================================== RCS file: /cvsroot/libsysio/libsysio/src/mkdir.c,v retrieving revision 1.21 retrieving revision 1.22 diff -u -w -b -B -p -r1.21 -r1.22 --- mkdir.c 30 Apr 2007 16:52:20 -0000 1.21 +++ mkdir.c 2 Jul 2007 18:58:16 -0000 1.22 @@ -78,7 +78,7 @@ SYSIO_INTERFACE_NAME(mkdir)(const char * struct pnode *pno; SYSIO_INTERFACE_DISPLAY_BLOCK; - SYSIO_INTERFACE_ENTER(mkdir, path, mode); + SYSIO_INTERFACE_ENTER(mkdir, "%s%mY", path, mode); INTENT_INIT(&intent, INT_CREAT, &mode, NULL); err = _sysio_namei(_sysio_cwd, path, ND_NEGOK, &intent, &pno); if (err) @@ -88,7 +88,7 @@ SYSIO_INTERFACE_NAME(mkdir)(const char * err = _sysio_mkdir(pno, mode); P_RELE(pno); out: - SYSIO_INTERFACE_RETURN(err ? -1 : 0, err, mkdir, 0); + SYSIO_INTERFACE_RETURN(err ? -1 : 0, err, mkdir, "%d", 0); } #ifdef REDSTORM Index: mknod.c =================================================================== RCS file: /cvsroot/libsysio/libsysio/src/mknod.c,v retrieving revision 1.20 retrieving revision 1.21 diff -u -w -b -B -p -r1.20 -r1.21 --- mknod.c 30 Apr 2007 16:52:20 -0000 1.20 +++ mknod.c 2 Jul 2007 18:58:16 -0000 1.21 @@ -91,7 +91,7 @@ PREPEND(__, SYSIO_INTERFACE_NAME(xmknod) struct pnode *pno; SYSIO_INTERFACE_DISPLAY_BLOCK; - SYSIO_INTERFACE_ENTER(xmknod, __ver, path, mode, dev); + SYSIO_INTERFACE_ENTER(xmknod, "%d%s%mY%dY",__ver, path, mode, dev); if (__ver != _MKNOD_VER) { err = -ENOSYS; goto out; @@ -111,7 +111,7 @@ PREPEND(__, SYSIO_INTERFACE_NAME(xmknod) error: P_RELE(pno); out: - SYSIO_INTERFACE_RETURN(err ? -1 : 0, err, xmknod, 0); + SYSIO_INTERFACE_RETURN(err ? -1 : 0, err, xmknod, "%d", 0); } #ifdef REDSTORM Index: module.mk =================================================================== RCS file: /cvsroot/libsysio/libsysio/src/module.mk,v retrieving revision 1.12 retrieving revision 1.13 diff -u -w -b -B -p -r1.12 -r1.13 --- module.mk 30 Apr 2007 23:24:13 -0000 1.12 +++ module.mk 2 Jul 2007 18:58:16 -0000 1.13 @@ -10,6 +10,12 @@ else LUSTRE_SRCDIR_SRCS = endif +if WITH_STATVFS +STATVFS_SRCS = src/statvfs.c +else +STATVFS_SRCS = +endif + SRCDIR_SRCS = src/access.c src/chdir.c src/chmod.c \ src/chown.c src/dev.c src/dup.c src/fcntl.c \ src/fs.c src/fsync.c \ @@ -18,10 +24,11 @@ SRCDIR_SRCS = src/access.c src/chdir.c s src/link.c src/lseek.c src/mkdir.c \ src/mknod.c src/mount.c src/namei.c \ src/open.c src/rw.c src/reconcile.c src/rename.c \ - src/rmdir.c src/stat.c src/statvfs.c \ + src/rmdir.c src/stat.c $(STATVFS_SRCS) \ src/stddir.c src/readdir.c src/readdir64.c \ src/symlink.c src/readlink.c \ src/truncate.c src/unlink.c src/utime.c \ - $(FILE_SUPPORT) $(LUSTRE_SRCDIR_SRCS) + $(FILE_SUPPORT) $(LUSTRE_SRCDIR_SRCS) \ + src/tracing.c SRCDIR_EXTRA = src/module.mk Index: mount.c =================================================================== RCS file: /cvsroot/libsysio/libsysio/src/mount.c,v retrieving revision 1.23 retrieving revision 1.24 diff -u -w -b -B -p -r1.23 -r1.24 --- mount.c 1 May 2007 16:33:53 -0000 1.23 +++ mount.c 2 Jul 2007 18:58:17 -0000 1.24 @@ -351,6 +351,7 @@ SYSIO_INTERFACE_NAME(mount)(const char * SYSIO_INTERFACE_DISPLAY_BLOCK; SYSIO_INTERFACE_ENTER(mount, + "%s%s%s%lu", source, target, filesystemtype, mountflags); @@ -361,7 +362,7 @@ SYSIO_INTERFACE_NAME(mount)(const char * filesystemtype, mountflags, data); - SYSIO_INTERFACE_RETURN(err ? -1 : 0, err, mount, 0); + SYSIO_INTERFACE_RETURN(err ? -1 : 0, err, mount, "%d", 0); } int @@ -372,7 +373,7 @@ SYSIO_INTERFACE_NAME(umount)(const char struct mount *mnt; SYSIO_INTERFACE_DISPLAY_BLOCK; - SYSIO_INTERFACE_ENTER(umount, target); + SYSIO_INTERFACE_ENTER(umount, "%s", target); /* * Look up the target path node. */ @@ -398,7 +399,7 @@ SYSIO_INTERFACE_NAME(umount)(const char err = _sysio_do_unmount(mnt); out: - SYSIO_INTERFACE_RETURN(err ? -1 : 0, err, umount, 0); + SYSIO_INTERFACE_RETURN(err ? -1 : 0, err, umount, "%d", 0); } /* Index: open.c =================================================================== RCS file: /cvsroot/libsysio/libsysio/src/open.c,v retrieving revision 1.29 retrieving revision 1.30 diff -u -w -b -B -p -r1.29 -r1.30 --- open.c 30 Apr 2007 16:52:20 -0000 1.29 +++ open.c 2 Jul 2007 18:58:17 -0000 1.30 @@ -161,7 +161,7 @@ SYSIO_INTERFACE_NAME(open)(const char *p if (flags & O_NOFOLLOW) ndflags |= ND_NOFOLLOW; #endif - SYSIO_INTERFACE_ENTER(open, path, flags, mode); + SYSIO_INTERFACE_ENTER(open, "%s%d%mY", path, flags, mode); /* * Find the file. @@ -192,14 +192,14 @@ SYSIO_INTERFACE_NAME(open)(const char *p P_RELE(pno); - SYSIO_INTERFACE_RETURN(rtn, 0, open, 0); + SYSIO_INTERFACE_RETURN(rtn, 0, open, "%d", 0); error: if (fil) F_RELE(fil); if (pno) P_RELE(pno); - SYSIO_INTERFACE_RETURN(-1, rtn, open, 0); + SYSIO_INTERFACE_RETURN(-1, rtn, open, "%d", 0); } #ifdef __GLIBC__ @@ -231,9 +231,9 @@ SYSIO_INTERFACE_NAME(close)(int fd) int err; SYSIO_INTERFACE_DISPLAY_BLOCK; - SYSIO_INTERFACE_ENTER(close, fd); + SYSIO_INTERFACE_ENTER(close, "%d", fd); err = _sysio_fd_close(fd); - SYSIO_INTERFACE_RETURN(err ? -1 : 0, err, close, 0); + SYSIO_INTERFACE_RETURN(err ? -1 : 0, err, close, "%d", 0); } #ifdef __GLIBC__ Index: readlink.c =================================================================== RCS file: /cvsroot/libsysio/libsysio/src/readlink.c,v retrieving revision 1.9 retrieving revision 1.10 diff -u -w -b -B -p -r1.9 -r1.10 --- readlink.c 30 Apr 2007 16:52:20 -0000 1.9 +++ readlink.c 2 Jul 2007 18:58:17 -0000 1.10 @@ -64,7 +64,7 @@ SYSIO_INTERFACE_NAME(readlink)(const cha struct pnode *pno; SYSIO_INTERFACE_DISPLAY_BLOCK; - SYSIO_INTERFACE_ENTER(readlink, path, bufsiz); + SYSIO_INTERFACE_ENTER(readlink, "%s%zd", path, bufsiz); INTENT_INIT(&intent, INT_GETATTR, NULL, NULL); err = _sysio_namei(_sysio_cwd, path, ND_NOFOLLOW, &intent, &pno); if (err) @@ -77,8 +77,14 @@ SYSIO_INTERFACE_NAME(readlink)(const cha error: P_RELE(pno); out: +#ifdef HAVE_POSIX_1003_READLINK +#define _rtnfmt "%zd" +#else +#define _rtnfmt "%d" +#endif SYSIO_INTERFACE_RETURN(err < 0 ? -1 : err, err >= 0 ? 0 : err, - readlink, buf); + readlink, _rtnfmt "%*s", err, buf); +#undef _rtnfmt } #ifdef REDSTORM Index: rename.c =================================================================== RCS file: /cvsroot/libsysio/libsysio/src/rename.c,v retrieving revision 1.13 retrieving revision 1.14 diff -u -w -b -B -p -r1.13 -r1.14 --- rename.c 30 Apr 2007 16:52:20 -0000 1.13 +++ rename.c 2 Jul 2007 18:58:17 -0000 1.14 @@ -62,13 +62,13 @@ SYSIO_INTERFACE_NAME(rename)(const char struct pnode *old, *new; SYSIO_INTERFACE_DISPLAY_BLOCK; - SYSIO_INTERFACE_ENTER(rename, oldpath, newpath); + SYSIO_INTERFACE_ENTER(rename, "%s%s", oldpath, newpath); /* * Neither old nor new may be the empty string. */ if (*oldpath == '\0' || *newpath == '\0') - SYSIO_INTERFACE_RETURN(-1, -ENOENT, rename, 0); + SYSIO_INTERFACE_RETURN(-1, -ENOENT, rename, "%d", 0); old = new = NULL; do { @@ -108,5 +108,5 @@ SYSIO_INTERFACE_NAME(rename)(const char P_RELE(new); if (old) P_RELE(old); - SYSIO_INTERFACE_RETURN(err ? -1 : 0, err, rename, 0); + SYSIO_INTERFACE_RETURN(err ? -1 : 0, err, rename, "%d", 0); } Index: rmdir.c =================================================================== RCS file: /cvsroot/libsysio/libsysio/src/rmdir.c,v retrieving revision 1.21 retrieving revision 1.22 diff -u -w -b -B -p -r1.21 -r1.22 --- rmdir.c 30 Apr 2007 16:52:20 -0000 1.21 +++ rmdir.c 2 Jul 2007 18:58:17 -0000 1.22 @@ -62,7 +62,7 @@ SYSIO_INTERFACE_NAME(rmdir)(const char * struct pnode *pno; SYSIO_INTERFACE_DISPLAY_BLOCK; - SYSIO_INTERFACE_ENTER(rmdir, path); + SYSIO_INTERFACE_ENTER(rmdir, "%s", path); do { INTENT_INIT(&intent, INT_UPDPARENT, NULL, NULL); err = _sysio_namei(_sysio_cwd, path, 0, &intent, &pno); @@ -79,7 +79,7 @@ SYSIO_INTERFACE_NAME(rmdir)(const char * } while (0); if (pno) P_RELE(pno); - SYSIO_INTERFACE_RETURN(err ? -1 : 0, err, rmdir, 0); + SYSIO_INTERFACE_RETURN(err ? -1 : 0, err, rmdir, "%d", 0); } #ifdef REDSTORM Index: rw.c =================================================================== RCS file: /cvsroot/libsysio/libsysio/src/rw.c,v retrieving revision 1.21 retrieving revision 1.22 diff -u -w -b -B -p -r1.21 -r1.22 --- rw.c 1 May 2007 16:33:53 -0000 1.21 +++ rw.c 2 Jul 2007 18:58:17 -0000 1.22 @@ -306,12 +306,16 @@ _do_ireadx(int fd, struct ioctx *ioctx; SYSIO_INTERFACE_DISPLAY_BLOCK; - SYSIO_INTERFACE_ENTER(ireadx, fd, iov, iov_count, xtv, xtv_count); + SYSIO_INTERFACE_ENTER(ireadx, + "%d%*iY%*xZ", + fd, + iov_count, iov, + xtv_count, xtv); fil = _sysio_fd_find(fd); if (fil == NULL) - SYSIO_INTERFACE_RETURN(IOID_FAIL, -EBADF, ireadx, iov); + SYSIO_INTERFACE_RETURN(IOID_FAIL, -EBADF, ireadx, "%p", 0); if (fil->f_pno->p_base->pb_ino == NULL) - SYSIO_INTERFACE_RETURN(IOID_FAIL, -ESTALE, ireadx, iov); + SYSIO_INTERFACE_RETURN(IOID_FAIL, -ESTALE, ireadx, "%p", 0); err = _sysio_iiox(READ, fil, @@ -319,7 +323,7 @@ _do_ireadx(int fd, xtv, xtv_count, release_xtvec, completio, &ioctx); - SYSIO_INTERFACE_RETURN(err ? IOID_FAIL : ioctx, err, ireadx, iov); + SYSIO_INTERFACE_RETURN(err ? IOID_FAIL : ioctx, err, ireadx, "%p", 0); } #ifdef _LARGEFILE64_SOURCE @@ -352,12 +356,16 @@ _do_iwritex(int fd, struct ioctx *ioctx; SYSIO_INTERFACE_DISPLAY_BLOCK; - SYSIO_INTERFACE_ENTER(iwritex, fd, iov, iov_count, xtv, xtv_count); + SYSIO_INTERFACE_ENTER(iwritex, + "%d%*iY%*xZ", + fd, + iov_count, iov, + xtv_count, xtv); fil = _sysio_fd_find(fd); if (fil == NULL) - SYSIO_INTERFACE_RETURN(IOID_FAIL, -EBADF, iwritex, iov); + SYSIO_INTERFACE_RETURN(IOID_FAIL, -EBADF, iwritex, "%p", 0); if (fil->f_pno->p_base->pb_ino == NULL) - SYSIO_INTERFACE_RETURN(IOID_FAIL, -ESTALE, iwritex, iov); + SYSIO_INTERFACE_RETURN(IOID_FAIL, -ESTALE, iwritex, "%p", 0); err = _sysio_iiox(WRITE, fil, @@ -365,7 +373,7 @@ _do_iwritex(int fd, xtv, xtv_count, release_xtvec, completio, &ioctx); - SYSIO_INTERFACE_RETURN(err ? IOID_FAIL : ioctx, err, iwritex, iov); + SYSIO_INTERFACE_RETURN(err ? IOID_FAIL : ioctx, err, iwritex, "%p", 0); } #ifdef _LARGEFILE64_SOURCE @@ -869,9 +877,9 @@ _do_iiov(direction dir, SYSIO_INTERFACE_DISPLAY_BLOCK; if (dir == READ) - SYSIO_INTERFACE_ENTER(ireadv, fd, iov, count); + SYSIO_INTERFACE_ENTER(ireadv, "%d%*iY", fd, count, iov); else - SYSIO_INTERFACE_ENTER(iwritev, fd, iov, count); + SYSIO_INTERFACE_ENTER(iwritev, "%d%*iY", fd, count, iov); xtv = NULL; err = 0; do { @@ -909,10 +917,10 @@ _do_iiov(direction dir, free(xtv); if (dir == READ) SYSIO_INTERFACE_RETURN(err ? IOID_FAIL : ioctx, err, - ireadx, iov); + ireadx, "%p", 0); else SYSIO_INTERFACE_RETURN(err ? IOID_FAIL : ioctx, err, - iwritex, iov); + iwritex, "%p", 0); /* Not reached. */ } Index: stat.c =================================================================== RCS file: /cvsroot/libsysio/libsysio/src/stat.c,v retrieving revision 1.19 retrieving revision 1.20 diff -u -w -b -B -p -r1.19 -r1.20 --- stat.c 1 May 2007 16:33:53 -0000 1.19 +++ stat.c 2 Jul 2007 18:58:17 -0000 1.20 @@ -66,7 +66,7 @@ _sysio_fxstat(int ver, int fildes, struc int err; SYSIO_INTERFACE_DISPLAY_BLOCK; - SYSIO_INTERFACE_ENTER(fxstat, ver, fildes); + SYSIO_INTERFACE_ENTER(fxstat, "%d%d", ver, fildes); if (ver != _STAT_VER) { err = -ENOSYS; goto out; @@ -84,7 +84,10 @@ _sysio_fxstat(int ver, int fildes, struc */ err = PNOP_GETATTR(fil->f_pno, stat_buf); out: - SYSIO_INTERFACE_RETURN(err ? -1 : 0, err, fxstat, stat_buf); + /* + * Note: Pass the stat buffer to the tracing routines some day. + */ + SYSIO_INTERFACE_RETURN(err ? -1 : 0, err, fxstat, "%d", 0); } static int @@ -98,7 +101,7 @@ _sysio_xstatnd(int ver, struct pnode *pno; SYSIO_INTERFACE_DISPLAY_BLOCK; - SYSIO_INTERFACE_ENTER(xstatnd, ver, filename, ndflags); + SYSIO_INTERFACE_ENTER(xstatnd, "%d%s%u", ver, filename, ndflags); if (ver != _STAT_VER) { err = -ENOSYS; goto out; @@ -118,7 +121,10 @@ _sysio_xstatnd(int ver, sizeof(struct intnl_stat)); P_RELE(pno); out: - SYSIO_INTERFACE_RETURN(err ? -1 : 0, err, xstatnd, stat_buf); + /* + * Note: Pass the stat buffer to the tracing routines some day. + */ + SYSIO_INTERFACE_RETURN(err ? -1 : 0, err, xstatnd, "%d", 0); } #ifdef _LARGEFILE64_SOURCE Index: statvfs.c =================================================================== RCS file: /cvsroot/libsysio/libsysio/src/statvfs.c,v retrieving revision 1.16 retrieving revision 1.17 diff -u -w -b -B -p -r1.16 -r1.17 --- statvfs.c 9 May 2007 23:16:20 -0000 1.16 +++ statvfs.c 2 Jul 2007 18:58:17 -0000 1.17 @@ -94,9 +94,12 @@ SYSIO_INTERFACE_NAME(statvfs64)(const ch int err; SYSIO_INTERFACE_DISPLAY_BLOCK; - SYSIO_INTERFACE_ENTER(statvfs64, path); + SYSIO_INTERFACE_ENTER(statvfs64, "%s", path); err = _sysio_statvfs(path, buf); - SYSIO_INTERFACE_RETURN(err ? -1 : 0, err, statvfs64, buf); + /* + * Note: Pass the statvfs buffer to the tracing routines some day. + */ + SYSIO_INTERFACE_RETURN(err ? -1 : 0, err, statvfs64, "%d", 0); } #ifdef REDSTORM @@ -111,9 +114,12 @@ SYSIO_INTERFACE_NAME(fstatvfs64)(int fd, int err; SYSIO_INTERFACE_DISPLAY_BLOCK; - SYSIO_INTERFACE_ENTER(fstatvfs64, fd, buf); + SYSIO_INTERFACE_ENTER(fstatvfs64, "%d", fd); err = _sysio_fstatvfs(fd, buf); - SYSIO_INTERFACE_RETURN(err ? -1 : 0, err, fstatvfs64, buf); + /* + * Note: Pass the statvfs buffer to the tracing routines some day. + */ + SYSIO_INTERFACE_RETURN(err ? -1 : 0, err, fstatvfs64, "%d", 0); } #ifdef REDSTORM @@ -156,14 +162,17 @@ SYSIO_INTERFACE_NAME(statvfs)(const char #endif /* defined(_LARGEFILE64_SOURCE) */ SYSIO_INTERFACE_DISPLAY_BLOCK; - SYSIO_INTERFACE_ENTER(statvfs, path); + SYSIO_INTERFACE_ENTER(statvfs, "%s", path); err = _sysio_statvfs(path, _call_buf); #if defined(_LARGEFILE64_SOURCE) if (!err) convstatvfs(buf, _call_buf); #undef _call_buf #endif /* defined(_LARGEFILE64_SOURCE) */ - SYSIO_INTERFACE_RETURN(err ? -1 : 0, err, statvfs, buf); + /* + * Note: Pass the statvfs buffer to the tracing routines some day. + */ + SYSIO_INTERFACE_RETURN(err ? -1 : 0, err, statvfs, "%d", 0); } #ifdef REDSTORM @@ -184,14 +193,17 @@ SYSIO_INTERFACE_NAME(fstatvfs)(int fd, s #endif /* defined(_LARGEFILE64_SOURCE) */ SYSIO_INTERFACE_DISPLAY_BLOCK; - SYSIO_INTERFACE_ENTER(fstatvfs, fd); + SYSIO_INTERFACE_ENTER(fstatvfs, "%d", fd); err = _sysio_fstatvfs(fd, _call_buf); #ifndef INTNL_STATVFS_IS_NATURAL if (!err) convstatvfs(buf, _call_buf); #undef _call_buf #endif - SYSIO_INTERFACE_RETURN(err ? -1 : 0, err, fstatvfs, buf); + /* + * Note: Pass the statvfs buffer to the tracing routines some day. + */ + SYSIO_INTERFACE_RETURN(err ? -1 : 0, err, fstatvfs, "%d", 0); } #ifdef REDSTORM Index: stddir.c =================================================================== RCS file: /cvsroot/libsysio/libsysio/src/stddir.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -w -b -B -p -r1.3 -r1.4 --- stddir.c 30 Apr 2007 16:52:20 -0000 1.3 +++ stddir.c 2 Jul 2007 18:58:17 -0000 1.4 @@ -51,18 +51,18 @@ SYSIO_INTERFACE_NAME(opendir)(const char SYSIO_INTERFACE_DISPLAY_BLOCK; - SYSIO_INTERFACE_ENTER(opendir, name); + SYSIO_INTERFACE_ENTER(opendir, "%s", name); dir = (DIR * )calloc(1, sizeof(DIR)); if (!dir) - SYSIO_INTERFACE_RETURN(NULL, -ENOMEM, opendir, 0); + SYSIO_INTERFACE_RETURN(NULL, -ENOMEM, opendir, "%p", 0); dir->fd = SYSIO_INTERFACE_NAME(open)(name, O_RDONLY); if (dir->fd < 0) { free(dir); - SYSIO_INTERFACE_RETURN(NULL, -errno, opendir, 0); + SYSIO_INTERFACE_RETURN(NULL, -errno, opendir, "%p", 0); } - SYSIO_INTERFACE_RETURN(dir, 0, opendir, 0); + SYSIO_INTERFACE_RETURN(dir, 0, opendir, "%p", 0); } sysio_sym_weak_alias(SYSIO_INTERFACE_NAME(opendir), @@ -74,12 +74,12 @@ SYSIO_INTERFACE_NAME(closedir)(DIR *dir) int rc; SYSIO_INTERFACE_DISPLAY_BLOCK; - SYSIO_INTERFACE_ENTER(closedir, dir); + SYSIO_INTERFACE_ENTER(closedir, "%p", dir); rc = SYSIO_INTERFACE_NAME(close)(dir->fd); free(dir); - SYSIO_INTERFACE_RETURN(rc, 0, closedir, 0); + SYSIO_INTERFACE_RETURN(rc, 0, closedir, "%d", 0); } sysio_sym_weak_alias(SYSIO_INTERFACE_NAME(closedir), Index: symlink.c =================================================================== RCS file: /cvsroot/libsysio/libsysio/src/symlink.c,v retrieving revision 1.17 retrieving revision 1.18 diff -u -w -b -B -p -r1.17 -r1.18 --- symlink.c 30 Apr 2007 16:52:20 -0000 1.17 +++ symlink.c 2 Jul 2007 18:58:17 -0000 1.18 @@ -62,7 +62,7 @@ SYSIO_INTERFACE_NAME(symlink)(const char struct pnode *pno; SYSIO_INTERFACE_DISPLAY_BLOCK; - SYSIO_INTERFACE_ENTER(symlink, oldpath, newpath); + SYSIO_INTERFACE_ENTER(symlink, "%s%s", oldpath, newpath); INTENT_INIT(&intent, INT_CREAT, NULL, NULL); err = _sysio_namei(_sysio_cwd, @@ -84,7 +84,7 @@ SYSIO_INTERFACE_NAME(symlink)(const char error: P_RELE(pno); out: - SYSIO_INTERFACE_RETURN(err ? -1 : 0, err, symlink, 0); + SYSIO_INTERFACE_RETURN(err ? -1 : 0, err, symlink, "%d", 0); } #ifdef REDSTORM Index: truncate.c =================================================================== RCS file: /cvsroot/libsysio/libsysio/src/truncate.c,v retrieving revision 1.17 retrieving revision 1.18 diff -u -w -b -B -p -r1.17 -r1.18 --- truncate.c 1 May 2007 16:33:53 -0000 1.17 +++ truncate.c 2 Jul 2007 18:58:17 -0000 1.18 @@ -91,7 +91,7 @@ PREPEND(_, SYSIO_INTERFACE_NAME(truncate struct pnode *pno; SYSIO_INTERFACE_DISPLAY_BLOCK; - SYSIO_INTERFACE_ENTER(truncate, path, length); + SYSIO_INTERFACE_ENTER(truncate, "%s%oZ", path, length); err = _sysio_namei(_sysio_cwd, path, 0, NULL, &pno); if (err) goto out; @@ -99,7 +99,7 @@ PREPEND(_, SYSIO_INTERFACE_NAME(truncate P_RELE(pno); out: - SYSIO_INTERFACE_RETURN(err ? -1 : 0, err, truncate, 0); + SYSIO_INTERFACE_RETURN(err ? -1 : 0, err, truncate, "%d", 0); } #ifdef _LARGEFILE64_SOURCE @@ -127,7 +127,7 @@ PREPEND(_, SYSIO_INTERFACE_NAME(ftruncat struct file *fil; SYSIO_INTERFACE_DISPLAY_BLOCK; - SYSIO_INTERFACE_ENTER(ftruncate, fd, length); + SYSIO_INTERFACE_ENTER(ftruncate, "%d%oZ", fd, length); err = 0; fil = _sysio_fd_find(fd); if (!(fil && F_CHKRW(fil, 'w'))) { @@ -136,7 +136,7 @@ PREPEND(_, SYSIO_INTERFACE_NAME(ftruncat } err = do_truncate(fil->f_pno, length); out: - SYSIO_INTERFACE_RETURN(err ? -1 : 0, err, ftruncate, 0); + SYSIO_INTERFACE_RETURN(err ? -1 : 0, err, ftruncate, "%d", 0); } #ifdef _LARGEFILE64_SOURCE Index: unlink.c =================================================================== RCS file: /cvsroot/libsysio/libsysio/src/unlink.c,v retrieving revision 1.19 retrieving revision 1.20 diff -u -w -b -B -p -r1.19 -r1.20 --- unlink.c 30 Apr 2007 16:52:20 -0000 1.19 +++ unlink.c 2 Jul 2007 18:58:17 -0000 1.20 @@ -62,7 +62,7 @@ SYSIO_INTERFACE_NAME(unlink)(const char struct pnode *pno; SYSIO_INTERFACE_DISPLAY_BLOCK; - SYSIO_INTERFACE_ENTER(unlink, path); + SYSIO_INTERFACE_ENTER(unlink, "%s", path); do { INTENT_INIT(&intent, INT_UPDPARENT, NULL, NULL); err = @@ -80,7 +80,7 @@ SYSIO_INTERFACE_NAME(unlink)(const char } while (0); if (pno) P_RELE(pno); - SYSIO_INTERFACE_RETURN(err ? -1 : 0, err, unlink, 0); + SYSIO_INTERFACE_RETURN(err ? -1 : 0, err, unlink, "%d", 0); } #ifdef REDSTORM Index: utime.c =================================================================== RCS file: /cvsroot/libsysio/libsysio/src/utime.c,v retrieving revision 1.8 retrieving revision 1.9 diff -u -w -b -B -p -r1.8 -r1.9 --- utime.c 30 Apr 2007 16:52:20 -0000 1.8 +++ utime.c 2 Jul 2007 18:58:18 -0000 1.9 @@ -76,7 +76,7 @@ SYSIO_INTERFACE_NAME(utime)(const char * struct intnl_stat stbuf; SYSIO_INTERFACE_DISPLAY_BLOCK; - SYSIO_INTERFACE_ENTER(utime, path); + SYSIO_INTERFACE_ENTER(utime, "%s", path); err = _sysio_namei(_sysio_cwd, path, 0, NULL, &pno); if (err) goto out; @@ -91,5 +91,8 @@ SYSIO_INTERFACE_NAME(utime)(const char * _sysio_p_setattr(pno, SETATTR_ATIME | SETATTR_MTIME, &stbuf); P_RELE(pno); out: - SYSIO_INTERFACE_RETURN(err ? -1 : 0, err, utime, buf); + /* + * Note: Pass the utimbuf buffer to the tracing routines some day. + */ + SYSIO_INTERFACE_RETURN(err ? -1 : 0, err, utime, "%d", 0); } |
From: Lee W. <lw...@us...> - 2007-07-02 18:58:23
|
Update of /cvsroot/libsysio/libsysio/tests In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv18012/tests Modified Files: Makefile.am startup.c Log Message: Altered tracing support to include a format now. Re-introducing _HAVE_STATVFS6 for binary compatibility. Index: Makefile.am =================================================================== RCS file: /cvsroot/libsysio/libsysio/tests/Makefile.am,v retrieving revision 1.29 retrieving revision 1.30 diff -u -w -b -B -p -r1.29 -r1.30 --- Makefile.am 30 Apr 2007 23:24:13 -0000 1.29 +++ Makefile.am 2 Jul 2007 18:58:18 -0000 1.30 @@ -1,7 +1,13 @@ +if WITH_STATVFS +STATVFS_PROG=test_statvfs +else +STATVFS_PROG= +endif + noinst_PROGRAMS = test_copy test_stats test_path test_list \ test_getcwd test_link test_unlink test_symlink test_rename \ test_regions test_stddir test_fcntl_lock test_mknod test_mkdir \ - test_chown test_statvfs + test_chown $(STATVFS_PROG) CLEANFILES=drv_data.c Index: startup.c =================================================================== RCS file: /cvsroot/libsysio/libsysio/tests/startup.c,v retrieving revision 1.13 retrieving revision 1.14 diff -u -w -b -B -p -r1.13 -r1.14 --- startup.c 1 May 2007 16:33:53 -0000 1.13 +++ startup.c 2 Jul 2007 18:58:18 -0000 1.14 @@ -21,15 +21,6 @@ _test_sysio_startup() err = drv_init_all(); if (err) return err; -#ifdef SYSIO_TRACING - /* - * tracing - */ - arg = getenv("SYSIO_TRACING"); - err = _sysio_boot("trace", arg); - if (err) - return err; -#endif /* * namespace */ @@ -54,6 +45,15 @@ _test_sysio_startup() if (err) return err; #endif +#ifdef SYSIO_TRACING + /* + * tracing + */ + arg = getenv("SYSIO_TRACING"); + err = _sysio_boot("trace", arg); + if (err) + return err; +#endif return 0; } |
From: Lee W. <lw...@us...> - 2007-06-29 17:15:20
|
Update of /cvsroot/libsysio/libsysio/src In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv19643/src Modified Files: Tag: cray_tmp access.c Log Message: Add definition for superuser, _SYSIO_ROOT_UID, and a macro to check credentials for superuser, _sysio_is_root(). Use same in access control routine. Index: access.c =================================================================== RCS file: /cvsroot/libsysio/libsysio/src/access.c,v retrieving revision 1.14 retrieving revision 1.14.4.1 diff -u -w -b -B -p -r1.14 -r1.14.4.1 --- access.c 23 Mar 2007 19:05:50 -0000 1.14 +++ access.c 29 Jun 2007 17:15:13 -0000 1.14.4.1 @@ -99,6 +99,16 @@ _sysio_check_permission(struct pnode *pn err = -EACCES; /* assume error */ stat = &ino->i_stbuf; do { +#ifdef _SYSIO_ROOT_UID + /* + * Root? + */ + if (_sysio_is_root(crp)) { + err = 0; + break; + } +#endif + /* * Owner? */ |
From: Lee W. <lw...@us...> - 2007-06-29 17:15:20
|
Update of /cvsroot/libsysio/libsysio/include In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv19643/include Modified Files: Tag: cray_tmp creds.h Log Message: Add definition for superuser, _SYSIO_ROOT_UID, and a macro to check credentials for superuser, _sysio_is_root(). Use same in access control routine. Index: creds.h =================================================================== RCS file: /cvsroot/libsysio/libsysio/include/creds.h,v retrieving revision 1.1 retrieving revision 1.1.6.1 diff -u -w -b -B -p -r1.1 -r1.1.6.1 --- creds.h 12 Dec 2006 00:48:58 -0000 1.1 +++ creds.h 29 Jun 2007 17:15:13 -0000 1.1.6.1 @@ -47,6 +47,11 @@ #define _CREDS_H_ /* + * Superuser's UID. + */ +#define _SYSIO_ROOT_UID 0 + +/* * Data structure for user credentials */ @@ -56,4 +61,12 @@ struct creds { int creds_ngids; }; + +#ifdef _SYSIO_ROOT_UID +/* + * Is caller the superuser? + */ +#define _sysio_is_root(_crp) \ + ((_crp)->creds_uid == _SYSIO_ROOT_UID) +#endif #endif |
From: Lee W. <lw...@us...> - 2007-06-29 15:32:44
|
Update of /cvsroot/libsysio/libsysio/include In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv9804 Modified Files: creds.h Log Message: Add definition for a root user, _SYSIO_ROOT_UID, and a test based on the credentials, _sysio_root_user(). Index: creds.h =================================================================== RCS file: /cvsroot/libsysio/libsysio/include/creds.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -w -b -B -p -r1.1 -r1.2 --- creds.h 12 Dec 2006 00:48:58 -0000 1.1 +++ creds.h 29 Jun 2007 15:32:39 -0000 1.2 @@ -47,6 +47,11 @@ #define _CREDS_H_ /* + * Superuser's UID. + */ +#define _SYSIO_ROOT_UID 0 + +/* * Data structure for user credentials */ @@ -56,4 +61,12 @@ struct creds { int creds_ngids; }; + +#ifdef _SYSIO_ROOT_UID +/* + * Is caller the superuser? + */ +#define _sysio_is_root(_crp) \ + ((_crp)->creds_uid == _SYSIO_ROOT_UID) +#endif #endif |
From: Ruth K. <rk...@us...> - 2007-05-14 20:43:31
|
Update of /cvsroot/libsysio/libsysio/src In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv30037 Modified Files: ioctx.c Log Message: return 1 => done Index: ioctx.c =================================================================== RCS file: /cvsroot/libsysio/libsysio/src/ioctx.c,v retrieving revision 1.26 retrieving revision 1.27 diff -u -w -b -B -p -r1.26 -r1.27 --- ioctx.c 14 May 2007 15:51:55 -0000 1.26 +++ ioctx.c 14 May 2007 20:43:28 -0000 1.27 @@ -192,7 +192,7 @@ _sysio_ioctx_done(struct ioctx *ioctx) if (!PNOP_IODONE(ioctx->ioctx_pno, ioctx)) return 0; #else - if ((*ioctx->ioctx_ino->i_ops.inop_iodone)(ioctx)) + if (!(*ioctx->ioctx_ino->i_ops.inop_iodone)(ioctx)) return 0; #endif ioctx->ioctx_done = 1; |
From: Lee W. <lw...@us...> - 2007-05-14 15:51:59
|
Update of /cvsroot/libsysio/libsysio/src In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv17885 Modified Files: ioctx.c Log Message: The ioctx_pno field has been removed until we are ready to, at least, force a recompile of existing drivers. Right now, we need to be able to use them unaltered for the tracing project. Index: ioctx.c =================================================================== RCS file: /cvsroot/libsysio/libsysio/src/ioctx.c,v retrieving revision 1.25 retrieving revision 1.26 diff -u -w -b -B -p -r1.25 -r1.26 --- ioctx.c 30 Apr 2007 16:52:20 -0000 1.25 +++ ioctx.c 14 May 2007 15:51:55 -0000 1.26 @@ -114,7 +114,11 @@ _sysio_ioctx_new(struct pnode *pno, if (!ioctx) return NULL; +#ifdef not_yet P_REF(pno); +#else + I_REF(pno->p_base->pb_ino); +#endif IOCTX_INIT(ioctx, 0, @@ -184,8 +188,13 @@ _sysio_ioctx_done(struct ioctx *ioctx) if (ioctx->ioctx_done) return 1; +#ifdef not_yet if (!PNOP_IODONE(ioctx->ioctx_pno, ioctx)) return 0; +#else + if ((*ioctx->ioctx_ino->i_ops.inop_iodone)(ioctx)) + return 0; +#endif ioctx->ioctx_done = 1; return 1; } @@ -264,6 +273,10 @@ _sysio_ioctx_complete(struct ioctx *ioct if (ioctx->ioctx_fast) return; +#ifdef not_yet P_RELE(ioctx->ioctx_pno); +#else + I_RELE(ioctx->ioctx_ino); +#endif free(ioctx); } |
From: Lee W. <lw...@us...> - 2007-05-14 15:47:34
|
Update of /cvsroot/libsysio/libsysio/include In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv16125/include Modified Files: inode.h Log Message: Not yet ready for the ioctx_pno member in the ioctx record. This can't return until we are ready to force some sort of interface change. Index: inode.h =================================================================== RCS file: /cvsroot/libsysio/libsysio/include/inode.h,v retrieving revision 1.31 retrieving revision 1.32 diff -u -w -b -B -p -r1.31 -r1.32 --- inode.h 9 May 2007 23:16:20 -0000 1.31 +++ inode.h 14 May 2007 15:47:30 -0000 1.32 @@ -441,7 +441,9 @@ struct ioctx { ioctx_fast : 1, /* from stack space */ ioctx_done : 1, /* transfer complete */ ioctx_write : 1; /* op is a write */ +#ifdef not_yet struct pnode *ioctx_pno; /* p-node */ +#endif struct inode *ioctx_ino; /* i-node (deprecate) */ const struct iovec *ioctx_iov; /* scatter/gather vec */ size_t ioctx_iovlen; /* iovec length */ @@ -461,7 +463,6 @@ struct ioctx { (ioctx)->ioctx_fast = (fast); \ (ioctx)->ioctx_done = 0; \ (ioctx)->ioctx_write = (wr) ? 1 : 0; \ - (ioctx)->ioctx_pno = (pno); \ (ioctx)->ioctx_ino = (pno)->p_base->pb_ino; \ (ioctx)->ioctx_iov = (iov); \ (ioctx)->ioctx_iovlen = (iovlen); \ |
From: Ruth K. <rk...@us...> - 2007-05-09 23:40:24
|
Update of /cvsroot/libsysio/libsysio/src In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv15081/src Modified Files: init.c Log Message: missed endif Index: init.c =================================================================== RCS file: /cvsroot/libsysio/libsysio/src/init.c,v retrieving revision 1.34 retrieving revision 1.35 diff -u -w -b -B -p -r1.34 -r1.35 --- init.c 9 May 2007 23:16:20 -0000 1.34 +++ init.c 9 May 2007 23:40:20 -0000 1.35 @@ -227,6 +227,7 @@ _sysio_shutdown() _sysio_remove_trace(&_sysio_exit_trace_head, tcb); } #endif +#endif } #ifdef SYSIO_TRACING |
From: Ruth K. <rk...@us...> - 2007-05-09 23:36:18
|
Update of /cvsroot/libsysio/libsysio In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv13489 Modified Files: configure.in Log Message: typo Index: configure.in =================================================================== RCS file: /cvsroot/libsysio/libsysio/configure.in,v retrieving revision 1.32 retrieving revision 1.33 diff -u -w -b -B -p -r1.32 -r1.33 --- configure.in 9 May 2007 23:16:20 -0000 1.32 +++ configure.in 9 May 2007 23:36:15 -0000 1.33 @@ -69,7 +69,7 @@ AC_ARG_WITH(tests, *) AC_MSG_ERROR(bad value ${withval} for --with-tests) ;; esac], [with_tests=yes]) -AM_CONDITIONAL(WITH_TESTS, test x$with_tests == xyes) +AM_CONDITIONAL(WITH_TESTS, test x$with_tests = xyes) AC_ARG_WITH(statvfs, AC_HELP_STRING([--with-statvfs],[include statvfs code]), |
From: Ruth K. <rk...@us...> - 2007-05-09 23:16:25
|
Update of /cvsroot/libsysio/libsysio In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv5699 Modified Files: configure.in Log Message: add ifdef _HAVE_STATVFS Index: configure.in =================================================================== RCS file: /cvsroot/libsysio/libsysio/configure.in,v retrieving revision 1.31 retrieving revision 1.32 diff -u -w -b -B -p -r1.31 -r1.32 --- configure.in 30 Apr 2007 23:24:12 -0000 1.31 +++ configure.in 9 May 2007 23:16:20 -0000 1.32 @@ -69,7 +69,17 @@ AC_ARG_WITH(tests, *) AC_MSG_ERROR(bad value ${withval} for --with-tests) ;; esac], [with_tests=yes]) -AM_CONDITIONAL(WITH_TESTS, test x$with_tests = xyes) +AM_CONDITIONAL(WITH_TESTS, test x$with_tests == xyes) + +AC_ARG_WITH(statvfs, + AC_HELP_STRING([--with-statvfs],[include statvfs code]), + [ case "${withval}" in + yes) ;; + no) ;; + *) AC_MSG_ERROR(bad value ${withval} for --with-statvfs) ;; + esac], + [with_statvfs=no]) +AM_CONDITIONAL(_HAVE_STATVFS, test x$with_statvfs = xyes) AC_ARG_WITH(automount, AC_HELP_STRING([--with-automount@<:@=<automount-file-name>@:>@], @@ -347,8 +357,6 @@ fi # Backward compatibility. The core no longer needs it. We used to check for # this. Now we assume it and, so, want to provoke support from the drivers. # -AC_DEFINE(_HAVE_STATVFS) - AC_MSG_CHECKING(whether .text pseudo-op must be used) AC_CACHE_VAL(sysio_asm_dot_text, [dnl cat > conftest.s <<EOF |
From: Ruth K. <rk...@us...> - 2007-05-09 23:16:25
|
Update of /cvsroot/libsysio/libsysio/include In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv5699/include Modified Files: dev.h inode.h sysio-cmn.h sysio.h Log Message: add ifdef _HAVE_STATVFS Index: dev.h =================================================================== RCS file: /cvsroot/libsysio/libsysio/include/dev.h,v retrieving revision 1.11 retrieving revision 1.12 diff -u -w -b -B -p -r1.11 -r1.12 --- dev.h 30 Apr 2007 23:24:12 -0000 1.11 +++ dev.h 9 May 2007 23:16:20 -0000 1.12 @@ -136,10 +136,12 @@ extern const struct inode_ops _sysio_nod (int (*)(struct pnode *, \ mode_t, \ dev_t))_sysio_do_illop +#ifdef _HAVE_STATVFS #define _sysio_nodev_inop_statvfs \ (int (*)(struct pnode *, \ struct inode *, \ struct intnl_statvfs *))_sysio_do_illop +#endif #define _sysio_nodev_inop_gone \ (void (*)(struct inode *ino))_sysio_do_noop Index: inode.h =================================================================== RCS file: /cvsroot/libsysio/libsysio/include/inode.h,v retrieving revision 1.30 retrieving revision 1.31 diff -u -w -b -B -p -r1.30 -r1.31 --- inode.h 1 May 2007 16:33:52 -0000 1.30 +++ inode.h 9 May 2007 23:16:20 -0000 1.31 @@ -63,7 +63,9 @@ struct inode; struct intent; struct intnl_dirent; struct intnl_stat; +#ifdef _HAVE_STATVFS struct intnl_statvfs; +#endif struct io_arguments; struct ioctx; @@ -106,9 +108,11 @@ struct inode_ops { int (*inop_datasync)(struct inode *ino); int (*inop_ioctl)(struct inode *ino, unsigned long int request, va_list ap); int (*inop_mknod)(struct pnode *pno, mode_t mode, dev_t dev); +#ifdef _HAVE_STATVFS int (*inop_statvfs)(struct pnode *pno, struct inode *ino, struct intnl_statvfs *buf); +#endif void (*inop_gone)(struct inode *ino); }; @@ -339,8 +343,10 @@ struct pnode { _PNOP_CALL((_pno), ioctl, (_pno)->p_base->pb_ino, (_request), (_ap)) #define PNOP_MKNOD(_pno, _mode, _dev) \ _PNOP_MKCALL((_pno), mknod, (_pno), (_mode), (_dev)) +#ifdef _HAVE_STATVFS #define PNOP_STATVFS(_pno, _buf) \ _PNOP_CALL((_pno), statvfs, (_pno), (_pno)->p_base->pb_ino, (_buf)) +#endif #define PNOP_GONE(_pno) \ _PNOP_CALL((_pno), gone, (_pno)->p_base->pb_ino) Index: sysio-cmn.h =================================================================== RCS file: /cvsroot/libsysio/libsysio/include/sysio-cmn.h,v retrieving revision 1.15 retrieving revision 1.16 diff -u -w -b -B -p -r1.15 -r1.16 --- sysio-cmn.h 1 May 2007 16:33:52 -0000 1.15 +++ sysio-cmn.h 9 May 2007 23:16:20 -0000 1.16 @@ -191,10 +191,12 @@ typedef enum { _SYSIO_TTAG(rmdir), _SYSIO_TTAG(xstatnd), _SYSIO_TTAG(fxstat), +#ifdef _HAVE_STATVFS _SYSIO_TTAG(statvfs64), _SYSIO_TTAG(fstatvfs64), _SYSIO_TTAG(statvfs), _SYSIO_TTAG(fstatvfs), +#endif _SYSIO_TTAG(opendir), _SYSIO_TTAG(closedir), _SYSIO_TTAG(symlink), Index: sysio.h =================================================================== RCS file: /cvsroot/libsysio/libsysio/include/sysio.h,v retrieving revision 1.41 retrieving revision 1.42 diff -u -w -b -B -p -r1.41 -r1.42 --- sysio.h 1 May 2007 16:33:52 -0000 1.41 +++ sysio.h 9 May 2007 23:16:20 -0000 1.42 @@ -94,17 +94,19 @@ struct dirent; #endif struct stat; +#ifdef _HAVE_STATVFS #ifdef _LARGEFILE64_SOURCE #define intnl_statvfs statvfs64 #else #define intnl_statvfs statvfs #endif struct statvfs; +struct intnl_statvfs; +#endif struct utimbuf; struct intnl_stat; -struct intnl_statvfs; struct pnode; @@ -226,6 +228,7 @@ extern ssize_t SYSIO_INTERFACE_NAME(pwri extern ssize_t SYSIO_INTERFACE_NAME(writev)(int fd, const struct iovec *iov, int count); +#ifdef _HAVE_STATVFS extern int SYSIO_INTERFACE_NAME(statvfs)(const char *path, struct statvfs *buf); #ifdef _LARGEFILE64_SOURCE extern int SYSIO_INTERFACE_NAME(statvfs64)(const char *path, @@ -235,6 +238,7 @@ extern int SYSIO_INTERFACE_NAME(fstatvfs #ifdef _LARGEFILE64_SOURCE extern int SYSIO_INTERFACE_NAME(fstatvfs64)(int fd, struct statvfs64 *buf); #endif +#endif extern int SYSIO_INTERFACE_NAME(truncate)(const char *path, off_t length); #ifdef _LARGEFILE64_SOURCE extern int SYSIO_INTERFACE_NAME(truncate64)(const char *path, off64_t length); |
From: Ruth K. <rk...@us...> - 2007-05-09 23:16:25
|
Update of /cvsroot/libsysio/libsysio/drivers/incore In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv5699/drivers/incore Modified Files: fs_incore.c Log Message: add ifdef _HAVE_STATVFS Index: fs_incore.c =================================================================== RCS file: /cvsroot/libsysio/libsysio/drivers/incore/fs_incore.c,v retrieving revision 1.31 retrieving revision 1.32 diff -u -w -b -B -p -r1.31 -r1.32 --- fs_incore.c 1 May 2007 15:30:52 -0000 1.31 +++ fs_incore.c 9 May 2007 23:16:20 -0000 1.32 @@ -152,9 +152,11 @@ static int _sysio_incore_filop_ioctl(str unsigned long int request, va_list ap); static int _sysio_incore_dirop_mknod(struct pnode *pno, mode_t mode, dev_t dev); +#ifdef _HAVE_STATVFS static int _sysio_incore_inop_statvfs(struct pnode *pno, struct inode *ino, struct intnl_statvfs *buf); +#endif static void _sysio_incore_inop_gone(struct inode *ino); #define _sysio_incore_dirop_symlink \ @@ -202,7 +204,9 @@ static struct inode_ops _sysio_incore_di _sysio_incore_inop_sync, _sysio_incore_dirop_ioctl, _sysio_incore_dirop_mknod, +#ifdef _HAVE_STATVFS _sysio_incore_inop_statvfs, +#endif _sysio_incore_inop_gone }; @@ -255,7 +259,9 @@ static struct inode_ops _sysio_incore_fi _sysio_incore_inop_sync, _sysio_incore_filop_ioctl, _sysio_incore_filop_mknod, +#ifdef _HAVE_STATVFS _sysio_incore_inop_statvfs, +#endif _sysio_incore_inop_gone }; @@ -282,7 +288,9 @@ static struct inode_ops _sysio_incore_de _sysio_nodev_inop_sync, _sysio_nodev_inop_ioctl, _sysio_incore_filop_mknod, +#ifdef _HAVE_STATVFS _sysio_incore_inop_statvfs, +#endif _sysio_incore_inop_gone }; @@ -1687,6 +1695,7 @@ _sysio_incore_dirop_mknod(struct pnode * return incore_create(pno, &stat); } +#ifdef _HAVE_STATVFS static int _sysio_incore_inop_statvfs(struct pnode *pno, struct inode *ino __IS_UNUSED, @@ -1718,6 +1727,7 @@ _sysio_incore_inop_statvfs(struct pnode return 0; } +#endif void _sysio_incore_inop_gone(struct inode *ino) |
From: Ruth K. <rk...@us...> - 2007-05-09 23:16:25
|
Update of /cvsroot/libsysio/libsysio/src In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv5699/src Modified Files: dev.c init.c statvfs.c Log Message: add ifdef _HAVE_STATVFS Index: dev.c =================================================================== RCS file: /cvsroot/libsysio/libsysio/src/dev.c,v retrieving revision 1.11 retrieving revision 1.12 diff -u -w -b -B -p -r1.11 -r1.12 --- dev.c 30 Apr 2007 23:24:13 -0000 1.11 +++ dev.c 9 May 2007 23:16:20 -0000 1.12 @@ -75,7 +75,9 @@ const struct inode_ops _sysio_nodev_ops _sysio_nodev_inop_datasync, _sysio_nodev_inop_ioctl, _sysio_nodev_inop_mknod, +#ifdef _HAVE_STATVFS _sysio_nodev_inop_statvfs, +#endif _sysio_nodev_inop_gone }; Index: init.c =================================================================== RCS file: /cvsroot/libsysio/libsysio/src/init.c,v retrieving revision 1.33 retrieving revision 1.34 diff -u -w -b -B -p -r1.33 -r1.34 --- init.c 1 May 2007 16:33:53 -0000 1.33 +++ init.c 9 May 2007 23:16:20 -0000 1.34 @@ -228,7 +227,6 @@ _sysio_shutdown() _sysio_remove_trace(&_sysio_exit_trace_head, tcb); } #endif -#endif } #ifdef SYSIO_TRACING @@ -326,7 +324,7 @@ _sysio_register_trace(void *q, const char *func, int line, void *data, - int tag, + tracing_tag tag, va_list ap), void *data, void (*destructor)(void *data)) Index: statvfs.c =================================================================== RCS file: /cvsroot/libsysio/libsysio/src/statvfs.c,v retrieving revision 1.15 retrieving revision 1.16 diff -u -w -b -B -p -r1.15 -r1.16 --- statvfs.c 1 May 2007 14:46:49 -0000 1.15 +++ statvfs.c 9 May 2007 23:16:20 -0000 1.16 @@ -56,6 +56,7 @@ #include "sysio-symbols.h" +#ifdef _HAVE_STATVFS static int _sysio_statvfs(const char *path, struct intnl_statvfs *buf) { @@ -198,3 +199,4 @@ SYSIO_INTERFACE_NAME(fstatvfs)(int fd, s sysio_sym_weak_alias(SYSIO_INTERFACE_NAME(fstatvfs), PREPEND(__, SYSIO_INTERFACE_NAME(fstatvfs))) #endif +#endif |
From: Ruth K. <rk...@us...> - 2007-05-09 23:16:25
|
Update of /cvsroot/libsysio/libsysio/drivers/native In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv5699/drivers/native Modified Files: fs_native.c Log Message: add ifdef _HAVE_STATVFS Index: fs_native.c =================================================================== RCS file: /cvsroot/libsysio/libsysio/drivers/native/fs_native.c,v retrieving revision 1.62 retrieving revision 1.63 diff -u -w -b -B -p -r1.62 -r1.63 --- fs_native.c 1 May 2007 17:27:34 -0000 1.62 +++ fs_native.c 9 May 2007 23:16:20 -0000 1.63 @@ -62,7 +62,9 @@ #include <sys/stat.h> #include <sys/fcntl.h> #include <sys/statfs.h> +#ifdef _HAVE_STATVFS #include <sys/statvfs.h> +#endif #include <utime.h> #include <sys/uio.h> #include <sys/queue.h> @@ -192,9 +194,11 @@ static int native_inop_ioctl(struct inod unsigned long int request, va_list ap); static int native_inop_mknod(struct pnode *pno, mode_t mode, dev_t dev); +#ifdef _HAVE_STATVFS static int native_inop_statvfs(struct pnode *pno, struct inode *ino, struct intnl_statvfs *buf); +#endif static void native_inop_gone(struct inode *ino); static struct inode_ops native_i_ops = { @@ -220,7 +224,9 @@ static struct inode_ops native_i_ops = { native_inop_datasync, native_inop_ioctl, native_inop_mknod, +#ifdef _HAVE_STATVFS native_inop_statvfs, +#endif native_inop_gone }; @@ -1656,6 +1662,7 @@ native_inop_mknod(struct pnode *pno __IS return -ENOSYS; } +#ifdef _HAVE_STATVFS static int native_inop_statvfs(struct pnode *pno, struct inode *ino, @@ -1703,6 +1710,7 @@ native_inop_statvfs(struct pnode *pno, buf->f_namemax = fs.f_namelen; return 0; } +#endif static int native_inop_sync(struct inode *ino) |
From: Lee W. <lw...@us...> - 2007-05-01 17:28:44
|
Update of /cvsroot/libsysio/libsysio/include In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv16824 Modified Files: module.mk Log Message: Bob Glossman at Cray noticed that we have sysio-cmn.h twice. Fixed. Index: module.mk =================================================================== RCS file: /cvsroot/libsysio/libsysio/include/module.mk,v retrieving revision 1.6 retrieving revision 1.7 diff -u -w -b -B -p -r1.6 -r1.7 --- module.mk 6 Jun 2005 16:57:24 -0000 1.6 +++ module.mk 1 May 2007 17:28:42 -0000 1.7 @@ -1,5 +1,5 @@ INCLUDE_EXTRA = include/dev.h include/file.h include/fs.h \ - include/inode.h include/mount.h include/sysio.h include/sysio-cmn.h \ + include/inode.h include/mount.h include/sysio.h \ include/sysio-cmn.h include/sysio-symbols.h include/cplant-yod.h \ include/module.mk include/xtio.h include/stddir.h \ include/native.h |
From: Lee W. <lw...@us...> - 2007-05-01 17:27:38
|
Update of /cvsroot/libsysio/libsysio/drivers/native In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv15499 Modified Files: fs_native.c Log Message: >From Bob Glossman at Cray; Modified so as not to capture/reset umask on Red Storm. It's done in cstart on that machine. Index: fs_native.c =================================================================== RCS file: /cvsroot/libsysio/libsysio/drivers/native/fs_native.c,v retrieving revision 1.61 retrieving revision 1.62 diff -u -w -b -B -p -r1.61 -r1.62 --- fs_native.c 1 May 2007 16:33:52 -0000 1.61 +++ fs_native.c 1 May 2007 17:27:34 -0000 1.62 @@ -348,7 +348,13 @@ _sysio_native_init() * zero. All permission bits to open/creat/setattr are absolute -- * They've already had a umask applied, when appropriate. */ +#ifndef REDSTORM + /* + * This is done is cstart on Red Storm. Saves a syscall from + * every node... + */ _sysio_umask = syscall(SYSIO_SYS_umask, 0); +#endif return _sysio_fssw_register("native", &native_fssw_ops); } |
From: Lee W. <lw...@us...> - 2007-05-01 16:34:00
|
Update of /cvsroot/libsysio/libsysio/drivers/native In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv24463/drivers/native Modified Files: fs_native.c Log Message: The `C' preprocessor tests now look for definition of a symbol rather than a value. This enables some builds I'm told. Index: fs_native.c =================================================================== RCS file: /cvsroot/libsysio/libsysio/drivers/native/fs_native.c,v retrieving revision 1.60 retrieving revision 1.61 diff -u -w -b -B -p -r1.60 -r1.61 --- fs_native.c 30 Apr 2007 23:24:12 -0000 1.60 +++ fs_native.c 1 May 2007 16:33:52 -0000 1.61 @@ -80,13 +80,12 @@ #include <sys/uio.h> #endif +#undef DIR_CVT_64 #if defined(SYSIO_SYS_getdirentries) -#define DIR_CVT_64 0 #elif defined(SYSIO_SYS_getdents64) -#define DIR_CVT_64 0 #elif defined(SYSIO_SYS_getdents) #if defined(_LARGEFILE64_SOURCE) -#define DIR_CVT_64 1 +#define DIR_CVT_64 /* * Kernel version of directory entry. */ @@ -97,8 +96,6 @@ struct linux_dirent { char ld_name[1]; }; #include <dirent.h> -#else /* !defined(_LARGEFILE64_SOURCE) */ -#define DIR_CVT_64 0 #endif /* defined(_LARGEFILE64_SOURCE) */ #else /* catch-none */ #error No usable directory fill entries interface available @@ -917,7 +914,7 @@ native_pos(int fd, _SYSIO_OFF_T *offset, assert(*offset >= 0); off = *offset; -#if _LARGEFILE64_SOURCE && defined(SYSIO_SYS__llseek) +#if defined(_LARGEFILE64_SOURCE) && defined(SYSIO_SYS__llseek) { int err; err = @@ -1011,7 +1008,7 @@ native_filldirentries(struct inode *ino, size_t nbytes) { struct native_inode *nino = I2NI(ino); -#if DIR_CVT_64 +#ifdef DIR_CVT_64 char *bp; size_t count; struct linux_dirent *ldp; @@ -1026,7 +1023,7 @@ native_filldirentries(struct inode *ino, assert(nino->ni_fd >= 0); -#if DIR_CVT_64 +#ifdef DIR_CVT_64 count = nbytes; while (!(bp = malloc(count))) { count /= 2; @@ -1036,12 +1033,12 @@ native_filldirentries(struct inode *ino, #endif cc = native_ifilldirentries(nino, posp, bp, count); if (cc < 0) { -#if DIR_CVT_64 +#ifdef DIR_CVT_64 free(bp); #endif return cc; } -#if DIR_CVT_64 +#ifdef DIR_CVT_64 ldp = (struct linux_dirent *)bp; d64p = (struct dirent64 *)buf; while (cc) { |
From: Lee W. <lw...@us...> - 2007-05-01 16:34:00
|
Update of /cvsroot/libsysio/libsysio/src In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv24463/src Modified Files: chdir.c fcntl.c file.c file_hack.c fs.c getdirentries.c init.c inode.c lseek.c mount.c namei.c rw.c stat.c truncate.c Log Message: The `C' preprocessor tests now look for definition of a symbol rather than a value. This enables some builds I'm told. Index: chdir.c =================================================================== RCS file: /cvsroot/libsysio/libsysio/src/chdir.c,v retrieving revision 1.28 retrieving revision 1.29 diff -u -w -b -B -p -r1.28 -r1.29 --- chdir.c 30 Apr 2007 16:52:20 -0000 1.28 +++ chdir.c 1 May 2007 16:33:53 -0000 1.29 @@ -79,7 +79,7 @@ #include "file.h" #include "sysio-symbols.h" -#if DEFER_INIT_CWD +#ifdef DEFER_INIT_CWD const char *_sysio_init_cwd = NULL; #endif @@ -244,7 +244,7 @@ SYSIO_INTERFACE_NAME(getcwd)(char *buf, SYSIO_INTERFACE_DISPLAY_BLOCK; SYSIO_INTERFACE_ENTER(getcwd, buf, size); -#if DEFER_INIT_CWD +#ifdef DEFER_INIT_CWD if (!_sysio_cwd) { struct pnode *pno; Index: fcntl.c =================================================================== RCS file: /cvsroot/libsysio/libsysio/src/fcntl.c,v retrieving revision 1.28 retrieving revision 1.29 diff -u -w -b -B -p -r1.28 -r1.29 --- fcntl.c 1 May 2007 15:57:36 -0000 1.28 +++ fcntl.c 1 May 2007 16:33:53 -0000 1.29 @@ -194,7 +194,8 @@ _sysio_vfcntl(int fd, int cmd, va_list a } } break; -#if !(defined(_LARGEFILE64_SOURCE) && F_GETLK64 == F_GETLK) +#if !(defined(_LARGEFILE64_SOURCE) && defined(F_GETLK64) && \ + F_GETLK64 == F_GETLK) case F_GETLK: case F_SETLK: case F_SETLKW: Index: file.c =================================================================== RCS file: /cvsroot/libsysio/libsysio/src/file.c,v retrieving revision 1.21 retrieving revision 1.22 diff -u -w -b -B -p -r1.21 -r1.22 --- file.c 30 Apr 2007 16:52:20 -0000 1.21 +++ file.c 1 May 2007 16:33:53 -0000 1.22 @@ -149,7 +149,7 @@ fd_grow(size_t n) return 0; } -#if ZERO_SUM_MEMORY +#ifdef ZERO_SUM_MEMORY void _sysio_fd_shutdown() { Index: file_hack.c =================================================================== RCS file: /cvsroot/libsysio/libsysio/src/file_hack.c,v retrieving revision 1.11 retrieving revision 1.12 diff -u -w -b -B -p -r1.11 -r1.12 --- file_hack.c 30 Apr 2007 16:52:20 -0000 1.11 +++ file_hack.c 1 May 2007 16:33:53 -0000 1.12 @@ -188,7 +188,7 @@ fd_grow(oftab_t *oftab, size_t n) return 0; } -#if ZERO_SUM_MEMORY +#ifdef ZERO_SUM_MEMORY static void free_oftab(oftab_t *ot) { if (ot->table) { Index: fs.c =================================================================== RCS file: /cvsroot/libsysio/libsysio/src/fs.c,v retrieving revision 1.14 retrieving revision 1.15 diff -u -w -b -B -p -r1.14 -r1.15 --- fs.c 21 Sep 2004 16:18:30 -0000 1.14 +++ fs.c 1 May 2007 16:33:53 -0000 1.15 @@ -106,7 +106,7 @@ _sysio_fssw_register(const char *name, s return 0; } -#if ZERO_SUM_MEMORY +#ifdef ZERO_SUM_MEMORY /* * Shutdown */ Index: getdirentries.c =================================================================== RCS file: /cvsroot/libsysio/libsysio/src/getdirentries.c,v retrieving revision 1.23 retrieving revision 1.24 diff -u -w -b -B -p -r1.23 -r1.24 --- getdirentries.c 30 Apr 2007 16:52:20 -0000 1.23 +++ getdirentries.c 1 May 2007 16:33:53 -0000 1.24 @@ -104,7 +104,7 @@ PREPEND(_, SYSIO_INTERFACE_NAME(getdiren getdirentries64, buf, basep); } -#if _LARGEFILE64_SOURCE +#ifdef _LARGEFILE64_SOURCE #undef getdirentries64 sysio_sym_strong_alias(PREPEND(_, SYSIO_INTERFACE_NAME(getdirentries64)), SYSIO_INTERFACE_NAME(getdirentries64)) Index: init.c =================================================================== RCS file: /cvsroot/libsysio/libsysio/src/init.c,v retrieving revision 1.32 retrieving revision 1.33 diff -u -w -b -B -p -r1.32 -r1.33 --- init.c 30 Apr 2007 16:52:20 -0000 1.32 +++ init.c 1 May 2007 16:33:53 -0000 1.33 @@ -45,7 +45,7 @@ #define _BSD_SOURCE #endif -#if SYSIO_TRACING +#ifdef SYSIO_TRACING #include <stdio.h> #endif #include <stdlib.h> @@ -55,7 +55,7 @@ #include <unistd.h> #include <string.h> #include <errno.h> -#if SYSIO_TRACING +#ifdef SYSIO_TRACING #include <stdarg.h> #endif #include <limits.h> @@ -68,7 +68,7 @@ #include "sysio.h" #include "xtio.h" -#if SYSIO_TRACING +#ifdef SYSIO_TRACING #include "native.h" #endif #include "inode.h" @@ -81,7 +81,7 @@ #include "stdfd.h" #endif -#if SYSIO_TRACING +#ifdef SYSIO_TRACING /* * Tracing callback record. @@ -156,7 +156,7 @@ _sysio_init() extern int _sysio_sockets_init(void); #endif -#if SYSIO_TRACING +#ifdef SYSIO_TRACING /* * Initialize tracing callback queues. */ @@ -210,12 +210,12 @@ _sysio_shutdown() _sysio_unmount_all() == 0)) abort(); -#if ZERO_SUM_MEMORY +#ifdef ZERO_SUM_MEMORY _sysio_fd_shutdown(); _sysio_i_shutdown(); _sysio_fssw_shutdown(); _sysio_access_shutdown(); -#if SYSIO_TRACING +#ifdef SYSIO_TRACING { struct trace_callback *tcb; @@ -231,7 +231,7 @@ _sysio_shutdown() #endif } -#if SYSIO_TRACING +#ifdef SYSIO_TRACING #if !(defined(_HAVE_ASPRINTF) && _HAVE_ASPRINTF) /* @@ -927,7 +927,7 @@ do_command(char *buf) return -EINVAL; } -#if SYSIO_TRACING +#ifdef SYSIO_TRACING /* * Set/Unset tracing. */ @@ -1039,7 +1039,7 @@ _sysio_boot_namespace(const char *arg) if (err) break; } -#if SYSIO_TRACING +#ifdef SYSIO_TRACING if (err) _sysio_cprintf("+NS init+ failed at expr %u (last = %s): %s\n", count, @@ -1050,7 +1050,7 @@ _sysio_boot_namespace(const char *arg) return err; } -#if DEFER_INIT_CWD +#ifdef DEFER_INIT_CWD /* * Set deferred initial working directory. */ @@ -1070,11 +1070,11 @@ int _sysio_boot(const char *opt, const char *arg) { struct option_value_info vec[] = { -#if SYSIO_TRACING +#ifdef SYSIO_TRACING { "trace", NULL }, /* tracing? */ #endif { "namespace", NULL }, /* init namespace? */ -#if DEFER_INIT_CWD +#ifdef DEFER_INIT_CWD { "cwd", NULL }, /* init working dir */ #endif { NULL, NULL } @@ -1082,11 +1082,11 @@ _sysio_boot(const char *opt, const char struct option_value_info *v; unsigned u; static int (*f[])(const char *) = { -#if SYSIO_TRACING +#ifdef SYSIO_TRACING _sysio_boot_tracing, #endif _sysio_boot_namespace, -#if DEFER_INIT_CWD +#ifdef DEFER_INIT_CWD _sysio_boot_cwd, #endif NULL /* can't happen */ Index: inode.c =================================================================== RCS file: /cvsroot/libsysio/libsysio/src/inode.c,v retrieving revision 1.26 retrieving revision 1.27 diff -u -w -b -B -p -r1.26 -r1.27 --- inode.c 30 Apr 2007 16:52:20 -0000 1.26 +++ inode.c 1 May 2007 16:33:53 -0000 1.27 @@ -101,7 +101,7 @@ static size_t max_names = (2 * NAMES_TAB */ #define PNODES_PER_CHUNK ((8 * 1024) / sizeof(struct pnode) - 2) -#if ZERO_SUM_MEMORY +#ifdef ZERO_SUM_MEMORY /* * Allocation information for pnodes bulk allocation. */ @@ -142,7 +142,7 @@ _sysio_i_init() for (i = 0; i < NAMES_TABLE_LEN; i++) LIST_INIT(&names[i]); -#if ZERO_SUM_MEMORY +#ifdef ZERO_SUM_MEMORY LIST_INIT(&pnblocks); #endif TAILQ_INIT(&_sysio_pnodes); @@ -477,12 +477,12 @@ static void more_pnodes() { size_t n; -#if ZERO_SUM_MEMORY +#ifdef ZERO_SUM_MEMORY struct pnodes_block *pnblk; #endif struct pnode *pno; -#if ZERO_SUM_MEMORY +#ifdef ZERO_SUM_MEMORY pnblk = malloc(sizeof(struct pnodes_block)); pno = NULL; if (pnblk) { @@ -501,7 +501,7 @@ more_pnodes() } while (--n); } -#if ZERO_SUM_MEMORY +#ifdef ZERO_SUM_MEMORY /* * Shutdown */ Index: lseek.c =================================================================== RCS file: /cvsroot/libsysio/libsysio/src/lseek.c,v retrieving revision 1.28 retrieving revision 1.29 diff -u -w -b -B -p -r1.28 -r1.29 --- lseek.c 30 Apr 2007 16:52:20 -0000 1.28 +++ lseek.c 1 May 2007 16:33:53 -0000 1.29 @@ -118,7 +118,7 @@ _sysio_lseek(struct file *fil, return pos; } -#if _LARGEFILE64_SOURCE +#ifdef _LARGEFILE64_SOURCE #undef lseek64 extern off64_t @@ -202,7 +202,7 @@ SYSIO_INTERFACE_NAME(llseek)(unsigned in fil = _sysio_fd_find(fd); if (!fil) SYSIO_INTERFACE_RETURN(-1, -EBADF, llseek, NULL); -#if !_LARGEFILE64_SOURCE +#ifndef _LARGEFILE64_SOURCE if (offset_high) { /* * We are using 32-bit internals. This just isn't Index: mount.c =================================================================== RCS file: /cvsroot/libsysio/libsysio/src/mount.c,v retrieving revision 1.22 retrieving revision 1.23 diff -u -w -b -B -p -r1.22 -r1.23 --- mount.c 30 Apr 2007 16:52:20 -0000 1.22 +++ mount.c 1 May 2007 16:33:53 -0000 1.23 @@ -276,7 +276,7 @@ _sysio_mount_root(const char *source, return err; _sysio_root = mnt->mnt_root; -#if !DEFER_INIT_CWD +#ifndef DEFER_INIT_CWD /* * It is very annoying to have to set the current working directory. * So... If it isn't set, make it the root now. Index: namei.c =================================================================== RCS file: /cvsroot/libsysio/libsysio/src/namei.c,v retrieving revision 1.25 retrieving revision 1.26 diff -u -w -b -B -p -r1.25 -r1.26 --- namei.c 30 Apr 2007 16:52:20 -0000 1.25 +++ namei.c 1 May 2007 16:33:53 -0000 1.26 @@ -191,7 +191,7 @@ _sysio_path_walk(struct pnode *parent, s parent = nd->nd_root; } -#if DEFER_INIT_CWD +#ifdef DEFER_INIT_CWD if (!parent) { const char *icwd; Index: rw.c =================================================================== RCS file: /cvsroot/libsysio/libsysio/src/rw.c,v retrieving revision 1.20 retrieving revision 1.21 diff -u -w -b -B -p -r1.20 -r1.21 --- rw.c 1 May 2007 15:53:05 -0000 1.20 +++ rw.c 1 May 2007 16:33:53 -0000 1.21 @@ -240,7 +240,7 @@ _sysio_iiox(int writing, */ cc = _sysio_validx(xtv, xtv_count, iov, iov_count, -#if _LARGEFILE64_SOURCE && defined(O_LARGEFILE) +#if defined(_LARGEFILE64_SOURCE) && defined(O_LARGEFILE) (fil->f_flags & O_LARGEFILE) ? LONG_MAX : @@ -396,13 +396,13 @@ _do_iiox(int fd, const struct iovec *iov, size_t iov_count, const struct xtvec *xtv, size_t xtv_count) { -#if _LARGEFILE64_SOURCE +#ifdef _LARGEFILE64_SOURCE struct intnl_xtvec *myixtv, *ixtv; size_t n; #endif ioid_t ioid; -#if _LARGEFILE64_SOURCE +#ifdef _LARGEFILE64_SOURCE myixtv = malloc(xtv_count * sizeof(struct intnl_xtvec)); if (myixtv == NULL) return IOID_FAIL; @@ -416,7 +416,7 @@ _do_iiox(int fd, iov, iov_count, NULL, myixtv, xtv_count, free_arg, NULL); -#if _LARGEFILE64_SOURCE +#ifdef _LARGEFILE64_SOURCE if (ioid == IOID_FAIL) free(myixtv); #endif @@ -441,7 +441,7 @@ SYSIO_INTERFACE_NAME(iwritex)(int fd, return _do_iiox(fd, _do_iwritex, iov, iov_count, xtv, xtv_count); } -#if _LARGEFILE64_SOURCE +#ifdef _LARGEFILE64_SOURCE /* * Perform 64-bit extended IO. */ @@ -592,7 +592,7 @@ _do_ipiov(int fd, return ioid; } -#if _LARGEFILE64_SOURCE +#ifdef _LARGEFILE64_SOURCE ioid_t SYSIO_INTERFACE_NAME(ipread64v)(int fd, const struct iovec *iov, size_t count, @@ -652,7 +652,7 @@ _do_piov(int fd, return SYSIO_INTERFACE_NAME(iowait)(ioid); } -#if _LARGEFILE64_SOURCE +#ifdef _LARGEFILE64_SOURCE ssize_t SYSIO_INTERFACE_NAME(pread64v)(int fd, const struct iovec *iov, size_t count, @@ -718,7 +718,7 @@ _do_ipio(int fd, return ioid; } -#if _LARGEFILE64_SOURCE +#ifdef _LARGEFILE64_SOURCE ioid_t SYSIO_INTERFACE_NAME(ipread64)(int fd, void *buf, size_t count, @@ -778,7 +778,7 @@ _do_pio(int fd, return SYSIO_INTERFACE_NAME(iowait)(ioid); } -#if _LARGEFILE64_SOURCE +#ifdef _LARGEFILE64_SOURCE ssize_t SYSIO_INTERFACE_NAME(pread64)(int fd, void *buf, size_t count, off64_t offset) { Index: stat.c =================================================================== RCS file: /cvsroot/libsysio/libsysio/src/stat.c,v retrieving revision 1.18 retrieving revision 1.19 diff -u -w -b -B -p -r1.18 -r1.19 --- stat.c 30 Apr 2007 16:52:20 -0000 1.18 +++ stat.c 1 May 2007 16:33:53 -0000 1.19 @@ -121,7 +121,7 @@ out: SYSIO_INTERFACE_RETURN(err ? -1 : 0, err, xstatnd, stat_buf); } -#if _LARGEFILE64_SOURCE +#ifdef _LARGEFILE64_SOURCE #ifndef REDSTORM #undef fstat64 @@ -200,7 +200,7 @@ SYSIO_INTERFACE_NAME(lstat64)(const char #undef __xstat #undef __lxstat -#if _LARGEFILE64_SOURCE +#ifdef _LARGEFILE64_SOURCE static void convstat(struct stat64 *st64_buf, struct stat *st_buf) { @@ -228,17 +228,17 @@ PREPEND(__, SYSIO_INTERFACE_NAME(fxstat) { struct intnl_stat *buf; int err; -#if _LARGEFILE64_SOURCE +#ifdef _LARGEFILE64_SOURCE struct stat64 st64; #endif -#if _LARGEFILE64_SOURCE +#ifdef _LARGEFILE64_SOURCE buf = &st64; #else buf = __stat_buf; #endif err = _sysio_fxstat(__ver, __fildes, buf); -#if _LARGEFILE64_SOURCE +#ifdef _LARGEFILE64_SOURCE if (!err) convstat(buf, __stat_buf); #endif @@ -278,17 +278,17 @@ PREPEND(__, SYSIO_INTERFACE_NAME(xstat)) { struct intnl_stat *buf; int err; -#if _LARGEFILE64_SOURCE +#ifdef _LARGEFILE64_SOURCE struct stat64 st64; #endif -#if _LARGEFILE64_SOURCE +#ifdef _LARGEFILE64_SOURCE buf = &st64; #else buf = __stat_buf; #endif err = _sysio_xstatnd(__ver, __filename, buf, 0); -#if _LARGEFILE64_SOURCE +#ifdef _LARGEFILE64_SOURCE if (!err) convstat(buf, __stat_buf); #endif @@ -329,17 +329,17 @@ PREPEND(__, SYSIO_INTERFACE_NAME(lxstat) { struct intnl_stat *buf; int err; -#if _LARGEFILE64_SOURCE +#ifdef _LARGEFILE64_SOURCE struct stat64 st64; #endif -#if _LARGEFILE64_SOURCE +#ifdef _LARGEFILE64_SOURCE buf = &st64; #else buf = __stat_buf; #endif err = _sysio_xstatnd(__ver, __filename, buf, ND_NOFOLLOW); -#if _LARGEFILE64_SOURCE +#ifdef _LARGEFILE64_SOURCE if (!err) convstat(buf, __stat_buf); #endif Index: truncate.c =================================================================== RCS file: /cvsroot/libsysio/libsysio/src/truncate.c,v retrieving revision 1.16 retrieving revision 1.17 diff -u -w -b -B -p -r1.16 -r1.17 --- truncate.c 30 Apr 2007 16:52:20 -0000 1.16 +++ truncate.c 1 May 2007 16:33:53 -0000 1.17 @@ -102,7 +102,7 @@ out: SYSIO_INTERFACE_RETURN(err ? -1 : 0, err, truncate, 0); } -#if _LARGEFILE64_SOURCE +#ifdef _LARGEFILE64_SOURCE #undef truncate64 sysio_sym_weak_alias(PREPEND(_, SYSIO_INTERFACE_NAME(truncate)), SYSIO_INTERFACE_NAME(truncate64)) @@ -139,7 +139,7 @@ out: SYSIO_INTERFACE_RETURN(err ? -1 : 0, err, ftruncate, 0); } -#if _LARGEFILE64_SOURCE +#ifdef _LARGEFILE64_SOURCE #undef ftruncate64 sysio_sym_weak_alias(PREPEND(_, SYSIO_INTERFACE_NAME(ftruncate)), SYSIO_INTERFACE_NAME(ftruncate64)) |
From: Lee W. <lw...@us...> - 2007-05-01 16:34:00
|
Update of /cvsroot/libsysio/libsysio/include In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv24463/include Modified Files: file.h fs.h inode.h native.h sysio-cmn.h sysio.h xtio.h Log Message: The `C' preprocessor tests now look for definition of a symbol rather than a value. This enables some builds I'm told. Index: file.h =================================================================== RCS file: /cvsroot/libsysio/libsysio/include/file.h,v retrieving revision 1.18 retrieving revision 1.19 diff -u -w -b -B -p -r1.18 -r1.19 --- file.h 30 Apr 2007 16:52:20 -0000 1.18 +++ file.h 1 May 2007 16:33:52 -0000 1.19 @@ -61,7 +61,7 @@ #define _SEEK_MAX(fil) \ (_F_LARGEFILE(fil) ? _SYSIO_OFF_T_MAX : LONG_MAX) -#if _LARGEFILE64_SOURCE +#ifdef _LARGEFILE64_SOURCE #define _SYSIO_FLOCK flock64 #else #define _SYSIO_FLOCK flock @@ -137,7 +137,7 @@ extern struct file *_sysio_fd_find(int f extern int _sysio_fd_set(struct file *fil, int fd, int force); extern int _sysio_fd_dup(int oldfd, int newfd, int force); extern int _sysio_fd_close_all(void); -#if ZERO_SUM_MEMORY +#ifdef ZERO_SUM_MEMORY extern void _sysio_fd_shutdown(void); #endif extern _SYSIO_OFF_T _sysio_lseek_prepare(struct file *fil, Index: fs.h =================================================================== RCS file: /cvsroot/libsysio/libsysio/include/fs.h,v retrieving revision 1.6 retrieving revision 1.7 diff -u -w -b -B -p -r1.6 -r1.7 --- fs.h 30 Apr 2007 23:24:12 -0000 1.6 +++ fs.h 1 May 2007 16:33:52 -0000 1.7 @@ -167,6 +167,6 @@ extern struct filesys * _sysio_fs_new(st unsigned mask, void *private); extern void _sysio_fs_gone(struct filesys *fs); -#if ZERO_SUM_MEMORY +#ifdef ZERO_SUM_MEMORY extern void _sysio_fssw_shutdown(void); #endif Index: inode.h =================================================================== RCS file: /cvsroot/libsysio/libsysio/include/inode.h,v retrieving revision 1.29 retrieving revision 1.30 diff -u -w -b -B -p -r1.29 -r1.30 --- inode.h 30 Apr 2007 23:24:13 -0000 1.29 +++ inode.h 1 May 2007 16:33:52 -0000 1.30 @@ -479,7 +479,7 @@ extern TAILQ_HEAD(inodes_head, inode) _s extern TAILQ_HEAD(pnodes_head, pnode) _sysio_pnodes; extern int _sysio_i_init(void); -#if ZERO_SUM_MEMORY +#ifdef ZERO_SUM_MEMORY extern void _sysio_i_shutdown(void); #endif extern struct inode *_sysio_i_new(struct filesys *fs, Index: native.h =================================================================== RCS file: /cvsroot/libsysio/libsysio/include/native.h,v retrieving revision 1.3 retrieving revision 1.4 diff -u -w -b -B -p -r1.3 -r1.4 --- native.h 30 Apr 2007 23:24:13 -0000 1.3 +++ native.h 1 May 2007 16:33:52 -0000 1.4 @@ -45,7 +45,7 @@ * Native file system support. */ -#if ALPHA_LINUX +#ifdef ALPHA_LINUX /* * stat struct from asm/stat.h, as returned @@ -97,22 +97,22 @@ do { /* * System calls. */ -#if _LARGEFILE64_SOURCE && defined(SYS_lstat64) +#if defined(_LARGEFILE64_SOURCE) && defined(SYS_lstat64) #define SYSIO_SYS_stat SYS_lstat64 #elif defined(SYS_lstat) #define SYSIO_SYS_stat SYS_lstat #endif -#if _LARGEFILE64_SOURCE && defined(SYS_fstat64) +#if defined(_LARGEFILE64_SOURCE) && defined(SYS_fstat64) #define SYSIO_SYS_fstat SYS_fstat64 #elif defined(SYS_fstat) #define SYSIO_SYS_fstat SYS_fstat #endif -#if _LARGEFILE64_SOURCE && defined(SYS_truncate64) +#if defined(_LARGEFILE64_SOURCE) && defined(SYS_truncate64) #define SYSIO_SYS_truncate SYS_truncate64 #elif defined(SYS_truncate) #define SYSIO_SYS_truncate SYS_truncate #endif -#if _LARGEFILE64_SOURCE && defined(SYS_ftruncate64) +#if defined(_LARGEFILE64_SOURCE) && defined(SYS_ftruncate64) #define SYSIO_SYS_ftruncate SYS_ftruncate64 #elif defined(SYS_ftruncate) #define SYSIO_SYS_ftruncate SYS_ftruncate @@ -123,7 +123,7 @@ do { #if defined(SYS_close) #define SYSIO_SYS_close SYS_close #endif -#if _LARGEFILE64_SOURCE && defined(SYS_lseek64) +#if defined(_LARGEFILE64_SOURCE) && defined(SYS_lseek64) #define SYSIO_SYS_lseek SYS_lseek64 #elif defined(SYS_lseek) #define SYSIO_SYS_lseek SYS_lseek @@ -143,17 +143,17 @@ do { #if defined(SYS_writev) #define SYSIO_SYS_writev SYS_writev #endif -#if _LARGEFILE64_SOURCE && defined(SYS_pread64) +#if defined(_LARGEFILE64_SOURCE) && defined(SYS_pread64) #define SYSIO_SYS_pread SYS_pread64 #elif defined(SYS_pread) #define SYSIO_SYS_pread SYS_pread #endif -#if _LARGEFILE64_SOURCE && defined(SYS_pwrite64) +#if defined(_LARGEFILE64_SOURCE) && defined(SYS_pwrite64) #define SYSIO_SYS_pwrite SYS_pwrite64 #elif defined(SYS_pwrite) #define SYSIO_SYS_pwrite SYS_pwrite #endif -#if _LARGEFILE64_SOURCE && defined(SYS_fcntl64) +#if defined(_LARGEFILE64_SOURCE) && defined(SYS_fcntl64) #define SYSIO_SYS_fcntl SYS_fcntl64 #elif defined(SYS_fcntl) #define SYSIO_SYS_fcntl SYS_fcntl @@ -161,7 +161,7 @@ do { #if defined(SYS_fsync) #define SYSIO_SYS_fsync SYS_fsync #endif -#if ALPHA_LINUX && defined(SYS_osf_fdatasync) +#if defined(ALPHA_LINUX) && defined(SYS_osf_fdatasync) #define SYSIO_SYS_fdatasync SYS_osf_fdatasync #elif defined(SYS_fdatasync) #define SYSIO_SYS_fdatasync SYS_fdatasync @@ -188,13 +188,13 @@ do { #define SYSIO_SYS_rmdir SYS_rmdir #endif #if defined(SYS_getdirentries) -#if _LARGEFILE64_SOURCE && defined(SYS_getdirentries64) +#if defined(_LARGEFILE64_SOURCE) && defined(SYS_getdirentries64) #define SYSIO_SYS_getdirentries SYS_getdirentries64 #elif defined(SYS_getdirentries) #define SYSIO_SYS_getdirentries SYS_getdirentries #endif #endif -#if _LARGEFILE64_SOURCE && defined(SYS_getdents64) +#if defined(_LARGEFILE64_SOURCE) && defined(SYS_getdents64) #define SYSIO_SYS_getdents64 SYS_getdents64 #elif defined(SYS_getdents) #define SYSIO_SYS_getdents SYS_getdents @@ -220,7 +220,7 @@ do { #if defined(SYS_utime) #define SYSIO_SYS_utime SYS_utime #endif -#if _LARGEFILE64_SOURCE && defined(SYS_statfs64) +#if defined(_LARGEFILE64_SOURCE) && defined(SYS_statfs64) #define SYSIO_SYS_statfs SYS_statfs64 #define SYSIO_SYS_fstatfs SYS_fstatfs64 #elif defined(SYS_statfs) Index: sysio-cmn.h =================================================================== RCS file: /cvsroot/libsysio/libsysio/include/sysio-cmn.h,v retrieving revision 1.14 retrieving revision 1.15 diff -u -w -b -B -p -r1.14 -r1.15 --- sysio-cmn.h 30 Apr 2007 23:24:13 -0000 1.14 +++ sysio-cmn.h 1 May 2007 16:33:52 -0000 1.15 @@ -51,17 +51,10 @@ #define __IS_UNUSED #endif -#ifndef _LARGEFILE64_SOURCE -/* - * Not glibc I guess. Define this ourselves. - */ -#define _LARGEFILE64_SOURCE 0 -#endif - /* * Define internal file-offset type and it's maximum value. */ -#if _LARGEFILE64_SOURCE +#ifdef _LARGEFILE64_SOURCE #define _SYSIO_OFF_T off64_t #ifdef LLONG_MAX #define _SYSIO_OFF_T_MAX (LLONG_MAX) @@ -80,7 +73,7 @@ * Internally, all file status is carried in the 64-bit capable * structure. */ -#if _LARGEFILE64_SOURCE +#ifdef _LARGEFILE64_SOURCE #define intnl_xtvec xtvec64 #else #define intnl_xtvec xtvec @@ -153,7 +146,7 @@ struct iovec; } while(0) /* Interface enter/leave hook functions */ -#if SYSIO_TRACING +#ifdef SYSIO_TRACING #define _SYSIO_TTAG(name) \ PREPEND(_SYSIO_TRACING_, name) Index: sysio.h =================================================================== RCS file: /cvsroot/libsysio/libsysio/include/sysio.h,v retrieving revision 1.40 retrieving revision 1.41 diff -u -w -b -B -p -r1.40 -r1.41 --- sysio.h 30 Apr 2007 23:24:13 -0000 1.40 +++ sysio.h 1 May 2007 16:33:52 -0000 1.41 @@ -55,9 +55,7 @@ /* * Need directory access routines too. */ -#define _DECLARE_DIR_ACCESS 1 -#else -#define _DECLARE_DIR_ACCESS 0 +#define _DECLARE_DIR_ACCESS #endif #ifndef PATH_SEPARATOR @@ -78,7 +76,7 @@ * Internally, all directory entries are carried in the 64-bit capable * structure. */ -#if _LARGEFILE64_SOURCE +#ifdef _LARGEFILE64_SOURCE #define intnl_dirent dirent64 #else #define intnl_dirent dirent @@ -89,14 +87,14 @@ struct dirent; * Internally, all file status is carried in the 64-bit capable * structure. */ -#if _LARGEFILE64_SOURCE +#ifdef _LARGEFILE64_SOURCE #define intnl_stat stat64 #else #define intnl_stat stat #endif struct stat; -#if _LARGEFILE64_SOURCE +#ifdef _LARGEFILE64_SOURCE #define intnl_statvfs statvfs64 #else #define intnl_statvfs statvfs @@ -110,7 +108,7 @@ struct intnl_statvfs; struct pnode; -#if DEFER_INIT_CWD +#ifdef DEFER_INIT_CWD extern const char *_sysio_init_cwd; #endif @@ -152,7 +150,7 @@ extern char * _sysio_get_args(char *buf, extern time_t _sysio_local_time(void); -#if SYSIO_TRACING +#ifdef SYSIO_TRACING extern void _sysio_cprintf(const char *fmt, ...); #endif @@ -174,14 +172,14 @@ extern int SYSIO_INTERFACE_NAME(dup2)(in extern int SYSIO_INTERFACE_NAME(fcntl)(int fd, int cmd, ...); extern int SYSIO_INTERFACE_NAME(fcntl64)(int fd, int cmd, ...); extern int SYSIO_INTERFACE_NAME(fstat)(int fd, struct stat *buf); -#if _LARGEFILE64_SOURCE +#ifdef _LARGEFILE64_SOURCE extern int SYSIO_INTERFACE_NAME(fstat64)(int fd, struct stat64 *buf); extern int SYSIO_INTERFACE_NAME(lstat64)(const char *path, struct stat64 *buf); #endif extern int SYSIO_INTERFACE_NAME(fsync)(int fd); extern char *SYSIO_INTERFACE_NAME(getcwd)(char *buf, size_t size); extern off_t SYSIO_INTERFACE_NAME(lseek)(int fd, off_t offset, int whence); -#if _LARGEFILE64_SOURCE +#ifdef _LARGEFILE64_SOURCE extern off64_t SYSIO_INTERFACE_NAME(lseek64)(int fd, off64_t offset, int whence); #endif @@ -192,7 +190,7 @@ extern int SYSIO_INTERFACE_NAME(getdiren #else extern ssize_t SYSIO_INTERFACE_NAME(getdirentries)(int fd, char *buf, size_t nbytes, off_t *basep); -#if _LARGEFILE64_SOURCE +#ifdef _LARGEFILE64_SOURCE extern ssize_t SYSIO_INTERFACE_NAME(getdirentries64)(int fd, char *buf, size_t nbytes, @@ -201,15 +199,15 @@ extern ssize_t SYSIO_INTERFACE_NAME(getd #endif extern int SYSIO_INTERFACE_NAME(mkdir)(const char *path, mode_t mode); extern int SYSIO_INTERFACE_NAME(open)(const char *path, int flag, ...); -#if _LARGEFILE64_SOURCE +#ifdef _LARGEFILE64_SOURCE extern int SYSIO_INTERFACE_NAME(open64)(const char *path, int flag, ...); #endif extern int SYSIO_INTERFACE_NAME(creat)(const char *path, mode_t mode); -#if _LARGEFILE64_SOURCE +#ifdef _LARGEFILE64_SOURCE extern int SYSIO_INTERFACE_NAME(creat64)(const char *path, mode_t mode); #endif extern int SYSIO_INTERFACE_NAME(stat)(const char *path, struct stat *buf); -#if _LARGEFILE64_SOURCE +#ifdef _LARGEFILE64_SOURCE extern int SYSIO_INTERFACE_NAME(stat64)(const char *path, struct stat64 *buf); #endif extern ssize_t SYSIO_INTERFACE_NAME(read)(int fd, void *buf, size_t count); @@ -229,20 +227,20 @@ extern ssize_t SYSIO_INTERFACE_NAME(writ const struct iovec *iov, int count); extern int SYSIO_INTERFACE_NAME(statvfs)(const char *path, struct statvfs *buf); -#if _LARGEFILE64_SOURCE +#ifdef _LARGEFILE64_SOURCE extern int SYSIO_INTERFACE_NAME(statvfs64)(const char *path, struct statvfs64 *buf); #endif extern int SYSIO_INTERFACE_NAME(fstatvfs)(int fd, struct statvfs *buf); -#if _LARGEFILE64_SOURCE +#ifdef _LARGEFILE64_SOURCE extern int SYSIO_INTERFACE_NAME(fstatvfs64)(int fd, struct statvfs64 *buf); #endif extern int SYSIO_INTERFACE_NAME(truncate)(const char *path, off_t length); -#if _LARGEFILE64_SOURCE +#ifdef _LARGEFILE64_SOURCE extern int SYSIO_INTERFACE_NAME(truncate64)(const char *path, off64_t length); #endif extern int SYSIO_INTERFACE_NAME(ftruncate)(int fd, off_t length); -#if _LARGEFILE64_SOURCE +#ifdef _LARGEFILE64_SOURCE extern int SYSIO_INTERFACE_NAME(ftruncate64)(int fd, off64_t length); #endif extern int SYSIO_INTERFACE_NAME(rmdir)(const char *path); @@ -270,7 +268,7 @@ extern int SYSIO_INTERFACE_NAME(mount)(c unsigned long mountflags, const void *data); extern int SYSIO_INTERFACE_NAME(umount)(const char *target); -#if _DECLARE_DIR_ACCESS +#ifdef _DECLARE_DIR_ACCESS extern DIR *SYSIO_INTERFACE_NAME(opendir)(const char *name); extern int SYSIO_INTERFACE_NAME(closedir)(DIR *dir); extern struct dirent *SYSIO_INTERFACE_NAME(readdir)(DIR *dir); Index: xtio.h =================================================================== RCS file: /cvsroot/libsysio/libsysio/include/xtio.h,v retrieving revision 2.2 retrieving revision 2.3 diff -u -w -b -B -p -r2.2 -r2.3 --- xtio.h 25 Jan 2005 00:37:10 -0000 2.2 +++ xtio.h 1 May 2007 16:33:52 -0000 2.3 @@ -106,7 +106,7 @@ extern ioid_t SYSIO_INTERFACE_NAME(iprea size_t count, off_t offset); -#if _LARGEFILE64_SOURCE +#ifdef _LARGEFILE64_SOURCE /* * Post asynch read into buffers mapped by an iovec from file at given offset. */ @@ -124,7 +124,7 @@ extern ioid_t SYSIO_INTERFACE_NAME(iprea size_t count, off_t offset); -#if _LARGEFILE64_SOURCE +#ifdef _LARGEFILE64_SOURCE /* * Post asynch read into buffer from file at given offset. */ @@ -142,7 +142,7 @@ extern ssize_t SYSIO_INTERFACE_NAME(prea size_t count, off_t offset); -#if _LARGEFILE64_SOURCE +#ifdef _LARGEFILE64_SOURCE /* * Read into buffers mapped by an iovec from file at given offset. */ @@ -225,7 +225,7 @@ extern ioid_t SYSIO_INTERFACE_NAME(ipwri const struct iovec *iov, size_t count, off_t offset); -#if _LARGEFILE64_SOURCE +#ifdef _LARGEFILE64_SOURCE /* * Post asynch write from buffers mapped by an iovec to file at given offset. */ @@ -243,7 +243,7 @@ extern ioid_t SYSIO_INTERFACE_NAME(ipwri size_t count, off_t offset); -#if _LARGEFILE64_SOURCE +#ifdef _LARGEFILE64_SOURCE /* * Post asynch write from buffer to file at given offset. */ @@ -261,7 +261,7 @@ extern ssize_t SYSIO_INTERFACE_NAME(pwri size_t count, off_t offset); -#if _LARGEFILE64_SOURCE +#ifdef _LARGEFILE64_SOURCE /* * Write from buffers mapped by an iovec to file at given offset. */ |
From: Lee W. <lw...@us...> - 2007-05-01 16:34:00
|
Update of /cvsroot/libsysio/libsysio/tests In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv24463/tests Modified Files: startup.c test_regions.c Log Message: The `C' preprocessor tests now look for definition of a symbol rather than a value. This enables some builds I'm told. Index: startup.c =================================================================== RCS file: /cvsroot/libsysio/libsysio/tests/startup.c,v retrieving revision 1.12 retrieving revision 1.13 diff -u -w -b -B -p -r1.12 -r1.13 --- startup.c 8 Feb 2006 17:17:43 -0000 1.12 +++ startup.c 1 May 2007 16:33:53 -0000 1.13 @@ -21,7 +21,7 @@ _test_sysio_startup() err = drv_init_all(); if (err) return err; -#if SYSIO_TRACING +#ifdef SYSIO_TRACING /* * tracing */ @@ -43,7 +43,7 @@ _test_sysio_startup() err = _sysio_boot("namespace", arg); if (err) return err; -#if DEFER_INIT_CWD +#ifdef DEFER_INIT_CWD /* * Current working directory. */ Index: test_regions.c =================================================================== RCS file: /cvsroot/libsysio/libsysio/tests/test_regions.c,v retrieving revision 1.8 retrieving revision 1.9 diff -u -w -b -B -p -r1.8 -r1.9 --- test_regions.c 28 Mar 2007 21:27:12 -0000 1.8 +++ test_regions.c 1 May 2007 16:33:53 -0000 1.9 @@ -68,7 +68,7 @@ * Destination will not be overwritten if it already exist. */ -#if defined(_LARGEFILE64_SOURCE) && _LARGEFILE64_SOURCE +#if defined(_LARGEFILE64_SOURCE) #define GO64 #else #warning Cannot prompt the 64-bit interface |
From: Lee W. <lw...@us...> - 2007-05-01 15:57:50
|
Update of /cvsroot/libsysio/libsysio/src In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv9720 Modified Files: fcntl.c Log Message: Changed #if TOKEN tests to ifdef's. Changed test for GETLK so that it is true w/o LARGEFILE64 too. Index: fcntl.c =================================================================== RCS file: /cvsroot/libsysio/libsysio/src/fcntl.c,v retrieving revision 1.27 retrieving revision 1.28 diff -u -w -b -B -p -r1.27 -r1.28 --- fcntl.c 30 Apr 2007 16:52:20 -0000 1.27 +++ fcntl.c 1 May 2007 15:57:36 -0000 1.28 @@ -194,14 +194,14 @@ _sysio_vfcntl(int fd, int cmd, va_list a } } break; -#if !(_LARGEFILE64_SOURCE || F_GETLK64 == F_GETLK) +#if !(defined(_LARGEFILE64_SOURCE) && F_GETLK64 == F_GETLK) case F_GETLK: case F_SETLK: case F_SETLKW: { struct intnl_stat buf; struct flock *fl; -#if _LARGEFILE64_SOURCE +#ifdef _LARGEFILE64_SOURCE struct _SYSIO_FLOCK flock64; #endif @@ -218,7 +218,7 @@ _sysio_vfcntl(int fd, int cmd, va_list a * Copy args to a temp and normalize. */ fl = va_arg(ap, struct flock *); -#if _LARGEFILE64_SOURCE +#ifdef _LARGEFILE64_SOURCE flock64.l_type = fl->l_type; flock64.l_whence = fl->l_whence; flock64.l_start = fl->l_start; @@ -232,7 +232,7 @@ _sysio_vfcntl(int fd, int cmd, va_list a rtn = -1; break; } -#if _LARGEFILE64_SOURCE +#ifdef _LARGEFILE64_SOURCE /* * Copy back. Note that the fcntl_lock call * should have ensured that no overflow was possible. @@ -248,8 +248,8 @@ _sysio_vfcntl(int fd, int cmd, va_list a rtn = 0; } break; -#endif /* !(_LARGEFILE64_SOURCE || F_GETLK64 == F_GETLK) */ -#if _LARGEFILE64_SOURCE +#endif /* !(_LARGEFILE64_SOURCE && F_GETLK64 == F_GETLK) */ +#ifdef _LARGEFILE64_SOURCE case F_GETLK64: case F_SETLK64: case F_SETLKW64: |
From: Lee W. <lw...@us...> - 2007-05-01 15:53:10
|
Update of /cvsroot/libsysio/libsysio/src In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv7814 Modified Files: rw.c Log Message: Use the check file for read/write access macro instead of the expansion. Index: rw.c =================================================================== RCS file: /cvsroot/libsysio/libsysio/src/rw.c,v retrieving revision 1.19 retrieving revision 1.20 diff -u -w -b -B -p -r1.19 -r1.20 --- rw.c 30 Apr 2007 19:36:44 -0000 1.19 +++ rw.c 1 May 2007 15:53:05 -0000 1.20 @@ -222,8 +222,7 @@ _sysio_iiox(int writing, /* * Opened for proper access? */ - if ((writing && !(fil->f_flags & (O_WRONLY | O_RDWR))) || - (!writing && fil->f_flags & O_WRONLY)) { + if (!F_CHKRW(fil, writing ? 'w' : 'r')) { err = -EBADF; break; } |