qemu: add block device readonly support

So that we can attach it readonly.

Signed-off-by: Peng Tao <bergwolf@hyper.sh>
This commit is contained in:
Peng Tao
2020-02-19 05:21:18 -08:00
committed by Samuel Ortiz
parent 37b0d9c12f
commit 3700c55dd7
4 changed files with 11 additions and 2 deletions

View File

@@ -303,6 +303,8 @@ func TestAppendDeviceBlock(t *testing.T) {
WCE: false,
DisableModern: true,
ROMFile: romfile,
ShareRW: true,
ReadOnly: true,
}
if blkdev.Transport.isVirtioCCW(nil) {
blkdev.DevNo = DevNo