Rename length_of to size_of
This commit is contained in:
parent
57f646f5e0
commit
ef173b2d01
|
@ -7,7 +7,7 @@ use std::io::{Read, Seek, SeekFrom};
|
|||
|
||||
const ROOT_DIR_NAME:&'static str = "\x00";
|
||||
|
||||
pub mod length_of {
|
||||
pub mod size_of {
|
||||
use cdtypes::types::{sector::Mode0, helper::{sector_count_mode2_form1, sector_count_mode2_form2}};
|
||||
use crate::types::FileType;
|
||||
use super::{Directory, File, FullSizeInfo, SizeInfo, PathTable};
|
||||
|
@ -65,11 +65,11 @@ pub mod length_of {
|
|||
|
||||
pub fn calculate_length_for(element: &Layout) -> SizeInfo {
|
||||
match element {
|
||||
Layout::SystemArea(_) => length_of::system_area(),
|
||||
Layout::PVD(_) => length_of::pvd(),
|
||||
Layout::PathTables(root, _) => length_of::path_tables(&root.borrow()),
|
||||
Layout::Directory(dir) => length_of::directory(&dir.borrow()),
|
||||
Layout::File(file) => length_of::file(&file.borrow()),
|
||||
Layout::SystemArea(_) => size_of::system_area(),
|
||||
Layout::PVD(_) => size_of::pvd(),
|
||||
Layout::PathTables(root, _) => size_of::path_tables(&root.borrow()),
|
||||
Layout::Directory(dir) => size_of::directory(&dir.borrow()),
|
||||
Layout::File(file) => size_of::file(&file.borrow()),
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -237,7 +237,7 @@ fn process_system_area(system_area: &SystemArea, sec_writer: &mut dyn SectorWrit
|
|||
else {
|
||||
// No license specified - filling it with zeros
|
||||
print_warning("WARNING: No license file provided. Some emulators (like No$PSX) will not boot this CD.".to_owned());
|
||||
write_dummy(sec_writer, length_of::SYSTEM_AREA_SECTOR_COUNT)
|
||||
write_dummy(sec_writer, size_of::SYSTEM_AREA_SECTOR_COUNT)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -71,7 +71,7 @@ impl CDDesc {
|
|||
}
|
||||
});
|
||||
|
||||
size += cd::length_of::lead_out(self.lead_out_sectors).full_size.bytes.unwrap_or(0);
|
||||
size += cd::size_of::lead_out(self.lead_out_sectors).full_size.bytes.unwrap_or(0);
|
||||
size
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue