Skip to content

Commit

Permalink
Increased size of FAT filesystems by 1MB
Browse files Browse the repository at this point in the history
This prevents a 'No space left on device' error from occuring
for large kernel images.

Implements suggestion in rust-osdev#438 by Ferdia McKeogh <[email protected]>
  • Loading branch information
MarkRoss470 committed Jul 4, 2024
1 parent bf950a4 commit d1c4983
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/fat.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ pub fn create_fat_filesystem(
.truncate(true)
.open(out_fat_path)
.unwrap();
let fat_size_padded_and_rounded = ((needed_size + 1024 * 64 - 1) / MB + 1) * MB + MB;
let fat_size_padded_and_rounded = ((needed_size + 1024 * 64 - 1) / MB + 2) * MB + MB;
fat_file.set_len(fat_size_padded_and_rounded).unwrap();

// choose a file system label
Expand Down

0 comments on commit d1c4983

Please sign in to comment.