feat: fixed some bugs for running on real hardware
This commit is contained in:
@@ -123,6 +123,11 @@ void print_chars(char *chars, int amount) {
|
||||
uint8_t fat_check_device(const block_device *device, uint8_t *first_sector) {
|
||||
fat_bpb bpb;
|
||||
memcpy((uint8_t *) &bpb, first_sector, sizeof(fat_bpb));
|
||||
if (bpb.bpb.sectors_per_fat == 0 || bpb.bpb.sectors_per_cluster == 0) {
|
||||
printf("Definitely not FAT\n");
|
||||
return BLOCK_DEV_DRIVER_CHECK_NO_MATCH;
|
||||
}
|
||||
|
||||
printf("OEM: ");
|
||||
print_chars(bpb.bpb.oem_identifier, 11);
|
||||
printf("\n");
|
||||
|
||||
Reference in New Issue
Block a user