Skip to content

Commit efe8f72

Browse files
committed
chore: Remove unused VsockError::BufDescMissing
With the vsock code no longer asserting that every vsock packet has two packets, this error variant was no longer constructed. It's only use was in a unittest elsewhere, that tested that a vsock error was properly propagated (however, this test does not require this specific error, so we can reuse a different variant as the dummy value). Signed-off-by: Patrick Roy <[email protected]>
1 parent 0cad07e commit efe8f72

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

src/vmm/src/devices/virtio/vsock/mod.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,6 @@ mod defs {
110110
pub enum VsockError {
111111
/// The vsock data/buffer virtio descriptor length is smaller than expected.
112112
BufDescTooSmall,
113-
/// The vsock data/buffer virtio descriptor is expected, but missing.
114-
BufDescMissing,
115113
/// Empty queue
116114
EmptyQueue,
117115
/// EventFd error: {0}

src/vmm/src/rpc_interface.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1012,7 +1012,7 @@ mod tests {
10121012
pub fn set_vsock_device(&mut self, _: VsockDeviceConfig) -> Result<(), VsockConfigError> {
10131013
if self.force_errors {
10141014
return Err(VsockConfigError::CreateVsockDevice(
1015-
VsockError::BufDescMissing,
1015+
VsockError::GuestMemoryBounds,
10161016
));
10171017
}
10181018
self.vsock_set = true;
@@ -1471,7 +1471,7 @@ mod tests {
14711471
check_preboot_request_err(
14721472
req,
14731473
VmmActionError::VsockConfig(VsockConfigError::CreateVsockDevice(
1474-
VsockError::BufDescMissing,
1474+
VsockError::GuestMemoryBounds,
14751475
)),
14761476
);
14771477
}

0 commit comments

Comments
 (0)