Skip to content

Commit de014a9

Browse files
committed
Remove some printlns to keep binary size down
1 parent 6e8f9fa commit de014a9

File tree

2 files changed

+1
-24
lines changed

2 files changed

+1
-24
lines changed

bios/second_stage/src/fat.rs

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -192,8 +192,6 @@ impl<D: Read + Seek> FileSystem<D> {
192192
},
193193
};
194194

195-
writeln!(screen::Writer, "entry: {entry:?}").unwrap();
196-
197195
if entry.is_directory() {
198196
None
199197
} else {
@@ -362,27 +360,6 @@ impl<'a> DirectoryEntry<'a> {
362360
}
363361
}
364362

365-
impl core::fmt::Debug for DirectoryEntry<'_> {
366-
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
367-
struct NamePrinter<'a>(&'a DirectoryEntry<'a>);
368-
impl core::fmt::Debug for NamePrinter<'_> {
369-
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
370-
for char in self.0.name().filter_map(|e| e.ok()) {
371-
write!(f, "{char}")?;
372-
}
373-
Ok(())
374-
}
375-
}
376-
377-
f.debug_struct("DirectoryEntry")
378-
.field("name", &NamePrinter(self))
379-
.field("file_size", &self.file_size)
380-
.field("first_cluster", &self.first_cluster)
381-
.field("attributes", &self.attributes)
382-
.finish()
383-
}
384-
}
385-
386363
#[derive(Debug)]
387364
struct RawDirectoryEntryNormal<'a> {
388365
short_filename_main: &'a str,

bios/second_stage/src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ fn second_stage_end() -> *const u8 {
2727
#[no_mangle]
2828
#[link_section = ".start"]
2929
pub extern "C" fn _start(disk_number: u16, partition_table_start: *const u8) {
30-
writeln!(screen::Writer, " -> SECOND STAGE").unwrap();
30+
screen::Writer.write_str(" -> SECOND STAGE").unwrap();
3131

3232
// parse partition table
3333
let partitions = {

0 commit comments

Comments
 (0)