freebsd-ports/emulators/qemu/files/patch-block.c
Juergen Lock 3c8cb897ad Update to 2007-02-03 snapshot:
- Fix `could not open hard disk image '/dev/ad0'' (e.g.) when open(2)
fails with EPERM instead of EACCES for ro devices.
- PIIX4 support, by Aurelien Jarno.
- Gallileo GT64xxx support, by Aurelien Jarno.
- MIPS Malta system and devices support, by Aurelien Jarno and Stefan Weil.
- ARM ELF loader.
- Improved console handling, thanks Stefan Weil.
- Disable Malta floppy controller for now, by Aurelien Jarno.
- Big endian support for Gallileo, by Aurelien Jarno.
- Add more ATAPI CDROM DMA support, by Juergen Keil.
- Add ARM Angel semihosting to system emulation.
- Don't resume guest when gdb connection terminates and -S specified.
- mips: Implementing dmfc/dmtc.
- Fix DMA timeouts on FreeBSD, by Carlo Marcelo Arenas Belon.
- New multiple snapshot support for VMDK, by Igor Lvovsky.
- Add support for 82371FB (Step A1) and Improved support for 82371SB
(Function 1), by Carlo Marcelo Arenas Belon.
- Accept -help.
- Accept --foo as an alias for -foo.
- Add nodelay option for TCP character devices.
- Use standard character device interface for gdbstub.
- GDB hosted syscalls.
- Upgrade the apic version_id, by Don Laor.
- Save some vm space for the regular program loading zone, by
Pierre d'Herbemont
- script=no for the TUN/TAP net option, by Jean-Christian de Rivaz
- Sparc arm/mips/sparc register patch, by Martin Bochnig.
- PIIX4 SMBus host, EEPROM device emulation, by Ed Swierk.
- sem* and msg* for qemu, by Kirill Shutemov.
- And some more bugfixes.

Approved by:	miwi (mentor, implicit)
2007-02-03 22:15:28 +00:00

10 lines
387 B
C

Index: qemu/block.c
@@ -381,7 +381,7 @@
else
open_flags = flags & ~(BDRV_O_FILE | BDRV_O_SNAPSHOT);
ret = drv->bdrv_open(bs, filename, open_flags);
- if (ret == -EACCES && !(flags & BDRV_O_FILE)) {
+ if ((ret == -EACCES || ret == -EPERM) && !(flags & BDRV_O_FILE)) {
ret = drv->bdrv_open(bs, filename, BDRV_O_RDONLY);
bs->read_only = 1;
}