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 7
7
8
8
use std:: fmt:: { Debug , Write } ;
9
9
use std:: mem:: offset_of;
10
- use std:: path:: PathBuf ;
11
10
12
11
use kvm_bindings:: * ;
13
12
use kvm_ioctls:: { VcpuExit , VcpuFd , VmFd } ;
@@ -48,9 +47,7 @@ pub enum VcpuArchError {
48
47
/// Extract the Manufacturer ID from the host.
49
48
/// The ID is found between bits 24-31 of MIDR_EL1 register.
50
49
pub 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" ;
54
51
let midr_el1 = std:: fs:: read_to_string ( midr_el1_path) . map_err ( |err| {
55
52
VcpuArchError :: GetMidrEl1 ( format ! ( "Failed to get MIDR_EL1 from host path: {err}" ) )
56
53
} ) ?;
You can’t perform that action at this time.
0 commit comments