blockdev: Clean up how readonly persists across virtual media change
Since commit cb4e5f8e, monitor command change makes the new mediareadonly iff the type hint is BDRV_TYPE_CDROM, i.e. the drive wascreated with media=cdrom. The intention is to avoid changing a block...
block migration: Fix test for read-only drive
init_blk_migration_it() skips drives with type hint BDRV_TYPE_CDROM.The intention is to skip read-only drives. However, BDRV_TYPE_CDROMis only a hint. It is currently sufficent for read-only. But it'snot necessary, and it may not remain sufficient....
raw-posix: Fix test for host CD-ROM
raw_pread_aligned() retries up to two times if the block device backsa virtual CD-ROM (a drive with media=cdrom and if=ide, scsi, xen ornone). This makes no sense. Whether retrying reads can correct readerrors can only depend on what we're reading, not on how the result...
fdc: Reject unimplemented error actions
drive_init() doesn't permit them for if=floppy, but that's worthless:we get them via if=none and -global.
This can make device initialization fail. Since all callers offdctrl_init_isa() ignore its value, change it to die instead of...
qdev: Don't hw_error() in qdev_init_nofail()
Some of the failures are internal errors, and hw_error() is okay then.But the common way to fail is bad user input, e.g. -globalisa-fdc.driveA=foo where drive foo has an unsupported rerror value.
exit(1) instead....
scsi: Reject unimplemented error actions
drive_init() doesn't permit rerror for if=scsi, but that's worthless:we get it via if=none and -device.
Moreover, scsi-generic doesn't support werror. Since drive_init()doesn't catch that, option werror was silently ignored even with...
error: New qemu_opts_loc_restore()
Needed for decent error locations when complaining about optionsoutside of qemu_opts_foreach(). That one sets the locationalready.
Signed-off-by: Markus Armbruster <armbru@redhat.com>Signed-off-by: Kevin Wolf <kwolf@redhat.com>
scsi: Error locations for -drive if=scsi device initialization
ide: Improve error messages
Use error_report(), because it points to the error location.
Reword "tried to assign twice" messages to make it clear that we'recomplaining about the unit property.
Report invalid unit property instead of failing silently....
ide: Replace IDEState members is_cdrom, is_cf by drive_kind
The two aren't independent variables. Make that obvious.
View all revisions | View revisions
Also available in: Atom