X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=Kernel%2Fvfs%2Fdir.c;h=e87b5a3127c87170ad591170bab84774ff359356;hb=3c777e58e6baba6760f43b8fdde4daf62081048b;hp=22249ef681069a5c7315f9f658e139b5f40140ad;hpb=8fef00cfab98773a519ab909fa9da9dc7af692db;p=tpg%2Facess2.git diff --git a/Kernel/vfs/dir.c b/Kernel/vfs/dir.c index 22249ef6..e87b5a31 100644 --- a/Kernel/vfs/dir.c +++ b/Kernel/vfs/dir.c @@ -2,7 +2,7 @@ * Acess2 VFS * - Directory Management Functions */ -#define DEBUG 0 +#define DEBUG 1 #include #include #include @@ -34,18 +34,27 @@ int VFS_MkDir(char *Path) int VFS_MkNod(char *Path, Uint Flags) { char *absPath, *name; - int pos=0, oldpos = 0; + int pos = 0, oldpos = 0; + int next = 0; tVFS_Node *parent; int ret; ENTER("sPath xFlags", Path, Flags); absPath = VFS_GetAbsPath(Path); + LOG("absPath = '%s'", absPath); - while( (pos = strpos8(&absPath[pos+1], '/')) != -1 ) oldpos = pos; + while( (next = strpos(&absPath[pos+1], '/')) != -1 ) { + LOG("next = %i", next); + pos += next+1; + LOG("pos = %i", pos); + oldpos = pos; + } absPath[oldpos] = '\0'; // Mutilate path name = &absPath[oldpos+1]; + LOG("absPath = '%s', name = '%s'", absPath, name); + // Check for root if(absPath[0] == '\0') parent = VFS_ParsePath("/", NULL); @@ -62,7 +71,7 @@ int VFS_MkNod(char *Path, Uint Flags) return -1; } - LOG("parent = %p\n", parent); + LOG("parent = %p", parent); if(parent->MkNod == NULL) { Warning("VFS_MkNod - Directory has no MkNod method");