From 9c2e48bb3e99f71614aeaeac57d1ed16be725109 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=83=81=E3=82=BB?= <123655015+chise0713@users.noreply.github.com> Date: Tue, 21 May 2024 09:18:28 +0800 Subject: [PATCH] ksud: turn off auto-detect bootdevice when OS is not android (#1746) --- userspace/ksud/src/boot_patch.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/userspace/ksud/src/boot_patch.rs b/userspace/ksud/src/boot_patch.rs index b518de09..d62d446e 100644 --- a/userspace/ksud/src/boot_patch.rs +++ b/userspace/ksud/src/boot_patch.rs @@ -547,6 +547,10 @@ fn find_boot_image( ensure!(image.exists(), "boot image not found"); bootimage = std::fs::canonicalize(image)?; } else { + if cfg!(not(target_os = "android")) { + println!("- Current OS is not android, refusing auto bootimage/bootdevice detection"); + bail!("please specify a boot image"); + } let mut slot_suffix = utils::getprop("ro.boot.slot_suffix").unwrap_or_else(|| String::from(""));