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>
This commit is contained in:
Jorge E. Moreira 2021-06-16 15:47:07 -07:00 committed by Commit Bot
parent f78b278d0f
commit 7cbfbb599f

View file

@ -6,9 +6,9 @@ use crate::virtio::snd::constants::*;
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 @@ pub enum Error {
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 @@ impl VioSClient {
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 @@ impl VioSClient {
tx_shm_fd,
rx_socket_fd,
rx_shm_fd,
recv_event,
]
}