Skip to content

Commit

Permalink
Fixed the equation for fat_sectors
Browse files Browse the repository at this point in the history
  • Loading branch information
hestati63 committed Jun 20, 2020
1 parent a870d0b commit 8f145e7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion filesys/fat.c
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ void
fat_boot_create (void) {
unsigned int fat_sectors =
(disk_size (filesys_disk) - 1)
/ (DISK_SECTOR_SIZE / sizeof (cluster_t) * SECTORS_PER_CLUSTER + 1);
/ (DISK_SECTOR_SIZE / sizeof (cluster_t) * SECTORS_PER_CLUSTER + 1) + 1;
fat_fs->bs = (struct fat_boot){
.magic = FAT_MAGIC,
.sectors_per_cluster = SECTORS_PER_CLUSTER,
Expand Down

0 comments on commit 8f145e7

Please sign in to comment.