File tree Expand file tree Collapse file tree 1 file changed +1
-4
lines changed Expand file tree Collapse file tree 1 file changed +1
-4
lines changed Original file line number Diff line number Diff line change 77
88use std:: fmt:: { Debug , Write } ;
99use std:: mem:: offset_of;
10- use std:: path:: PathBuf ;
1110
1211use kvm_bindings:: * ;
1312use kvm_ioctls:: { VcpuExit , VcpuFd , VmFd } ;
@@ -48,9 +47,7 @@ pub enum VcpuArchError {
4847/// Extract the Manufacturer ID from the host.
4948/// The ID is found between bits 24-31 of MIDR_EL1 register.
5049pub fn get_manufacturer_id_from_host ( ) -> Result < u32 , VcpuArchError > {
51- let midr_el1_path =
52- & PathBuf :: from ( "/sys/devices/system/cpu/cpu0/regs/identification/midr_el1" . to_string ( ) ) ;
53-
50+ let midr_el1_path = "/sys/devices/system/cpu/cpu0/regs/identification/midr_el1" ;
5451 let midr_el1 = std:: fs:: read_to_string ( midr_el1_path) . map_err ( |err| {
5552 VcpuArchError :: GetMidrEl1 ( format ! ( "Failed to get MIDR_EL1 from host path: {err}" ) )
5653 } ) ?;
You can’t perform that action at this time.
0 commit comments