| 55 | } |
| 56 | |
| 57 | unsigned int fat_sectors(const struct fat_boot_sector *fat_header) |
| 58 | { |
| 59 | const unsigned int hi=fat_header->sectors[1]; |
| 60 | const unsigned int lo=fat_header->sectors[0]; |
| 61 | /*@ assert 0 <= hi < 1<<8; */ |
| 62 | /*@ assert 0 <= hi<<8 < 1<<16; */ |
| 63 | /*@ assert 0 <= lo < 1<<8; */ |
| 64 | const unsigned int res=(hi<<8)|lo; |
| 65 | /*@ assert res <= 65535; */ |
| 66 | return res; |
| 67 | } |
| 68 | |
| 69 | unsigned int fat_get_cluster_from_entry(const struct msdos_dir_entry *entry) |
| 70 | { |
no outgoing calls