/* Per-mount filesystem state */
struct ext2_mount {
const block_device_t* bdev;
- int drive;
uint32_t part_lba; /* partition start LBA */
uint32_t block_size; /* bytes per block (1024, 2048, or 4096) */
uint32_t sectors_per_block;
/* Per-mount filesystem state */
struct fat_mount {
const block_device_t* bdev;
- int drive;
uint32_t part_lba;
uint16_t bytes_per_sector;
uint8_t sectors_per_cluster;
memset(em, 0, sizeof(*em));
em->bdev = bdev;
- em->drive = bdev->drive_id;
em->part_lba = partition_lba;
struct ext2_superblock sb;
memset(fm, 0, sizeof(*fm));
fm->bdev = bdev;
- fm->drive = bdev->drive_id;
uint8_t boot_sec[FAT_SECTOR_SIZE];
if (fat_read_sector(fm, partition_lba, boot_sec) < 0) {