From ac6a86c2fa8d8d7459020e709ce5407d7b66f306 Mon Sep 17 00:00:00 2001 From: John Hodge Date: Wed, 14 Apr 2010 18:26:13 +0800 Subject: [PATCH] Renamed libc filename, disabled debug and reenabled lfn in FAT --- Kernel/Makefile.BuildNum | 2 +- Modules/Filesystems/FAT/fat.c | 17 +++++++++++------ Usermode/Libraries/libc.so_src/Makefile | 9 ++++----- 3 files changed, 16 insertions(+), 12 deletions(-) diff --git a/Kernel/Makefile.BuildNum b/Kernel/Makefile.BuildNum index 1dbbbac2..789b571a 100644 --- a/Kernel/Makefile.BuildNum +++ b/Kernel/Makefile.BuildNum @@ -1 +1 @@ -BUILD_NUM = 1830 +BUILD_NUM = 1837 diff --git a/Modules/Filesystems/FAT/fat.c b/Modules/Filesystems/FAT/fat.c index 25045268..93911de6 100644 --- a/Modules/Filesystems/FAT/fat.c +++ b/Modules/Filesystems/FAT/fat.c @@ -3,7 +3,7 @@ * FAT12/16/32 Driver Version (Incl LFN) * * NOTE: This driver will only support _reading_ long file names, not - * writing. I don't even know why i'm adding write-support. FAT sucks. + * writing. I don't even know why I'm adding write-support. FAT sucks. * * Known Bugs: * - LFN Is buggy in FAT_ReadDir @@ -12,11 +12,11 @@ * \todo Implement changing of the parent directory when a file is written to * \todo Implement file creation / deletion */ -#define DEBUG 1 +#define DEBUG 0 #define VERBOSE 1 #define CACHE_FAT 1 //!< Caches the FAT in memory -#define USE_LFN 0 //!< Enables the use of Long File Names +#define USE_LFN 1 //!< Enables the use of Long File Names #define SUPPORT_WRITE 0 #include @@ -1130,10 +1130,13 @@ char *FAT_ReadDir(tVFS_Node *Node, int ID) // Check for empty entry if( (Uint8)fileinfo[a].name[0] == 0xE5 ) { LOG("Empty Entry"); - //LEAVE('p', VFS_SKIP); - //return VFS_SKIP; // Skip + #if 0 // Stop on empty entry? LEAVE('n'); - return NULL; // Skip + return NULL; // Stop + #else + LEAVE('p', VFS_SKIP); + return VFS_SKIP; // Skip + #endif } #if USE_LFN @@ -1262,6 +1265,8 @@ tVFS_Node *FAT_FindDir(tVFS_Node *Node, char *Name) { // Remove LFN if it does not apply if(lfnId != i) lfn[0] = '\0'; + #else + if(fileinfo[i&0xF].attrib == ATTR_LFN) continue; #endif // Get Real Filename FAT_int_ProperFilename(tmpName, fileinfo[i&0xF].name); diff --git a/Usermode/Libraries/libc.so_src/Makefile b/Usermode/Libraries/libc.so_src/Makefile index 1e3fc465..a12ff45b 100644 --- a/Usermode/Libraries/libc.so_src/Makefile +++ b/Usermode/Libraries/libc.so_src/Makefile @@ -6,22 +6,22 @@ CPPFLAGS += CFLAGS += ASFLAGS += -LDFLAGS += -soname libc.so.1 -Map map.txt -lgcc +LDFLAGS += -soname libc.so -Map map.txt -lgcc OBJ = stub.o heap.o stdlib.o env.o fileIO.o string.o DEPFILES := $(OBJ:%.o=%.d) # signals.o -BIN = ../libc.so.1 +BIN = ../libc.so .PHONY: all clean install all: $(BIN) clean: - $(RM) $(BIN) ../libc.so $(OBJ) $(DEPFILES) libc.so.1.dsm libc.so.1.dmp map.txt + $(RM) $(BIN) $(OBJ) $(DEPFILES) libc.so.dsm libc.so.dmp map.txt install: $(BIN) - $(xCP) ../libc.so.1 $(DISTROOT)/Libs/ + $(xCP) $(BIN) $(DISTROOT)/Libs/ # Core C Library $(BIN): $(OBJ) @@ -29,7 +29,6 @@ $(BIN): $(OBJ) @$(LD) $(LDFLAGS) $(OBJ) -o $@ @$(OBJDUMP) -d $@ > libc.so.1.dsm @$(OBJDUMP) -x -r -R $@ > libc.so.1.dmp - cp ../libc.so.1 ../libc.so # C Runtime 0 ../crt0.o: crt0.asm -- 2.20.1