From dd0b012706d1d04eff158856dedbe028a1b4896d Mon Sep 17 00:00:00 2001 From: bunnie Date: Thu, 4 Apr 2024 18:32:19 +0800 Subject: [PATCH] specify swap file name --- xtask/src/builder.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/xtask/src/builder.rs b/xtask/src/builder.rs index 98ddfd5a9..52db53892 100644 --- a/xtask/src/builder.rs +++ b/xtask/src/builder.rs @@ -971,9 +971,16 @@ impl Builder { } else { String::new() }; + let mut swap_file = PathBuf::new(); if self.swap.is_some() { args.push("--swap"); args.push(&swap_spec); + swap_file.push("target"); + swap_file.push(self.target.as_ref().expect("target")); + swap_file.push(stream); + swap_file.push("swap.img"); + args.push("--swap-name"); + args.push(swap_file.to_str().unwrap()) } if memory_spec.len() == 1 {