Skip to content

Commit d1c4983

Browse files
committed
Increased size of FAT filesystems by 1MB
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]>
1 parent bf950a4 commit d1c4983

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/fat.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ pub fn create_fat_filesystem(
2626
.truncate(true)
2727
.open(out_fat_path)
2828
.unwrap();
29-
let fat_size_padded_and_rounded = ((needed_size + 1024 * 64 - 1) / MB + 1) * MB + MB;
29+
let fat_size_padded_and_rounded = ((needed_size + 1024 * 64 - 1) / MB + 2) * MB + MB;
3030
fat_file.set_len(fat_size_padded_and_rounded).unwrap();
3131

3232
// choose a file system label

0 commit comments

Comments
 (0)