[Libsysio-commit] unification: libsysio/include inode.h
Brought to you by:
lward
From: Lee W. <lw...@us...> - 2007-02-05 16:25:29
|
Update of /cvsroot/libsysio/libsysio/include In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv25174 Modified Files: Tag: unification inode.h Log Message: Changed the PNOP_OPEN macro. It uses the parent only when flags has O_CREAT set. Otherwise, the targeted path-node is used. Index: inode.h =================================================================== RCS file: /cvsroot/libsysio/libsysio/include/inode.h,v retrieving revision 1.27.2.1 retrieving revision 1.27.2.2 diff -u -w -b -B -p -r1.27.2.1 -r1.27.2.2 --- inode.h 5 Feb 2007 15:54:27 -0000 1.27.2.1 +++ inode.h 5 Feb 2007 16:25:24 -0000 1.27.2.2 @@ -314,7 +314,9 @@ struct pnode { _PNOP_MKCALL((_pno), readlink, \ (_pno), (_buf), (_bufsiz)) #define PNOP_OPEN(_pno, _flags, _mode) \ - _PNOP_MKCALL((_pno)->p_parent, open, \ + _PNOP_MKCALL((((_flags) & O_CREAT) ? \ + (_pno)->p_parent : \ + (_pno)), open, \ (_pno), (_flags), (_mode)) #define PNOP_CLOSE(_pno) \ _PNOP_MKCALL((_pno), close, \ |