From: John Hodge Date: Sun, 3 Oct 2010 09:24:03 +0000 (+0800) Subject: Debug, Debug, Debug X-Git-Tag: rel0.06~17 X-Git-Url: https://git.ucc.asn.au/?a=commitdiff_plain;h=b0ab9997c3256041087483c0840247821bfa55c8;p=tpg%2Facess2.git Debug, Debug, Debug --- diff --git a/Kernel/Makefile b/Kernel/Makefile index 8649d501..ec925729 100644 --- a/Kernel/Makefile +++ b/Kernel/Makefile @@ -62,7 +62,7 @@ apidoc: $(BIN): $(OBJ) $(MODS) arch/$(ARCHDIR)/link.ld Makefile @echo --- LD -o $(BIN) @$(LD) $(LDFLAGS) -o $(BIN) $(OBJ) $(MODS) -Map ../Map.$(ARCH).txt - $(DISASM) $(BIN) > $(BIN).dsm + $(DISASM) -S $(BIN) > $(BIN).dsm @wc -l $(SRCFILES) include/*.h > LineCounts.$(ARCH).txt @echo BUILD_NUM = $$(( $(BUILD_NUM) + 1 )) > Makefile.BuildNum.$(ARCH) @$(STRIP) $(BIN) diff --git a/Kernel/vfs/open.c b/Kernel/vfs/open.c index 0bca8cac..cc546f48 100644 --- a/Kernel/vfs/open.c +++ b/Kernel/vfs/open.c @@ -397,6 +397,17 @@ tVFS_Node *VFS_ParsePath(const char *Path, char **TruePath) retLength += nextSlash + 1; } + if( !curNode->FindDir ) { + if(curNode->Close) curNode->Close(curNode); + if(TruePath) { + free(*TruePath); + *TruePath = NULL; + } + Log("FindDir fail on '%s'", Path); + LEAVE('n'); + return NULL; + } + // Get last node LOG("VFS_ParsePath: FindDir(%p, '%s')", curNode, &Path[ofs]); tmpNode = curNode->FindDir(curNode, &Path[ofs]); diff --git a/Modules/Filesystems/FAT/fat.c b/Modules/Filesystems/FAT/fat.c index 5d1c7f53..a63bac01 100644 --- a/Modules/Filesystems/FAT/fat.c +++ b/Modules/Filesystems/FAT/fat.c @@ -941,6 +941,7 @@ tVFS_Node *FAT_int_CreateNode(tVFS_Node *Parent, fat_filetable *Entry, int Pos) tFAT_VolInfo *disk = Parent->ImplPtr; ENTER("pParent pFT", Parent, Entry); + LOG("disk = %p\n", disk); memset(&node, 0, sizeof(tVFS_Node));