Misc fixes for 2.0-rc1
Anthony, Peter,
The following changes since commit f4b11eee2f562c23b3efc33b96ba4542c9ca81aa:
Makefile: Fix "make clean" (2014-03-17 11:50:19 +0000)
are available in the git repository at:
git://github.com/bonzini/qemu.git fixes-for-2.0
for you to fetch changes up to 025172d56e11ba3d86d0937933a23aab3b8606b1:
vl.c: Output error on invalid machine type (2014-03-17 13:21:12 +0100)
I gathered miscellaneous fixes from the mailing list, two of them mine, that are suitable for hard freeze. (I originarily had Fam's other patch in here too).
----------------------------------------------------------------
Fam Zheng (1):
rules.mak: Fix per object libs extraction
Miroslav Rezanina (1):
vl.c: Output error on invalid machine type
Paolo Bonzini (2):
qemu-nbd: Fix coverity issues
target-alpha: fix subl and s8subl indentation
qemu-nbd.c | 17 +++++++++++++---- rules.mak | 4 ++-- target-alpha/translate.c | 3 ++- vl.c | 21 +++++++++++++-------- 4 files changed, 30 insertions(+), 15 deletions(-)
Signature · 1 line
1.8.5.3
[Qemu-devel] [PULL 1/4] rules.mak: Fix per object libs extraction
From: Fam Zheng <[email protected]>
Don't sort the extracted options, sort the objects.
--- rules.mak | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
rules.mak +2 -2
@@ -23,8 +23,8 @@ QEMU_DGFLAGS += -MMD -MP -MT $@ -MF $(*D)/$(*F).d QEMU_INCLUDES += -I$(<D) -I$(@D) maybe-add = $(filter-out $1, $2) $1 -extract-libs = $(strip $(sort $(foreach o,$1,$($o-libs)) \ - $(foreach o,$(call expand-objs,$1),$($o-libs)))) +extract-libs = $(strip $(sort $(foreach o,$1,$($o-libs))) \ + $(foreach o,$(call expand-objs,$1),$($o-libs))) expand-objs = $(strip $(sort $(filter %.o,$1)) \ $(foreach o,$(filter %.mo,$1),$($o-objs)) \ $(filter-out %.o %.mo,$1))
Signature · 1 line
1.8.5.3
[Qemu-devel] [PULL 3/4] target-alpha: fix subl and s8subl indentation
In reply to Paolo BonziniTwo missing braces, one close and one open, fabulously let the code compile.
--- target-alpha/translate.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
target-alpha/translate.c +2 -1
@@ -1927,6 +1927,7 @@ static ExitStatus translate_one(DisasContext *ctx, uint32_t insn)else {tcg_gen_neg_i64 (cpu_ir[rc], cpu_ir[rb]);tcg_gen_ext32s_i64 (cpu_ir[rc], cpu_ir[rc]); + } } }break ;
@@ -1991,7 +1992,7 @@ static ExitStatus translate_one(DisasContext *ctx, uint32_t insn) }else {if (islit)tcg_gen_movi_i64 (cpu_ir[rc], -lit); -else +else {tcg_gen_neg_i64 (cpu_ir[rc], cpu_ir[rb]);tcg_gen_ext32s_i64 (cpu_ir[rc], cpu_ir[rc]); }
Signature · 1 line
1.8.5.3
[Qemu-devel] [PULL 2/4] qemu-nbd: Fix coverity issues
In reply to Paolo BonziniThere are two issues in qemu-nbd: a missing return value check after calling accept(), and file descriptor leaks in nbd_client_thread.
--- qemu-nbd.c | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-)
qemu-nbd.c +13 -4
@@ -288,19 +288,19 @@ static void *nbd_client_thread(void *arg) ret =nbd_receive_negotiate (sock,NULL , &nbdflags, &size, &blocksize);if (ret <0 ) { - goto out; + goto out_socket; } fd =open (device,O_RDWR );if (fd <0 ) {/* Linux-only, we can use %m in printf. */ fprintf (stderr,"Failed to open %s: %m" , device); - goto out; + goto out_socket; } ret =nbd_init (fd, sock, nbdflags, size, blocksize);if (ret <0 ) { - goto out; + goto out_fd; }/* update partition table */
@@ -316,12 +316,16 @@ static void *nbd_client_thread(void *arg) ret =nbd_client (fd);if (ret) { - goto out; + goto out_fd; }close (fd);kill (getpid (),SIGTERM );return (void *)EXIT_SUCCESS ; +out_fd: +close (fd); +out_socket: +closesocket (sock); out:kill (getpid (),SIGTERM );return (void *)EXIT_FAILURE ;
@@ -355,6 +359,11 @@ static void nbd_accept(void *opaque)socklen_t addr_len =sizeof (addr);int fd =accept (server_fd, (struct sockaddr *)&addr, &addr_len); +if (fd <0 ) { +perror ("accept" ); +return ; + } +if (state >=TERMINATE ) {close (fd);return ;
Signature · 1 line
1.8.5.3
[Qemu-devel] [PULL 4/4] vl.c: Output error on invalid machine type
In reply to Paolo BonziniFrom: Miroslav Rezanina <[email protected]>
Output error message using qemu's error_report() function when user provides the invalid machine type on the command line. This also saves time to find what issue is when you downgrade from one version of qemu to another that doesn't support required machine type yet (the version user downgraded to have to have this patch applied too, of course).
--- vl.c | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-)
vl.c +13 -8
@@ -2651,15 +2651,20 @@ static MachineClass *machine_parse(const char *name)if (mc) {return mc; } -printf ("Supported machines are:\n" ); -for (el = machines; el; el = el->next) { -MachineClass *mc = el->data; -QEMUMachine *m = mc->qemu_machine; -if (m->alias) { -printf ("%-20s %s (alias of %s)\n" , m->alias, m->desc, m->name); +if (name && !is_help_option (name)) { +error_report ("Unsupported machine type" ); +error_printf ("Use -machine help to list supported machines!\n" ); + }else { +printf ("Supported machines are:\n" ); +for (el = machines; el; el = el->next) { +MachineClass *mc = el->data; +QEMUMachine *m = mc->qemu_machine; +if (m->alias) { +printf ("%-20s %s (alias of %s)\n" , m->alias, m->desc, m->name); + } +printf ("%-20s %s%s\n" , m->name, m->desc, + m->is_default ?" (default)" :"" ); } -printf ("%-20s %s%s\n" , m->name, m->desc, - m->is_default ?" (default)" :"" ); }g_slist_free (machines);
Signature · 1 line
1.8.5.3
Peter Maydell
AppliedQuoted 10 lines · Paolo Bonzini
Anthony, Peter,
The following changes since commit
f4b11eee2f562c23b3efc33b96ba4542c9ca81aa:
Makefile: Fix "make clean" (2014-03-17 11:50:19 +0000)are available in the git repository at:
git://github.com/bonzini/qemu.gitfixes-for-2.0
Quoted 8 lines
for you to fetch changes up to
025172d56e11ba3d86d0937933a23aab3b8606b1:
vl.c: Output error on invalid machine type (2014-03-17 13:21:12 +0100)I gathered miscellaneous fixes from the mailing list, two of them mine, that are suitable for hard freeze. (I originarily had Fam's other patch in here too).
Applied, thanks.
-- PMM