Fiddling with IPStack
[tpg/acess2.git] / Modules / Filesystems / Ext2 / ext2.c
index aa15e10..52793d0 100644 (file)
@@ -73,7 +73,8 @@ tVFS_Node *Ext2_InitDevice(char *Device, char **Options)
        \r
        // Sanity Check Magic value\r
        if(sb.s_magic != 0xEF53) {\r
-               Log_Warning("EXT2", "Volume '%s' is not an EXT2 volume", Device);\r
+               Log_Warning("EXT2", "Volume '%s' is not an EXT2 volume (0x%x != 0xEF53)",\r
+                       Device, sb.s_magic);\r
                VFS_Close(fd);\r
                LEAVE('n');\r
                return NULL;\r
@@ -323,7 +324,7 @@ void Ext2_int_UpdateSuperblock(tExt2_Disk *Disk)
        #define INT_MAX (((long long int)1<<(sizeof(int)*8))-1)\r
        \r
        // Powers of 3\r
-       for( i = 3; i < ngrp && i < INT_MAX; i *= 3 )\r
+       for( i = 3; i < ngrp && i < INT_MAX/3; i *= 3 )\r
                VFS_WriteAt(Disk->FD, i*bpg*Disk->BlockSize, 1024, &Disk->SuperBlock);\r
        \r
        // Powers of 5\r

UCC git Repository :: git.ucc.asn.au