The debugging continues, but unfortunately I have not yet been able to identify what is fundamentally broken with my file system code.
But along the way I have spotted and fixed various bugs. Here is one, I am not even sure why it compiled in the first place, so maybe a C guru could tell me…
if le16_to_cpu(((u16 *) bh->b_data)[j * VMU_DIR_RECORD_LEN16 + VMUFAT_FIRSTBLOCK_OFFSET16] == ino)
if (le16_to_cpu(((u16 *) bh->b_data)[j * VMU_DIR_RECORD_LEN16 + VMUFAT_FIRSTBLOCK_OFFSET16]) == ino)
2 responses to “A question for a C guru”
Maybe le16_to_cpu is a macro which has braces around its contents (this is standard practice).
Tobi, You are quite right in that it is a macro. Well spotted. Though it’s a macro that references another macro – which I assume is bracketed as you say, though haven’t been able to confirm that.