I'm trying to read the number of FATs my FAT filesystem might have. In order to do that I'm reading as reference the documentation found here.
It's said that the number of FATs is given in the 16th byte of the binary file. But it has a length of 1 byte. From my knowledge, I know integers are at least 4 bytes long.
How can I read the number of FATs in my binary file?
I have tried reading it anyways without success:
void test(int file_descriptor) {
int nFats;
lseek(file_descriptor, 16, SEEK_SET);
read(file_descriptor, &nFats, 1);
printf("Number of FATs: %d\n", nFats);
}