Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion userspace/ksud/src/boot_patch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -399,6 +399,7 @@ fn find_magiskboot(magiskboot_path: Option<PathBuf>, workdir: &Path) -> Result<P
Ok(magiskboot)
}

#[cfg_attr(not(target_os = "android"), allow(unused_variables))]
fn find_boot_image(
image: &Option<PathBuf>,
kmi: &str,
Expand All @@ -408,10 +409,11 @@ fn find_boot_image(
partition: &Option<String>,
) -> Result<(PathBuf, Option<String>)> {
let bootimage;
let mut bootdevice = None;
let bootdevice;
if let Some(ref image) = *image {
ensure!(image.exists(), "boot image not found");
bootimage = std::fs::canonicalize(image)?;
bootdevice = None;
} else {
#[cfg(not(target_os = "android"))]
{
Expand Down
1 change: 1 addition & 0 deletions userspace/ksud/src/defs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ mod android {
pub const BACKUP_FILENAME: &str = "stock_image.sha1";
}

#[cfg_attr(not(target_os = "android"), allow(dead_code))]
pub const VERSION_CODE: &str = include_str!(concat!(env!("OUT_DIR"), "/VERSION_CODE"));
pub const VERSION_NAME: &str = include_str!(concat!(env!("OUT_DIR"), "/VERSION_NAME"));

Expand Down
Loading