[Libsysio-commit] HEAD: libsysio/dev/stdfd stdfd.c
Brought to you by:
lward
From: Lee W. <lw...@us...> - 2004-09-21 16:18:52
|
Update of /cvsroot/libsysio/libsysio/dev/stdfd In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25715/dev/stdfd Modified Files: stdfd.c Log Message: From Henry Pierce at Cray; A chdir() to a directory without `x' permission should not succeed but does. This required that inodes now carry the full attributes -- Not just the mode bits. That's a bug change. Driver writers; 1) _sysio_i_new is altered. It needs the full intnl_stat structure now. 2) Your lookup function should refresh the inode attributes. 3) We don't keep an inode dirty bit. Hopefully, you've been pushing changes at the time of the operation instead of waiting until the inode was flushed or somesuch. Maybe you keep an internal dirty bit? Index: stdfd.c =================================================================== RCS file: /cvsroot/libsysio/libsysio/dev/stdfd/stdfd.c,v retrieving revision 1.10 retrieving revision 1.11 diff -u -w -b -B -p -r1.10 -r1.11 --- stdfd.c 27 Aug 2004 18:10:05 -0000 1.10 +++ stdfd.c 21 Sep 2004 16:18:13 -0000 1.11 @@ -49,6 +49,7 @@ #include <sys/syscall.h> #include <unistd.h> #include <sys/types.h> +#include <sys/stat.h> #include <sys/queue.h> #include "xtio.h" @@ -151,7 +152,7 @@ stdfd_read_simple(void *buf, struct inode *ino) { - int fd = SYSIO_MINOR_DEV(ino->i_rdev); + int fd = SYSIO_MINOR_DEV(ino->i_stbuf.st_rdev); return doread(fd, buf, nbytes); } @@ -169,7 +170,7 @@ stdfd_write_simple(const void *buf, _SYSIO_OFF_T off __IS_UNUSED, struct inode *ino) { - int fd = SYSIO_MINOR_DEV(ino->i_rdev); + int fd = SYSIO_MINOR_DEV(ino->i_stbuf.st_rdev); return dowrite(fd, buf, nbytes); } |