mirror of
https://github.com/mbilker/vgpu_unlock-rs.git
synced 2026-06-07 23:57:45 +02:00
nvidia(ctrla081): print whole signature if any byte is non-zero
This commit is contained in:
@@ -76,10 +76,11 @@ pub struct NvA081CtrlCmdVgpuConfigGetMigrationCapParams {
|
|||||||
|
|
||||||
impl fmt::Debug for NvA081CtrlVgpuInfo {
|
impl fmt::Debug for NvA081CtrlVgpuInfo {
|
||||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||||
let vgpu_signature = self.vgpu_signature[..]
|
let vgpu_signature = if self.vgpu_signature[..].iter().any(|&x| x != 0) {
|
||||||
.split(|&x| x == 0)
|
&self.vgpu_signature[..]
|
||||||
.next()
|
} else {
|
||||||
.unwrap_or(&[]);
|
&[]
|
||||||
|
};
|
||||||
let vgpu_extra_params = self.vgpu_extra_params[..]
|
let vgpu_extra_params = self.vgpu_extra_params[..]
|
||||||
.split(|&x| x == 0)
|
.split(|&x| x == 0)
|
||||||
.next()
|
.next()
|
||||||
|
|||||||
Reference in New Issue
Block a user