summaryrefslogtreecommitdiff
path: root/x/src
diff options
context:
space:
mode:
authorlittleblack111 <littleblack11111@gmail.com>2026-09-10 21:21:25 +0800
committerlittleblack111 <littleblack11111@gmail.com>2026-09-10 21:21:25 +0800
commitd7e663631240928a8fcd56dc173661c12aaec7b6 (patch)
treebe84615458240810e009e2f6fa289ec824c2d52f /x/src
parentf07ff5fad29c63fc4e332afcb08f99fff3df3e0c (diff)
rustfmtmain
Diffstat (limited to 'x/src')
-rw-r--r--x/src/main.rs33
1 files changed, 25 insertions, 8 deletions
diff --git a/x/src/main.rs b/x/src/main.rs
index f2eabf9..ef31f9d 100644
--- a/x/src/main.rs
+++ b/x/src/main.rs
@@ -35,19 +35,36 @@ fn main() {
cmd.arg("-device").arg("isa-debug-exit,iobase=0xf4,iosize=0x04");
if uefi {
- let prebuilt =
- Prebuilt::fetch(Source::LATEST, "target/ovmf").expect("failed to update prebuilt");
+ let prebuilt = Prebuilt::fetch(
+ Source::LATEST,
+ "target/ovmf",
+ )
+ .expect("failed to update prebuilt");
- let code = prebuilt.get_file(Arch::X64, FileType::Code);
- let vars = prebuilt.get_file(Arch::X64, FileType::Vars);
+ let code = prebuilt.get_file(
+ Arch::X64,
+ FileType::Code,
+ );
+ let vars = prebuilt.get_file(
+ Arch::X64,
+ FileType::Vars,
+ );
cmd.arg("-drive").arg(format!("format=raw,file={uefi_path}"));
- cmd.arg("-drive")
- .arg(format!("if=pflash,format=raw,unit=0,file={},readonly=on", code.display()));
+ cmd.arg("-drive").arg(
+ format!(
+ "if=pflash,format=raw,unit=0,file={},readonly=on",
+ code.display()
+ ),
+ );
// copy vars and enable rw instead of snapshot if you want to store data
// (e.g. enroll secure boot keys)
- cmd.arg("-drive")
- .arg(format!("if=pflash,format=raw,unit=1,file={},snapshot=on", vars.display()));
+ cmd.arg("-drive").arg(
+ format!(
+ "if=pflash,format=raw,unit=1,file={},snapshot=on",
+ vars.display()
+ ),
+ );
} else {
cmd.arg("-drive").arg(format!("format=raw,file={bios_path}"));
}