return 1;
}
+#define READDIR_FIXUP(ptr) (void*)( (Uint)(ptr) & ~1 )
/**
* \fn int VFS_ReadDir(int FD, char *Dest)
* \brief Read from a directory
else
h->Position ++;
} while(tmp != NULL && (Uint)tmp < (Uint)VFS_MAXSKIP);
- LOG("tmp = '%s'", tmp);
+
+ LOG("tmp = '%s'", READDIR_FIXUP(tmp));
if(!tmp) {
LEAVE('i', 0);
return 0;
}
- strcpy(Dest, tmp);
+ strcpy(Dest, READDIR_FIXUP(tmp));
if((Uint)tmp & 1)
- free((void*)( (Uint)tmp & ~1 ));
+ free(READDIR_FIXUP(tmp));
LEAVE('i', 1);
return 1;
// Offset in sector\r
a = dirpos & 0xF;\r
\r
- LOG("offset=%i, a=%i\n", (Uint)offset, a);\r
+ LOG("offset=%i, a=%i", (Uint)offset, a);\r
\r
// Read Sector\r
VFS_ReadAt(disk->fileHandle, offset*512, 512, fileinfo); // Read Dir Data\r
\r
- LOG("name[0] = 0x%x\n", (Uint8)fileinfo[a].name[0]);\r
+ LOG("name[0] = 0x%x", (Uint8)fileinfo[a].name[0]);\r
//Check if this is the last entry\r
if(fileinfo[a].name[0] == '\0') {\r
dirNode->Size = dirpos;\r
- LOG("End of list\n");\r
+ LOG("End of list");\r
LEAVE('n');\r
return NULL; // break\r
}\r