X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=Kernel%2Fbinary.c;h=8b7e7448325974ca267618cf0abbfb7a015203d9;hb=c43c05ef3234d6118ce601d299df60383d54ac7b;hp=fdb4dbaefe18c383ac01e2cf7945dac2b7e3b4c5;hpb=263e8355dbbcee8d38db03753811c0a8246d04e9;p=tpg%2Facess2.git diff --git a/Kernel/binary.c b/Kernel/binary.c index fdb4dbae..8b7e7448 100644 --- a/Kernel/binary.c +++ b/Kernel/binary.c @@ -414,7 +414,7 @@ tBinary *Binary_DoLoad(tMount MountID, tInode Inode, const char *Path) { tBinary *pBinary; int fp; - Uint ident; + Uint32 ident; tBinaryType *bt = gRegBinTypes; ENTER("iMountID XInode sPath", MountID, Inode, Path); @@ -426,19 +426,26 @@ tBinary *Binary_DoLoad(tMount MountID, tInode Inode, const char *Path) LEAVE('n'); return NULL; } + + LOG("fp = 0x%x", fp); // Read File Type VFS_Read(fp, 4, &ident); VFS_Seek(fp, 0, SEEK_SET); + LOG("ident = 0x%x", ident); + // Determine the type for(; bt; bt = bt->Next) { - if( (ident & bt->Mask) != (Uint)bt->Ident ) + if( (ident & bt->Mask) != (Uint32)bt->Ident ) continue; + LOG("bt = %p (%s)", bt, bt->Name); pBinary = bt->Load(fp); break; } + + LOG("pBinary = %p", pBinary); // Close File VFS_Close(fp);