mirror of
https://github.com/mbilker/vgpu_unlock-rs.git
synced 2025-06-08 13:28:23 +02:00
lib: apply profile overrides only on successful status
This commit is contained in:
parent
8bb4f47c9b
commit
3ca0999210
@ -44,7 +44,7 @@ static CONFIG: Config = {
|
||||
|
||||
process::abort();
|
||||
}
|
||||
}
|
||||
},
|
||||
Err(e) => {
|
||||
if e.kind() != ErrorKind::NotFound {
|
||||
eprintln!("Failed to read config: {}", e);
|
||||
@ -337,6 +337,11 @@ pub unsafe extern "C" fn ioctl(fd: RawFd, request: c_ulong, argp: *mut c_void) -
|
||||
// Set device type to vGPU capable.
|
||||
*dev_type_ptr = DEV_TYPE_VGPU_CAPABLE;
|
||||
}
|
||||
_ => {}
|
||||
}
|
||||
|
||||
if io_data.status == STATUS_OK {
|
||||
match io_data.op_type {
|
||||
OP_READ_VGPU_CFG => {
|
||||
let config = &mut *(io_data.result as *mut VgpuConfig);
|
||||
info!("{:#?}", config);
|
||||
@ -354,6 +359,7 @@ pub unsafe extern "C" fn ioctl(fd: RawFd, request: c_ulong, argp: *mut c_void) -
|
||||
}
|
||||
_ => {}
|
||||
}
|
||||
}
|
||||
|
||||
if io_data.status != STATUS_OK {
|
||||
// Things seems to work fine even if some operations that fail result in failed assertions.
|
||||
|
Loading…
x
Reference in New Issue
Block a user