Skip to content

Commit 3540935

Browse files
committed
fix: also skip initrd re-mapping in pyhl CLI binary
The CLI cmd_run had its own from_snapshot_file_configured call that still passed the initrd path. Same fix as the library: the snapshot blob already contains all initrd data. Signed-off-by: danbugs <danilochiarlone@gmail.com>
1 parent 8835d8d commit 3540935

1 file changed

Lines changed: 3 additions & 8 deletions

File tree

host/src/bin/pyhl.rs

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -593,18 +593,13 @@ fn cmd_run(args: RunArgs) -> Result<()> {
593593
listen_ports.is_some(),
594594
)?;
595595

596-
let initrd = home.join(INITRD_FILE);
597-
596+
// No initrd re-mapping: the snapshot already contains all initrd
597+
// pages compacted into its blob with rebuilt page tables.
598598
let t_load = Instant::now();
599-
let initrd_ref = if initrd.is_file() {
600-
Some(initrd.as_path())
601-
} else {
602-
None
603-
};
604599
let mut sandbox = Sandbox::from_snapshot_file_configured(
605600
&snapshot,
606601
&run_preopens,
607-
initrd_ref,
602+
None,
608603
network.as_ref(),
609604
listen_ports.as_ref(),
610605
)?;

0 commit comments

Comments
 (0)