[Libsysio-commit] HEAD: libsysio/src chdir.c
Brought to you by:
lward
From: Lee W. <lw...@us...> - 2003-10-15 19:25:28
|
Update of /cvsroot/libsysio/libsysio/src In directory sc8-pr-cvs1:/tmp/cvs-serv24739/src Modified Files: chdir.c Log Message: Grrr... Here again! The recent changes to the mount interconnection exposed the name of the covering path-node. The name of this node was being delivered by _sysio_p_path inappropriately. Instead, the _sysio_p_path routine must dive down to the bottom-most, covered, path node for the component name. Index: chdir.c =================================================================== RCS file: /cvsroot/libsysio/libsysio/src/chdir.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -w -b -B -p -r1.7 -r1.8 --- chdir.c 6 Oct 2003 21:19:31 -0000 1.7 +++ chdir.c 15 Oct 2003 19:21:37 -0000 1.8 @@ -164,6 +164,14 @@ _sysio_p_path(struct pnode *pno, char ** n = 0; do { /* + * If this is a covering path-node then the name should be + * the *covered* nodes name, not this one unless we are at + * the root of the name-space. + */ + while (pno == pno->p_mount->mnt_root && pno != pno->p_parent ) + pno = pno->p_mount->mnt_covers; + + /* * Add length of this component to running sum and * account for this vertex. */ @@ -196,6 +204,14 @@ _sysio_p_path(struct pnode *pno, char ** cp = *buf + len + n; *cp = '\0'; /* NUL terminate */ do { + /* + * If this is a covering path-node then the name should be + * the *covered* nodes name, not this one unless we are at + * the root of the name-space. + */ + while (pno == pno->p_mount->mnt_root && pno != pno->p_parent ) + pno = pno->p_mount->mnt_covers; + /* * Add component and separator. */ |