From: John Hodge Date: Sun, 11 Apr 2010 08:28:12 +0000 (+0800) Subject: Disabled ATA debug, turned FAT Debug on, misc in IPStack/TCP X-Git-Tag: rel0.06~246 X-Git-Url: https://git.ucc.asn.au/?a=commitdiff_plain;h=4e2291b425621d70278b1d38c644aaa2715300ce;p=tpg%2Facess2.git Disabled ATA debug, turned FAT Debug on, misc in IPStack/TCP --- diff --git a/Kernel/Makefile.BuildNum b/Kernel/Makefile.BuildNum index 10d13caf..dc8d8096 100644 --- a/Kernel/Makefile.BuildNum +++ b/Kernel/Makefile.BuildNum @@ -1 +1 @@ -BUILD_NUM = 1817 +BUILD_NUM = 1822 diff --git a/Modules/Filesystems/FAT/fat.c b/Modules/Filesystems/FAT/fat.c index 25b9cb06..3ec2a5fd 100644 --- a/Modules/Filesystems/FAT/fat.c +++ b/Modules/Filesystems/FAT/fat.c @@ -12,11 +12,11 @@ * \todo Implement changing of the parent directory when a file is written to * \todo Implement file creation / deletion */ -#define DEBUG 0 +#define DEBUG 1 #define VERBOSE 1 #define CACHE_FAT 1 //!< Caches the FAT in memory -#define USE_LFN 1 //!< Enables the use of Long File Names +#define USE_LFN 0 //!< Enables the use of Long File Names #define SUPPORT_WRITE 0 #include @@ -238,7 +238,8 @@ tVFS_Node *FAT_InitDevice(char *Device, char **Options) // == VFS Interface node = &diskInfo->rootNode; - node->Size = bs->files_in_root; + //node->Size = bs->files_in_root; + node->Size = -1; node->Inode = diskInfo->rootOffset; // 0:31 - Cluster, 32:63 - Parent Directory Cluster node->ImplPtr = diskInfo; // Disk info pointer node->ImplInt = 0; // 0:15 - Directory Index, 16: Dirty Flag, 17: Deletion Flag @@ -599,14 +600,14 @@ Uint64 FAT_Read(tVFS_Node *Node, Uint64 offset, Uint64 length, void *buffer) // Sanity Check offset if(offset > Node->Size) { - LOG("Reading past EOF (%i > %i)", offset, node->Size); + LOG("Reading past EOF (%i > %i)", offset, Node->Size); LEAVE('i', 0); return 0; } // Clamp Size if(offset + length > Node->Size) { LOG("Reading past EOF (%lli + %lli > %lli), clamped to %lli", - offset, length, node->Size, node->Size - offset); + offset, length, Node->Size, Node->Size - offset); length = Node->Size - offset; } @@ -856,14 +857,11 @@ void FAT_int_ProperFilename(char *dest, char *src) char *FAT_int_CreateName(fat_filetable *ft, char *LongFileName) { char *ret; - int len; ENTER("pft sLongFileName", ft, LongFileName); #if USE_LFN if(LongFileName && LongFileName[0] != '\0') { - len = strlen(LongFileName); - ret = malloc(len+1); - strcpy(ret, LongFileName); + ret = strdup(LongFileName); } else { diff --git a/Modules/IPStack/tcp.c b/Modules/IPStack/tcp.c index 1c9464c1..e7cded3e 100644 --- a/Modules/IPStack/tcp.c +++ b/Modules/IPStack/tcp.c @@ -73,7 +73,7 @@ void TCP_StartConnection(tTCPConnection *Conn) hdr.SequenceNumber = Conn->NextSequenceSend; hdr.DataOffset = (sizeof(tTCPHeader)/4) << 4; hdr.Flags = TCP_FLAG_SYN; - hdr.WindowSize = 0; // TODO + hdr.WindowSize = 0xFFFF; // Max hdr.Checksum = 0; // TODO hdr.UrgentPointer = 0; diff --git a/Modules/Storage/ATA/main.c b/Modules/Storage/ATA/main.c index a1010a83..0aadb6eb 100644 --- a/Modules/Storage/ATA/main.c +++ b/Modules/Storage/ATA/main.c @@ -2,7 +2,7 @@ * Acess2 IDE Harddisk Driver * - main.c */ -#define DEBUG 1 +#define DEBUG 0 #include #include #include