[Libsysio-commit] HEAD: libsysio/drivers/incore fs_incore.c
Brought to you by:
lward
From: Lee W. <lw...@us...> - 2007-04-30 16:52:27
|
Update of /cvsroot/libsysio/libsysio/drivers/incore In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv2000/drivers/incore Modified Files: fs_incore.c Log Message: Merged "unification" branch. First, the changes alter the core to perform pnode-ops by pnode. However, it maintains the pre-existing interface in order to minimize driver changes. Second, more detailed tracing information is available now in the form of a tag, indicating which function the data is from, as well as arguments and return data. Note1: The S_IFDIR bit is no longer set when the pnode-op mkdir function is called. If you need that, set it in your driver. Note2: It is possible to encounter a disconnected tree in _sysio_pb_path. If so, it returns an empty string. This *might* be good enough for your driver. If not, you'll need a change for this as well -- In fact, you should go ahead and change it anyway. Instead of _sysio_pb_path, use _sysio_pb_pathof. This new function takes the base pnode and a pointer to a string. It returns an integer. The usual zero on success or a negated errno on failure. Note3: Sockets support is horribly broken and won't build. As far as I know, this was never used. Unless somebody tells me differently, sockets support will be deprecated in the next release. Otherwise, let me know and I'll fix it. Index: fs_incore.c =================================================================== RCS file: /cvsroot/libsysio/libsysio/drivers/incore/fs_incore.c,v retrieving revision 1.28 retrieving revision 1.29 diff -u -w -b -B -p -r1.28 -r1.29 --- fs_incore.c 12 Apr 2007 19:15:37 -0000 1.28 +++ fs_incore.c 30 Apr 2007 16:52:19 -0000 1.29 @@ -212,11 +212,10 @@ static struct inode_ops _sysio_incore_di _sysio_incore_inop_gone }; -#define _sysio_incore_filop_lookup \ - (int (*)(struct pnode *, \ - struct inode **, \ - struct intent *, \ - const char *))_sysio_do_illop +static int _sysio_incore_filop_lookup(struct pnode *pno, + struct inode **inop, + struct intent *intnt, + const char *path); #define _sysio_incore_filop_filldirentries \ (ssize_t (*)(struct inode *, \ _SYSIO_OFF_T *, \ @@ -888,6 +887,26 @@ out: } static int +_sysio_incore_filop_lookup(struct pnode *pno __IS_UNUSED, + struct inode **inop, + struct intent *intnt __IS_UNUSED, + const char *path __IS_UNUSED) +{ + struct incore_inode *icino; + + /* + * We revalidate only. + */ + if (!*inop) + return -ENOTDIR; + + icino = I2IC(*inop); + assert(icino); + (*inop)->i_stbuf = icino->ici_st; + return 0; +} + +static int _sysio_incore_inop_getattr(struct pnode *pno, struct inode *ino, struct intnl_stat *stbuf) |