Age | Commit message (Collapse) | Author | Files | Lines |
|
If there is already a fd in s->msgfd before recvmsg it is
closed by parts that this patch does not touch. So, only
one descriptor can be "leaked" by attaching it to a command
other than getfd.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
|
|
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
|
|
So far a multiplexed monitor started disabled. Restore this property for
the new way of configuring by moving the monitor initialization before
all devices (the last one to attach to a char-mux will gain the focus).
Once we have a real use case for that, we may also consider assigning
the initial focus explicitly.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
|
|
Canonicalize the ID assignment when creating monitor devices via the
legacy switch and use less easily colliding names.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
|
|
The 'quit' Monitor command (implemented by do_quit()) calls
exit() directly, this is problematic under QMP because QEMU
exits before having a chance to send the ok response.
Clients don't know if QEMU exited because of a problem or
because the 'quit' command has been executed.
This commit fixes that by moving the exit() call to the main
loop, so that do_quit() requests the system to quit, instead
of calling exit() directly.
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
|
|
Otherwise the following input crashes QEMU:
{ "execute": "migrate", "arguments": "tcp:0:4446" }
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
|
|
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
|
|
The QERR_QMP_BAD_INPUT_OBJECT error is going to be used only
for two problems: the input is not an object or the "execute"
key is missing.
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
|
|
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
|
|
Value stored is never read.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
|
|
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
|
|
Value stored is never read.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
|
|
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
|
|
Value stored is never read.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
|
|
Value stored is never read.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
|
|
Value stored is never read.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
|
|
Value stored is never read.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
|
|
Value stored is never read.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
|
|
Value stored is never read.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
|
|
Value stored is never read.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
|
|
Value stored is never read.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
|
|
Value stored is never read.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
|
|
Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
|
|
Fix clang warnings:
/src/qemu/block/vvfat.c:1102:9: warning: Value stored to 'index3' during its initialization is never read
int index3=index1+1;
/src/qemu/cmd.c:290:15: warning: Value stored to 'p' during its initialization is never read
char *p = result;
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
|
|
Greatly simplify the subpage implementation by not supporting
multiple devices at the same address at different widths. We
don't need full copies of mem_read/mem_write/opaque for each
address, only a single index back into the main io_mem_* arrays.
Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
|
|
The ABI-specific types used by linux_binprm and image_info
are different after forcing TARGET_ABI32 on. Which means
that the parameters that load_elf_binary_multi sees are not
those that loader_exec passed. This is inherently broken
and is more trouble than it's worth fixing.
Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
|
|
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
|
|
GCC 3.3.5 generates warnings for static forward declarations of data, so
rearrange code to use static forward declarations of functions instead.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
|
|
Fix clang error:
CC m68k-softmmu/helper.o
/src/qemu/target-m68k/helper.c:773:33: error: if statement has empty body [-Wempty-body]
else if (val & (1ull << 47));
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
|
|
Fix clang errors like:
CC libdis/m68k-dis.o
/src/qemu/m68k-dis.c:1796:7: error: expression result unused [-Wunused-value]
FETCH_DATA (info, p);
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
|
|
This clang error is harmless but worth fixing:
CC libhw32/rc4030.o
/src/qemu/hw/rc4030.c:244:66: error: if statement has empty body [-Wempty-body]
DPRINTF("read 0x%02x at " TARGET_FMT_plx "\n", val, addr);
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
|
|
|
|
Use address_mask on both addr and addr+8 in both these routines,
rather than explicit masking with 0xffffffff.
Reformulate address_mask to return a result, rather than masking
a pass-by-reference argument.
Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
|
|
A new iovec array is allocated when creating a merged write request.
This patch ensures that the iovec array is deleted in addition to its
qiov owner.
Reported-by: Leszek Urbanski <tygrys@moo.pl>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
|
|
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
|
|
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
|
|
It should be BDRV_O_FLAGS instead of BRDV_O_FLAGS.
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
|
|
Several commands have code to create a BlockDriverState and open a file.
The bdrv_new_open() function can be used to perform these steps. This
patch converts the qemu-img commands to actually use bdrv_new_open().
Replaced the bdrv_new_open() 'readonly' argument with bdrv_open()-style
flags to support generic flags like BDRV_O_NO_BACKING.
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
|
|
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
|
|
The bdrv_create2 implementation has disappeared long ago. Remove its
prototype from the header file, too.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
|
|
The bdrv_set_geometry_hint call below is not needed - it's just setting
what was just read.
Signed-off-by: Bruce Rogers <brogers@novell.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
|
|
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
|
|
The bdrv_first linked list of BlockDriverStates is currently extern so
that block migration can iterate the list. However, since there is
already a bdrv_iterate() function there is no need to expose bdrv_first.
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
|
|
Assign directly to the bdrv_flags variable instead of using
magic numbers before translating to the BDRV_O_* options.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
|
|
Returning NULL on error doesn't allow distinguishing between different errors.
Change the interface to return an integer for -errno.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
|
|
Change write_l1_entry to return the real error code instead of -1.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
|
|
Fix qcow2_alloc_cluster_link_l2 to return the real error code like it does in
all other error cases.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
|
|
Change write_l2_entries to return the real error code instead of -1.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
|
|
Split up the raw_getlength into separate generic, solaris and BSD
versions to reduce the ifdef maze a bit. The BSD variant still
is a complete maze, but to clean it up properly we'd need some
people using the BSD variants to figure out what code is used
for what variant.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
|
|
BDRV_O_FILE is only used to communicate between bdrv_file_open and bdrv_open.
It affects two things: first bdrv_open only searches for protocols using
find_protocol instead of all image formats and host drivers. We can easily
move that to the caller and pass the found driver to bdrv_open. Second
it is used to not force a read-write open of a snapshot file. But we never
use bdrv_file_open to open snapshots and this behaviour doesn't make sense
to start with.
qemu-io abused the BDRV_O_FILE for it's growable option, switch it to
using bdrv_file_open to make sure we only open files as growable were
we can actually support that.
This patch requires Kevin's "[PATCH] Replace calls of old bdrv_open" to
be applied first.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
|