Updating drivers to use the Log_ functions instead of Log() and Warning()
[tpg/acess2.git] / Modules / Filesystems / FAT / fat.c
index d063c87..c444fa3 100644 (file)
@@ -83,14 +83,14 @@ tVFS_Node *FAT_InitDevice(char *Device, char **Options)
        //Open device and read boot sector\r
        diskInfo->fileHandle = VFS_Open(Device, VFS_OPENFLAG_READ|VFS_OPENFLAG_WRITE);\r
        if(diskInfo->fileHandle == -1) {\r
-               Warning("FAT_InitDisk - Unable to open device '%s'", Device);\r
+               Log_Warning("FAT", "Unable to open device '%s'", Device);\r
                return NULL;\r
        }\r
        \r
        VFS_ReadAt(diskInfo->fileHandle, 0, 512, bs);\r
        \r
        if(bs->bps == 0 || bs->spc == 0) {\r
-               Warning("FAT_InitDisk - Error in FAT Boot Sector\n");\r
+               Log_Warning("FAT", "Error in FAT Boot Sector\n");\r
                return NULL;\r
        }\r
        \r
@@ -136,7 +136,7 @@ tVFS_Node *FAT_InitDevice(char *Device, char **Options)
                        sSize = "GiB";\r
                        iSize >>= 20;\r
                }\r
-               Log("[FAT ] '%s' %s, %i %s", Device, sFatType, iSize, sSize);\r
+               Log_Log("FAT", "'%s' %s, %i %s", Device, sFatType, iSize, sSize);\r
        }\r
        #endif\r
        \r
@@ -165,7 +165,7 @@ tVFS_Node *FAT_InitDevice(char *Device, char **Options)
        Uint32  Ofs;\r
        diskInfo->FATCache = (Uint32*)malloc(sizeof(Uint32)*diskInfo->ClusterCount);\r
        if(diskInfo->FATCache == NULL) {\r
-               Warning("FAT_InitDisk - Heap Exhausted\n");\r
+               Log_Warning("FAT", "Heap Exhausted\n");\r
                return NULL;\r
        }\r
        Ofs = bs->resvSectCount*512;\r
@@ -343,7 +343,7 @@ append:
        #else\r
        Uint32  val;\r
        //Uint8 buf[512];\r
-       Warning("[FAT  ] TODO: Implement cluster allocation with non cached FAT");\r
+       Log_Warning("FAT", "TODO: Implement cluster allocation with non cached FAT");\r
        return 0;\r
        \r
        if(Disk->type == FAT12) {\r
@@ -547,7 +547,7 @@ Uint64 FAT_Write(tVFS_Node *Node, Uint64 Offset, Uint64 Length, void *Buffer)
        {\r
                cluster = FAT_int_GetFatValue( disk, cluster );\r
                if(cluster == -1) {\r
-                       Warning("[FAT  ] EOC Unexpectedly Reached");\r
+                       Log_Warning("FAT", "EOC Unexpectedly Reached");\r
                        return 0;\r
                }\r
                Offset -= disk->BytesPerCluster;\r
@@ -849,7 +849,7 @@ char *FAT_ReadDir(tVFS_Node *Node, int ID)
        // Bounds Checking (Used to spot heap overflows)\r
        if(cluster > disk->ClusterCount + 2)\r
        {\r
-               Warning("FAT_ReadDir - Cluster ID is over cluster count (0x%x>0x%x)",\r
+               Log_Warning("FAT", "Cluster ID is over cluster count (0x%x>0x%x)",\r
                        cluster, disk->ClusterCount+2);\r
                LEAVE('n');\r
                return NULL;\r

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