[Libsysio-commit] HEAD: libsysio/src open.c
Brought to you by:
lward
From: Lee W. <lw...@us...> - 2008-12-06 18:22:36
|
Update of /cvsroot/libsysio/libsysio/src In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv9324 Modified Files: open.c Log Message: Fixed a bug in _sysio_open; After calling the driver open, successfully, it was taking an extra, unneeded, reference. As well, in _sysio_open, after the driver does it's open, we want to make sure there is an inode present; Next thing we will probably do is install the thing into the open file table. Added a validate, then. Index: open.c =================================================================== RCS file: /cvsroot/libsysio/libsysio/src/open.c,v retrieving revision 1.33 retrieving revision 1.34 diff -u -w -b -B -p -r1.33 -r1.34 --- open.c 15 Oct 2008 22:01:01 -0000 1.33 +++ open.c 6 Dec 2008 18:22:27 -0000 1.34 @@ -96,7 +97,7 @@ _sysio_open(struct pnode *pno, int flags return -EROFS; err = _sysio_p_validate(pno->p_parent, NULL, NULL); if (!err && (err = PNOP_OPEN(pno, flags, mode)) == 0) - I_REF(pno->p_base->pb_ino); + err = _sysio_p_validate(pno, NULL, NULL); } else if ((flags & (O_CREAT|O_EXCL)) == (O_CREAT|O_EXCL)) err = -EEXIST; else if (!pno->p_base->pb_ino) |