From c90c64272cb84f01147885ef8e3fe8f1b976ca61 Mon Sep 17 00:00:00 2001 From: Manos Pitsidianakis Date: Mon, 10 Nov 2025 10:03:59 +0200 Subject: [PATCH] can: fix VirtioCan{Tx,Ctrl}Response definition Signed-off-by: Manos Pitsidianakis --- vhost-device-can/src/virtio_can.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/vhost-device-can/src/virtio_can.rs b/vhost-device-can/src/virtio_can.rs index 1ff422c..90dbe5a 100644 --- a/vhost-device-can/src/virtio_can.rs +++ b/vhost-device-can/src/virtio_can.rs @@ -70,11 +70,10 @@ unsafe impl ByteValued for VirtioCanConfig {} /// /// The response message is a stream of bytes, where first byte represents the /// status, and rest is message specific data. - #[derive(Copy, Clone, Default)] #[repr(C)] pub struct VirtioCanTxResponse { - pub result: i8, + pub result: u8, } // SAFETY: The layout of the structure is fixed and can be initialized by @@ -136,7 +135,7 @@ unsafe impl ByteValued for VirtioCanCtrlRequest {} #[derive(Copy, Clone, Default)] #[repr(C)] pub struct VirtioCanCtrlResponse { - pub result: i8, + pub result: u8, } // SAFETY: The layout of the structure is fixed and can be initialized by