Fixes typo and adds missing fd to keep_fd list in vios_client BUG=b:191297702 Change-Id: I677a35ce961a35d68a39b1ee9e6aa6180b010afe Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/2983387 Auto-Submit: Jorge Moreira Broche <jemoreira@google.com> Reviewed-by: Chih-Yang Hsia <paulhsia@chromium.org> Commit-Queue: Jorge Moreira Broche <jemoreira@google.com> Tested-by: kokoro <noreply+kokoro@google.com>
diff --git a/devices/src/virtio/snd/vios_backend/shm_vios.rs b/devices/src/virtio/snd/vios_backend/shm_vios.rs index 21a2d62..9aec672 100644 --- a/devices/src/virtio/snd/vios_backend/shm_vios.rs +++ b/devices/src/virtio/snd/vios_backend/shm_vios.rs
@@ -6,9 +6,9 @@ use crate::virtio::snd::layout::*; use base::{ - error, net::UnixSeqpacket, Error as BaseError, Event, FromRawDescriptor, IntoRawDescriptor, - MemoryMapping, MemoryMappingBuilder, MmapError, PollToken, SafeDescriptor, ScmSocket, - SharedMemory, WaitContext, + error, net::UnixSeqpacket, AsRawDescriptor, Error as BaseError, Event, FromRawDescriptor, + IntoRawDescriptor, MemoryMapping, MemoryMappingBuilder, MmapError, PollToken, SafeDescriptor, + ScmSocket, SharedMemory, WaitContext, }; use data_model::{DataInit, VolatileMemory, VolatileMemoryError}; @@ -53,7 +53,7 @@ NoStreamsAvailable, #[error("No stream with id {0}")] InvalidStreamId(u32), - #[error("Stream is unexpected state: {0:?}")] + #[error("Stream is in unexpected state: {0:?}")] UnexpectedState(StreamState), #[error("Invalid operation for stream direction: {0}")] WrongDirection(u8), @@ -352,6 +352,7 @@ let lock = self.rx.lock(); (lock.socket.as_raw_fd(), lock.file.as_raw_fd()) }; + let recv_event = self.recv_event.lock().as_raw_descriptor(); vec![ control_fd, event_fd, @@ -359,6 +360,7 @@ tx_shm_fd, rx_socket_fd, rx_shm_fd, + recv_event, ] }