You've already forked Magisk
mirror of
https://github.com/topjohnwu/Magisk.git
synced 2025-09-06 06:36:58 +00:00
Address several clippy warnings
This commit is contained in:
@@ -1,23 +1,33 @@
|
||||
use crate::ffi::{backup_init, BootConfig, MagiskInit};
|
||||
use base::{debug, path, BytesExt, MappedFile};
|
||||
use std::ffi::CStr;
|
||||
use base::{path, BytesExt, MappedFile};
|
||||
|
||||
impl BootConfig {
|
||||
#[allow(unused_imports, unused_unsafe)]
|
||||
pub(crate) fn print(&self) {
|
||||
use base::{debug, Utf8CStr};
|
||||
debug!("skip_initramfs=[{}]", self.skip_initramfs);
|
||||
debug!("force_normal_boot=[{}]", self.force_normal_boot);
|
||||
debug!("rootwait=[{}]", self.rootwait);
|
||||
unsafe {
|
||||
debug!("slot=[{:?}]", CStr::from_ptr(self.slot.as_ptr()));
|
||||
debug!("dt_dir=[{:?}]", CStr::from_ptr(self.dt_dir.as_ptr()));
|
||||
debug!(
|
||||
"fstab_suffix=[{:?}]",
|
||||
CStr::from_ptr(self.fstab_suffix.as_ptr())
|
||||
"slot=[{}]",
|
||||
Utf8CStr::from_ptr_unchecked(self.slot.as_ptr())
|
||||
);
|
||||
debug!("hardware=[{:?}]", CStr::from_ptr(self.hardware.as_ptr()));
|
||||
debug!(
|
||||
"hardware.platform=[{:?}]",
|
||||
CStr::from_ptr(self.hardware_plat.as_ptr())
|
||||
"dt_dir=[{}]",
|
||||
Utf8CStr::from_ptr_unchecked(self.dt_dir.as_ptr())
|
||||
);
|
||||
debug!(
|
||||
"fstab_suffix=[{}]",
|
||||
Utf8CStr::from_ptr_unchecked(self.fstab_suffix.as_ptr())
|
||||
);
|
||||
debug!(
|
||||
"hardware=[{}]",
|
||||
Utf8CStr::from_ptr_unchecked(self.hardware.as_ptr())
|
||||
);
|
||||
debug!(
|
||||
"hardware.platform=[{}]",
|
||||
Utf8CStr::from_ptr_unchecked(self.hardware_plat.as_ptr())
|
||||
);
|
||||
}
|
||||
debug!("emulator=[{}]", self.emulator);
|
||||
|
||||
@@ -81,6 +81,7 @@ impl MagiskInit {
|
||||
|
||||
// Redirect original init to magiskinit
|
||||
let v = map.patch(from.as_bytes(), to.as_bytes());
|
||||
#[allow(unused_variables)]
|
||||
for off in &v {
|
||||
debug!("Patch @ {:#010X} [{}] -> [{}]", off, from, to);
|
||||
}
|
||||
@@ -100,6 +101,7 @@ impl MagiskInit {
|
||||
|
||||
// Redirect original init to magiskinit
|
||||
let v = map.patch(from.as_bytes(), to.as_bytes());
|
||||
#[allow(unused_variables)]
|
||||
for off in &v {
|
||||
debug!("Patch @ {:#010X} [{}] -> [{}]", off, from, to);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user