block: allow VIRTIO_BLK_T_GET_ID for read-only devices
https://github.com/cloud-hypervisor/cloud-hypervisor/pull/7294 adjusted the checks for read-only requests made to virtio-blk devices and started rejecting VIRTIO_BLK_T_GET_ID requests. These requests do not perform any writes and are needed in order to access device serials from within the guest. Signed-off-by: Connor Brewster <cbrewster@hey.com>
This commit is contained in:
parent
8de24b5f08
commit
41a8dcd9ba
2 changed files with 4 additions and 2 deletions
|
|
@ -136,7 +136,7 @@ pub enum ExecuteError {
|
|||
Read(#[source] GuestMemoryError),
|
||||
#[error("Failed to read_exact")]
|
||||
ReadExact(#[source] io::Error),
|
||||
#[error("Can't execute an operation other than `read` on a read-only device")]
|
||||
#[error("Can't execute an operation other than `read` or `get_id` on a read-only device")]
|
||||
ReadOnly,
|
||||
#[error("Failed to seek")]
|
||||
Seek(#[source] io::Error),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue