From ec1761f73e0b636c272ae2481725546124c2a0ec Mon Sep 17 00:00:00 2001 From: Victoria Fischer Date: Mon, 5 Jan 2026 13:07:03 +0100 Subject: [PATCH] build: support partition sizes in kb --- build.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/build.rs b/build.rs index 73d264e..b27a318 100644 --- a/build.rs +++ b/build.rs @@ -237,7 +237,7 @@ fn write_sim_data() { } if unified_fd.metadata().unwrap().len() as usize >= data_size { - // FIXME: Need to implement data resampling + // FIXME: Need to implement automatic data resampling panic!("Simulation data is too big! Cannot fit {:#x} bytes into a partition with a size of {data_size:#x} bytes.", unified_fd.metadata().unwrap().len()); } @@ -252,6 +252,8 @@ fn parse_partition_number(n: &str) -> Option { Some(usize::from_str_radix(hex_offset, 16).unwrap()) } else if let Some(mb_offset) = n.strip_suffix("M") { Some(mb_offset.parse::().unwrap() * 1024 * 1024) + } else if let Some(kb_offset) = n.strip_suffix("K") { + Some(kb_offset.parse::().unwrap() * 1024) } else { Some(n.parse().unwrap()) }