trivial patches for 2017-06-05

-----BEGIN PGP SIGNATURE-----
 
 iQFDBAABCAAtFiEEe3O61ovnosKJMUsicBtPaxppPlkFAlk1aXIPHG1qdEB0bHMu
 bXNrLnJ1AAoJEHAbT2saaT5ZqjEH/2frHZcYDtlcCVXTb2JoQH37wfw4/r/JAbj6
 HcqIv6UWyzlZRvsmspv4rdGExE4b9EIDtTM4kfPSAx2AmizuwoNeFFrHDTk7dWdr
 5LV1YyUV9zzNOi5l6xPRFnyqLN/i3cYjx7XyRg9eo77DF6L2qb3pwy1ewlNcjrrp
 F+QO1kKsCrC18V9pPfXnfOg3OvlXsKul5WhvsZu+B7SEWvo0V/ARb6VrEBKpDQu5
 EYr8BlSFeD6z4EbxZ978m6uUI6TJZf5iTtuAwi9A2V5BKVgdhHMCgo7gV79CQgcV
 tkISCg3XoJVNEAVryivzrbsmQvwsNEqKn8CQtiD5jHxT+6fOBGE=
 =TThj
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/mjt/tags/trivial-patches-fetch' into staging

trivial patches for 2017-06-05

# gpg: Signature made Mon 05 Jun 2017 15:23:46 BST
# gpg:                using RSA key 0x701B4F6B1A693E59
# gpg: Good signature from "Michael Tokarev <mjt@tls.msk.ru>"
# gpg:                 aka "Michael Tokarev <mjt@corpit.ru>"
# gpg:                 aka "Michael Tokarev <mjt@debian.org>"
# Primary key fingerprint: 6EE1 95D1 886E 8FFB 810D  4324 457C E0A0 8044 65C5
#      Subkey fingerprint: 7B73 BAD6 8BE7 A2C2 8931  4B22 701B 4F6B 1A69 3E59

* remotes/mjt/tags/trivial-patches-fetch: (21 commits)
  hw/core: nmi.c can be compiled as common-obj nowadays
  dump: fix memory_mapping_filter leak
  ide-test: check return of fwrite
  help: Add newline to end of thread option help text
  qemu-ga: remove useless allocation
  scsi/lsi53c895a: Remove unused lsi_mem_*() return value
  qapi: Fix some QMP documentation regressions
  hw/mips: add missing include
  register: display register prefix (name) since it is available
  hw/sparc: use ARRAY_SIZE() macro
  hw/xtensa: sim: use g_string/g_new
  target/arm: add data cache invalidation cp15 instruction to cortex-r5
  block: Correct documentation for BLOCK_WRITE_THRESHOLD
  trivial: Remove unneeded ifndef in memory.h
  altera_timer: fix incorrect memset
  configure: Detect native NetBSD curses(3)
  tests/libqtest: Print error instead of aborting when env variable is missing
  docs/qdev-device-use.txt: update section Default Devices
  docs qemu-doc: Avoid ide-drive, it's deprecated
  qemu-doc: Add hyperlinks to further license information
  ...

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
Peter Maydell 2017-06-05 15:28:12 +01:00
commit 199e19ee53
20 changed files with 69 additions and 63 deletions

3
configure vendored
View File

@ -3042,14 +3042,13 @@ if test "$curses" != "no" ; then
#include <curses.h> #include <curses.h>
#include <wchar.h> #include <wchar.h>
int main(void) { int main(void) {
const char *s = curses_version();
wchar_t wch = L'w'; wchar_t wch = L'w';
setlocale(LC_ALL, ""); setlocale(LC_ALL, "");
resize_term(0, 0); resize_term(0, 0);
addwstr(L"wide chars\n"); addwstr(L"wide chars\n");
addnwstr(&wch, 1); addnwstr(&wch, 1);
add_wch(WACS_DEGREE); add_wch(WACS_DEGREE);
return s != 0; return 0;
} }
EOF EOF
IFS=: IFS=:

View File

@ -13,7 +13,7 @@ Let's assume we have a QEMU machine with two NICs (virtio, e1000) and two
disks (IDE, virtio): disks (IDE, virtio):
qemu -drive file=disk1.img,if=none,id=disk1 qemu -drive file=disk1.img,if=none,id=disk1
-device ide-drive,drive=disk1,bootindex=4 -device ide-hd,drive=disk1,bootindex=4
-drive file=disk2.img,if=none,id=disk2 -drive file=disk2.img,if=none,id=disk2
-device virtio-blk-pci,drive=disk2,bootindex=3 -device virtio-blk-pci,drive=disk2,bootindex=3
-netdev type=user,id=net0 -device virtio-net-pci,netdev=net0,bootindex=2 -netdev type=user,id=net0 -device virtio-net-pci,netdev=net0,bootindex=2

View File

@ -31,8 +31,8 @@ A QEMU block device (drive) has a host and a guest part.
In the general case, the guest device is connected to a controller In the general case, the guest device is connected to a controller
device. For instance, the IDE controller provides two IDE buses, each device. For instance, the IDE controller provides two IDE buses, each
of which can have up to two ide-drive devices, and each ide-drive of which can have up to two devices, and each device is a guest part,
device is a guest part, and is connected to a host part. and is connected to a host part.
Except we sometimes lump controller, bus(es) and drive device(s) all Except we sometimes lump controller, bus(es) and drive device(s) all
together into a single device. For instance, the ISA floppy together into a single device. For instance, the ISA floppy
@ -399,12 +399,13 @@ type.
some DEVNAMEs: some DEVNAMEs:
default device suppressing DEVNAMEs default device suppressing DEVNAMEs
CD-ROM ide-cd, ide-drive, scsi-cd CD-ROM ide-cd, ide-drive, ide-hd, scsi-cd, scsi-hd
isa-fdc's driveA isa-fdc isa-fdc's driveA floppy, isa-fdc
parallel isa-parallel parallel isa-parallel
serial isa-serial serial isa-serial
VGA VGA, cirrus-vga, vmware-svga VGA VGA, cirrus-vga, isa-vga, isa-cirrus-vga,
virtioconsole virtio-serial-pci, virtio-serial-s390, virtio-serial vmware-svga, qxl-vga, virtio-vga
virtioconsole virtio-serial-pci, virtio-serial
The default NIC is connected to a default part created along with it. The default NIC is connected to a default part created along with it.
It is *not* suppressed by configuring a NIC with -device (you may call It is *not* suppressed by configuring a NIC with -device (you may call

View File

@ -5,7 +5,7 @@ common-obj-y += fw-path-provider.o
# irq.o needed for qdev GPIO handling: # irq.o needed for qdev GPIO handling:
common-obj-y += irq.o common-obj-y += irq.o
common-obj-y += hotplug.o common-obj-y += hotplug.o
obj-y += nmi.o common-obj-y += nmi.o
common-obj-$(CONFIG_EMPTY_SLOT) += empty_slot.o common-obj-$(CONFIG_EMPTY_SLOT) += empty_slot.o
common-obj-$(CONFIG_XILINX_AXI) += stream.o common-obj-$(CONFIG_XILINX_AXI) += stream.o

View File

@ -195,8 +195,8 @@ void register_write_memory(void *opaque, hwaddr addr,
} }
if (!reg) { if (!reg) {
qemu_log_mask(LOG_GUEST_ERROR, "Write to unimplemented register at " \ qemu_log_mask(LOG_GUEST_ERROR, "%s: write to unimplemented register " \
"address: %#" PRIx64 "\n", addr); "at address: %#" PRIx64 "\n", reg_array->prefix, addr);
return; return;
} }
@ -224,8 +224,8 @@ uint64_t register_read_memory(void *opaque, hwaddr addr,
} }
if (!reg) { if (!reg) {
qemu_log_mask(LOG_GUEST_ERROR, "Read to unimplemented register at " \ qemu_log_mask(LOG_GUEST_ERROR, "%s: read to unimplemented register " \
"address: %#" PRIx64 "\n", addr); "at address: %#" PRIx64 "\n", reg_array->prefix, addr);
return 0; return 0;
} }

View File

@ -408,27 +408,25 @@ static void lsi_reg_writeb(LSIState *s, int offset, uint8_t val);
static void lsi_execute_script(LSIState *s); static void lsi_execute_script(LSIState *s);
static void lsi_reselect(LSIState *s, lsi_request *p); static void lsi_reselect(LSIState *s, lsi_request *p);
static inline int lsi_mem_read(LSIState *s, dma_addr_t addr, static inline void lsi_mem_read(LSIState *s, dma_addr_t addr,
void *buf, dma_addr_t len) void *buf, dma_addr_t len)
{ {
if (s->dmode & LSI_DMODE_SIOM) { if (s->dmode & LSI_DMODE_SIOM) {
address_space_read(&s->pci_io_as, addr, MEMTXATTRS_UNSPECIFIED, address_space_read(&s->pci_io_as, addr, MEMTXATTRS_UNSPECIFIED,
buf, len); buf, len);
return 0;
} else { } else {
return pci_dma_read(PCI_DEVICE(s), addr, buf, len); pci_dma_read(PCI_DEVICE(s), addr, buf, len);
} }
} }
static inline int lsi_mem_write(LSIState *s, dma_addr_t addr, static inline void lsi_mem_write(LSIState *s, dma_addr_t addr,
const void *buf, dma_addr_t len) const void *buf, dma_addr_t len)
{ {
if (s->dmode & LSI_DMODE_DIOM) { if (s->dmode & LSI_DMODE_DIOM) {
address_space_write(&s->pci_io_as, addr, MEMTXATTRS_UNSPECIFIED, address_space_write(&s->pci_io_as, addr, MEMTXATTRS_UNSPECIFIED,
buf, len); buf, len);
return 0;
} else { } else {
return pci_dma_write(PCI_DEVICE(s), addr, buf, len); pci_dma_write(PCI_DEVICE(s), addr, buf, len);
} }
} }

View File

@ -214,7 +214,7 @@ static void isa_irq_handler(void *opaque, int n, int level)
qemu_irq *irqs = opaque; qemu_irq *irqs = opaque;
int ivec; int ivec;
assert(n < 16); assert(n < ARRAY_SIZE(isa_irq_to_ivec));
ivec = isa_irq_to_ivec[n]; ivec = isa_irq_to_ivec[n];
EBUS_DPRINTF("Set ISA IRQ %d level %d -> ivec 0x%x\n", n, level, ivec); EBUS_DPRINTF("Set ISA IRQ %d level %d -> ivec 0x%x\n", n, level, ivec);
if (ivec) { if (ivec) {

View File

@ -204,7 +204,7 @@ static void altera_timer_reset(DeviceState *dev)
ptimer_stop(t->ptimer); ptimer_stop(t->ptimer);
ptimer_set_limit(t->ptimer, 0xffffffff, 1); ptimer_set_limit(t->ptimer, 0xffffffff, 1);
memset(t->regs, 0, ARRAY_SIZE(t->regs)); memset(t->regs, 0, sizeof(t->regs));
} }
static Property altera_timer_properties[] = { static Property altera_timer_properties[] = {

View File

@ -41,21 +41,21 @@ static void xtensa_create_memory_regions(const XtensaMemory *memory,
const char *name) const char *name)
{ {
unsigned i; unsigned i;
char *num_name = malloc(strlen(name) + sizeof(i) * 3 + 1); GString *num_name = g_string_new(NULL);
for (i = 0; i < memory->num; ++i) { for (i = 0; i < memory->num; ++i) {
MemoryRegion *m; MemoryRegion *m;
sprintf(num_name, "%s%u", name, i); g_string_printf(num_name, "%s%u", name, i);
m = g_malloc(sizeof(*m)); m = g_new(MemoryRegion, 1);
memory_region_init_ram(m, NULL, num_name, memory_region_init_ram(m, NULL, num_name->str,
memory->location[i].size, memory->location[i].size,
&error_fatal); &error_fatal);
vmstate_register_ram_global(m); vmstate_register_ram_global(m);
memory_region_add_subregion(get_system_memory(), memory_region_add_subregion(get_system_memory(),
memory->location[i].addr, m); memory->location[i].addr, m);
} }
free(num_name); g_string_free(num_name, true);
} }
static uint64_t translate_phys_addr(void *opaque, uint64_t addr) static uint64_t translate_phys_addr(void *opaque, uint64_t addr)

View File

@ -17,9 +17,7 @@
#ifndef CONFIG_USER_ONLY #ifndef CONFIG_USER_ONLY
#include "exec/cpu-common.h" #include "exec/cpu-common.h"
#ifndef CONFIG_USER_ONLY
#include "exec/hwaddr.h" #include "exec/hwaddr.h"
#endif
#include "exec/memattrs.h" #include "exec/memattrs.h"
#include "exec/ramlist.h" #include "exec/ramlist.h"
#include "qemu/queue.h" #include "qemu/queue.h"

View File

@ -6,6 +6,7 @@
#define INITRD_PAGE_MASK (~((1 << 16) - 1)) #define INITRD_PAGE_MASK (~((1 << 16) - 1))
#include "exec/memory.h" #include "exec/memory.h"
#include "hw/irq.h"
/* gt64xxx.c */ /* gt64xxx.c */
PCIBus *gt64120_register(qemu_irq *pic); PCIBus *gt64120_register(qemu_irq *pic);

View File

@ -337,6 +337,7 @@ void memory_mapping_filter(MemoryMappingList *list, int64_t begin,
if (cur->phys_addr >= begin + length || if (cur->phys_addr >= begin + length ||
cur->phys_addr + cur->length <= begin) { cur->phys_addr + cur->length <= begin) {
QTAILQ_REMOVE(&list->head, cur, next); QTAILQ_REMOVE(&list->head, cur, next);
g_free(cur);
list->num--; list->num--;
continue; continue;
} }

View File

@ -1206,11 +1206,11 @@
# Example: # Example:
# #
# -> { "execute": "blockdev-add", # -> { "execute": "blockdev-add",
# "arguments": { "options": { "driver": "qcow2", # "arguments": { "driver": "qcow2",
# "node-name": "node1534", # "node-name": "node1534",
# "file": { "driver": "file", # "file": { "driver": "file",
# "filename": "hd1.qcow2" }, # "filename": "hd1.qcow2" },
# "backing": "" } } } # "backing": "" } }
# #
# <- { "return": {} } # <- { "return": {} }
# #
@ -3214,7 +3214,7 @@
# <- { "return": {} } # <- { "return": {} }
# #
# -> { "execute": "x-blockdev-remove-medium", # -> { "execute": "x-blockdev-remove-medium",
# "arguments": { "device": "ide0-1-0" } } # "arguments": { "id": "ide0-1-0" } }
# #
# <- { "return": {} } # <- { "return": {} }
# #
@ -3245,10 +3245,10 @@
# #
# -> { "execute": "blockdev-add", # -> { "execute": "blockdev-add",
# "arguments": { # "arguments": {
# "options": { "node-name": "node0", # "node-name": "node0",
# "driver": "raw", # "driver": "raw",
# "file": { "driver": "file", # "file": { "driver": "file",
# "filename": "fedora.iso" } } } } # "filename": "fedora.iso" } } }
# <- { "return": {} } # <- { "return": {} }
# #
# -> { "execute": "x-blockdev-insert-medium", # -> { "execute": "x-blockdev-insert-medium",
@ -3624,7 +3624,7 @@
# means the device should be extended to avoid pausing for # means the device should be extended to avoid pausing for
# disk exhaustion. # disk exhaustion.
# The event is one shot. Once triggered, it needs to be # The event is one shot. Once triggered, it needs to be
# re-registered with another block-set-threshold command. # re-registered with another block-set-write-threshold command.
# #
# @node-name: graph node name on which the threshold was exceeded. # @node-name: graph node name on which the threshold was exceeded.
# #
@ -3701,10 +3701,10 @@
# 1. Add a new node to a quorum # 1. Add a new node to a quorum
# -> { "execute": "blockdev-add", # -> { "execute": "blockdev-add",
# "arguments": { # "arguments": {
# "options": { "driver": "raw", # "driver": "raw",
# "node-name": "new_node", # "node-name": "new_node",
# "file": { "driver": "file", # "file": { "driver": "file",
# "filename": "test.raw" } } } } # "filename": "test.raw" } } }
# <- { "return": {} } # <- { "return": {} }
# -> { "execute": "x-blockdev-change", # -> { "execute": "x-blockdev-change",
# "arguments": { "parent": "disk1", # "arguments": { "parent": "disk1",

View File

@ -180,7 +180,7 @@
# #
# Example: # Example:
# #
# -> { "execute": "eject", "arguments": { "device": "ide1-0-1" } } # -> { "execute": "eject", "arguments": { "id": "ide1-0-1" } }
# <- { "return": {} } # <- { "return": {} }
## ##
{ 'command': 'eject', { 'command': 'eject',

View File

@ -34,6 +34,7 @@
* Introduction:: * Introduction::
* QEMU PC System emulator:: * QEMU PC System emulator::
* QEMU System emulator for non PC targets:: * QEMU System emulator for non PC targets::
* QEMU Guest Agent::
* QEMU User space emulator:: * QEMU User space emulator::
* Implementation notes:: * Implementation notes::
* License:: * License::
@ -396,7 +397,6 @@ snapshots.
* vm_snapshots:: VM snapshots * vm_snapshots:: VM snapshots
* qemu_img_invocation:: qemu-img Invocation * qemu_img_invocation:: qemu-img Invocation
* qemu_nbd_invocation:: qemu-nbd Invocation * qemu_nbd_invocation:: qemu-nbd Invocation
* qemu_ga_invocation:: qemu-ga Invocation
* disk_images_formats:: Disk image file formats * disk_images_formats:: Disk image file formats
* host_drives:: Using host drives * host_drives:: Using host drives
* disk_images_fat_images:: Virtual FAT disk images * disk_images_fat_images:: Virtual FAT disk images
@ -490,11 +490,6 @@ state is not saved or restored properly (in particular USB).
@include qemu-nbd.texi @include qemu-nbd.texi
@node qemu_ga_invocation
@subsection @code{qemu-ga} Invocation
@include qemu-ga.texi
@node disk_images_formats @node disk_images_formats
@subsection Disk image file formats @subsection Disk image file formats
@ -2685,6 +2680,12 @@ Note that this allows guest direct access to the host filesystem,
so should only be used with trusted guest OS. so should only be used with trusted guest OS.
@end table @end table
@node QEMU Guest Agent
@chapter QEMU Guest Agent invocation
@include qemu-ga.texi
@node QEMU User space emulator @node QEMU User space emulator
@chapter QEMU User space emulator @chapter QEMU User space emulator
@ -3020,10 +3021,10 @@ Run the emulation in single step mode.
QEMU is a trademark of Fabrice Bellard. QEMU is a trademark of Fabrice Bellard.
QEMU is released under the GNU General Public License (TODO: add link). QEMU is released under the
Parts of QEMU have specific licenses, see file LICENSE. @url{https://www.gnu.org/licenses/gpl-2.0.txt,GNU General Public License},
version 2. Parts of QEMU have specific licenses, see file
TODO (refer to file LICENSE, include it, include the GPL?) @url{http://git.qemu.org/?p=qemu.git;a=blob_plain;f=LICENSE,LICENSE}.
@node Index @node Index
@appendix Index @appendix Index

View File

@ -102,7 +102,7 @@ ETEXI
DEF("accel", HAS_ARG, QEMU_OPTION_accel, DEF("accel", HAS_ARG, QEMU_OPTION_accel,
"-accel [accel=]accelerator[,thread=single|multi]\n" "-accel [accel=]accelerator[,thread=single|multi]\n"
" select accelerator (kvm, xen, hax or tcg; use 'help' for a list)\n" " select accelerator (kvm, xen, hax or tcg; use 'help' for a list)\n"
" thread=single|multi (enable multi-threaded TCG)", QEMU_ARCH_ALL) " thread=single|multi (enable multi-threaded TCG)\n", QEMU_ARCH_ALL)
STEXI STEXI
@item -accel @var{name}[,prop=@var{value}[,...]] @item -accel @var{name}[,prop=@var{value}[,...]]
@findex -accel @findex -accel
@ -262,7 +262,7 @@ STEXI
Set default value of @var{driver}'s property @var{prop} to @var{value}, e.g.: Set default value of @var{driver}'s property @var{prop} to @var{value}, e.g.:
@example @example
qemu-system-i386 -global ide-drive.physical_block_size=4096 -drive file=file,if=ide,index=0,media=disk qemu-system-i386 -global ide-hd.physical_block_size=4096 disk-image.img
@end example @end example
In particular, you can use this to set driver properties for devices which are In particular, you can use this to set driver properties for devices which are

View File

@ -2197,12 +2197,10 @@ static void transfer_memory_block(GuestMemoryBlock *mem_blk, bool sys2memblk,
} }
} else { } else {
if (mem_blk->online != (strncmp(status, "online", 6) == 0)) { if (mem_blk->online != (strncmp(status, "online", 6) == 0)) {
char *new_state = mem_blk->online ? g_strdup("online") : const char *new_state = mem_blk->online ? "online" : "offline";
g_strdup("offline");
ga_write_sysfs_file(dirfd, "state", new_state, strlen(new_state), ga_write_sysfs_file(dirfd, "state", new_state, strlen(new_state),
&local_err); &local_err);
g_free(new_state);
if (local_err) { if (local_err) {
error_free(local_err); error_free(local_err);
result->response = result->response =

View File

@ -1082,6 +1082,8 @@ static const ARMCPRegInfo cortexr5_cp_reginfo[] = {
.access = PL1_RW, .type = ARM_CP_CONST }, .access = PL1_RW, .type = ARM_CP_CONST },
{ .name = "BTCM", .cp = 15, .opc1 = 0, .crn = 9, .crm = 1, .opc2 = 1, { .name = "BTCM", .cp = 15, .opc1 = 0, .crn = 9, .crm = 1, .opc2 = 1,
.access = PL1_RW, .type = ARM_CP_CONST }, .access = PL1_RW, .type = ARM_CP_CONST },
{ .name = "DCACHE_INVAL", .cp = 15, .opc1 = 0, .crn = 15, .crm = 5,
.opc2 = 0, .access = PL1_W, .type = ARM_CP_NOP },
REGINFO_SENTINEL REGINFO_SENTINEL
}; };

View File

@ -796,11 +796,13 @@ static void cdrom_pio_impl(int nblocks)
int i, j; int i, j;
uint8_t data; uint8_t data;
uint16_t limit; uint16_t limit;
size_t ret;
/* Prepopulate the CDROM with an interesting pattern */ /* Prepopulate the CDROM with an interesting pattern */
generate_pattern(pattern, patt_len, ATAPI_BLOCK_SIZE); generate_pattern(pattern, patt_len, ATAPI_BLOCK_SIZE);
fh = fopen(tmp_path, "w+"); fh = fopen(tmp_path, "w+");
fwrite(pattern, ATAPI_BLOCK_SIZE, patt_blocks, fh); ret = fwrite(pattern, ATAPI_BLOCK_SIZE, patt_blocks, fh);
g_assert_cmpint(ret, ==, patt_blocks);
fclose(fh); fclose(fh);
ide_test_start("-drive if=none,file=%s,media=cdrom,format=raw,id=sr0,index=0 " ide_test_start("-drive if=none,file=%s,media=cdrom,format=raw,id=sr0,index=0 "
@ -880,6 +882,7 @@ static void test_cdrom_pio_large(void)
static void test_cdrom_dma(void) static void test_cdrom_dma(void)
{ {
static const size_t len = ATAPI_BLOCK_SIZE; static const size_t len = ATAPI_BLOCK_SIZE;
size_t ret;
char *pattern = g_malloc(ATAPI_BLOCK_SIZE * 16); char *pattern = g_malloc(ATAPI_BLOCK_SIZE * 16);
char *rx = g_malloc0(len); char *rx = g_malloc0(len);
uintptr_t guest_buf; uintptr_t guest_buf;
@ -896,7 +899,8 @@ static void test_cdrom_dma(void)
generate_pattern(pattern, ATAPI_BLOCK_SIZE * 16, ATAPI_BLOCK_SIZE); generate_pattern(pattern, ATAPI_BLOCK_SIZE * 16, ATAPI_BLOCK_SIZE);
fh = fopen(tmp_path, "w+"); fh = fopen(tmp_path, "w+");
fwrite(pattern, ATAPI_BLOCK_SIZE, 16, fh); ret = fwrite(pattern, ATAPI_BLOCK_SIZE, 16, fh);
g_assert_cmpint(ret, ==, 16);
fclose(fh); fclose(fh);
send_dma_request(CMD_PACKET, 0, 1, prdt, 1, send_scsi_cdb_read10); send_dma_request(CMD_PACKET, 0, 1, prdt, 1, send_scsi_cdb_read10);

View File

@ -160,7 +160,10 @@ QTestState *qtest_init_without_qmp_handshake(const char *extra_args)
const char *qemu_binary; const char *qemu_binary;
qemu_binary = getenv("QTEST_QEMU_BINARY"); qemu_binary = getenv("QTEST_QEMU_BINARY");
g_assert(qemu_binary != NULL); if (!qemu_binary) {
fprintf(stderr, "Environment variable QTEST_QEMU_BINARY required\n");
exit(1);
}
s = g_malloc(sizeof(*s)); s = g_malloc(sizeof(*s));