Trivial patches for 8 to 19 March 2012
The following changes since commit 5bd33de6635577744b3c10dd3913bfe8c5ffaf40:
tcg: fix sparc host for AREG0 free operation (2012-03-18 19:15:32 +0000)
are available in the git repository at:
git://github.com/stefanha/qemu.git trivial-patches
for you to fetch changes up to b71706d122838d9656e1a6dae80e22401babdf37:
qemu-ga: for w32, fix leaked handle ov.hEvent in ga_channel_write() (2012-03-19 11:31:04 +0000)
----------------------------------------------------------------
Chen Yufei (1):
Remove type field in ModuleEntry as it's not used
David Gibson (1):
.gitignore: add qemu-bridge-helper and option rom build products
Jason Wang (1):
ioapic: fix build with DEBUG_IOAPIC
Jeff Cody (2):
monitor: Remove unused bool field 'qapi' in mon_cmd_t struct
qemu-ga: for w32, fix leaked handle ov.hEvent in ga_channel_write()
Joshua Housh (1):
cleanup obsolete typedef
Stefan Weil (2):
vnc: Fix packed boolean struct members
ds1338: Add missing break statement
.gitignore | 6 ++++++ hw/ds1338.c | 1 + hw/ioapic.c | 2 +- module.c | 1 - monitor.c | 1 - qemu-common.h | 1 - qga/channel-win32.c | 4 ++++ ui/vnc-auth-sasl.c | 4 +++- ui/vnc-auth-sasl.h | 4 ++-- 9 files changed, 17 insertions(+), 7 deletions(-)
Signature · 1 line
1.7.9.1
PATCH 1/8 Remove type field in ModuleEntry as it's not used
From: Chen Yufei <[email protected]>
--- module.c | 1 - 1 files changed, 0 insertions(+), 1 deletions(-)
module.c +0 -1
@@ -19,7 +19,6 @@typedef struct ModuleEntry { -module_init_type type;void (*init)(void );QTAILQ_ENTRY (ModuleEntry) node; }ModuleEntry ;
Signature · 1 line
1.7.9.1
PATCH 2/8 vnc: Fix packed boolean struct members
In reply to Stefan HajnocziFrom: Stefan Weil <[email protected]>
This patch fixes warnings reported by splint:
For variables which are packed in a single bit, a signed data type like 'int' does not make much sense.
There is no obvious reason why the two values should be packed, so I removed the packing and changed the data type to bool because both are used as boolean values.
v2:
Some versions of gcc complain after this modification, for example gcc (Debian 4.4.5-8) 4.4.5):
ui/vnc-auth-sasl.c: In function ‘vnc_sasl_client_cleanup’:ui/vnc-auth-sasl.c:34: error: suggest parentheses around assignment used as truth value
Obviously, the compiler does not like code which does bool = unsigned = bool = 0
Splitting that code in three statements works.
--- ui/vnc-auth-sasl.c | 4 +++- ui/vnc-auth-sasl.h | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-)
ui/vnc-auth-sasl.c +3 -1
@@ -31,7 +31,9 @@void vnc_sasl_client_cleanup (VncState *vs) {if (vs->sasl.conn) { - vs->sasl.runSSF = vs->sasl.waitWriteSSF = vs->sasl.wantSSF =0 ; + vs->sasl.runSSF = false; + vs->sasl.wantSSF = false; + vs->sasl.waitWriteSSF =0 ; vs->sasl.encodedLength = vs->sasl.encodedOffset =0 ; vs->sasl.encoded =NULL ;g_free (vs->sasl.username);
ui/vnc-auth-sasl.h +2 -2
@@ -37,9 +37,9 @@ typedef struct VncDisplaySASL VncDisplaySASL;struct VncStateSASL {sasl_conn_t *conn;/* If we want to negotiate an SSF layer with client */ -int wantSSF :1 ; +bool wantSSF;/* If we are now running the SSF layer */ -int runSSF :1 ; +bool runSSF;/* * If this is non-zero, then wait for that many bytes * to be written plain, before switching to SSF encoding
Signature · 1 line
1.7.9.1
PATCH 3/8 ds1338: Add missing break statement
In reply to Stefan HajnocziFrom: Stefan Weil <[email protected]>
Without the break statement, case 5 sets month and year from the same data. This does not look correct.
The missing break was reported by splint.
--- hw/ds1338.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
hw/ds1338.c +1 -0
@@ -100,6 +100,7 @@ static int ds1338_send(I2CSlave *i2c, uint8_t data)break ;case 5 : s->now.tm_mon =from_bcd (data &0x1f ) -1 ; +break ;case 6 : s->now.tm_year =from_bcd (data) +100 ;break ;
Signature · 1 line
1.7.9.1
PATCH 4/8 monitor: Remove unused bool field 'qapi' in mon_cmd_t struct
In reply to Stefan HajnocziFrom: Jeff Cody <[email protected]>
Some minor code cleanup: the 'qapi' bool field in mon_cmd_t is unused, and can be removed.
--- monitor.c | 1 - 1 files changed, 0 insertions(+), 1 deletions(-)
monitor.c +0 -1
@@ -128,7 +128,6 @@ typedef struct mon_cmd_t {int (*cmd_async)(Monitor *mon,const QDict *params,MonitorCompletion *cb,void *opaque); } mhandler; -bool qapi;int flags; } mon_cmd_t;
Signature · 1 line
1.7.9.1
PATCH 5/8 cleanup obsolete typedef
In reply to Stefan HajnocziFrom: Joshua Housh <[email protected]>
There are no users of i2c_slave.
--- qemu-common.h | 1 - 1 files changed, 0 insertions(+), 1 deletions(-)
qemu-common.h +0 -1
@@ -236,7 +236,6 @@ typedef struct MACAddr MACAddr;typedef struct VLANState VLANState ;typedef struct VLANClientState VLANClientState ;typedef struct i2c_bus i2c_bus ; -typedef struct i2c_slave i2c_slave ;typedef struct ISABus ISABus ;typedef struct SMBusDevice SMBusDevice ;typedef struct PCIHostState PCIHostState ;
Signature · 1 line
1.7.9.1
PATCH 6/8 .gitignore: add qemu-bridge-helper and option rom build products
In reply to Stefan HajnocziFrom: David Gibson <[email protected]>
This adds a few previously missing generated files to .gitignore: the qemu-bridge-helper binary, and more generated versions of the linuxboot, multiboot and kvmvapic roms from pc-bios/optionrom.
--- .gitignore | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-)
.gitignore +6 -0
@@ -39,6 +39,7 @@ qemu-img-cmds.texi qemu-img-cmds.h qemu-io qemu-ga +qemu-bridge-helper qemu-monitor.texi QMP/qmp-commands.txt test-coroutine
@@ -75,9 +76,14 @@ patches pc-bios/bios-pq/status pc-bios/vgabios-pq/status pc-bios/optionrom/linuxboot.bin +pc-bios/optionrom/linuxboot.raw +pc-bios/optionrom/linuxboot.img pc-bios/optionrom/multiboot.bin pc-bios/optionrom/multiboot.raw +pc-bios/optionrom/multiboot.img pc-bios/optionrom/kvmvapic.bin +pc-bios/optionrom/kvmvapic.raw +pc-bios/optionrom/kvmvapic.img .stgit-* cscope.* tags
Signature · 1 line
1.7.9.1
PATCH 7/8 ioapic: fix build with DEBUG_IOAPIC
In reply to Stefan HajnocziFrom: Jason Wang <[email protected]>
ioapic.c:198: error: format ‘%08x’ expects type ‘unsigned int’, but argument 3 has type ‘uint64_t’
--- hw/ioapic.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
hw/ioapic.c +1 -1
@@ -195,7 +195,7 @@ ioapic_mem_write(void *opaque, target_phys_addr_t addr, uint64_t val,if (size !=4 ) {break ; } -DPRINTF ("write: %08x = %08x\n" , s->ioregsel, val); +DPRINTF ("write: %08x = %08" PRIx64"\n" , s->ioregsel, val);switch (s->ioregsel) {case IOAPIC_REG_ID : s->id = (val >>IOAPIC_ID_SHIFT ) &IOAPIC_ID_MASK ;
Signature · 1 line
1.7.9.1
PATCH 8/8 qemu-ga: for w32, fix leaked handle ov.hEvent in ga_channel_write()
In reply to Stefan HajnocziFrom: Jeff Cody <[email protected]>
In the function ga_channel_write(), the handle ov.hEvent is created by the call to CreateEvent(). However, the handle is not closed prior to the function return.
This patch closes the handle before the return of the function.
Kudos to Paolo Bonzini for spotting this bug.
--- qga/channel-win32.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-)
qga/channel-win32.c +4 -0
@@ -259,6 +259,10 @@ static GIOStatus ga_channel_write(GAChannel *c, const char *buf, size_t size, *count = written; } +if (ov.hEvent) { +CloseHandle (ov.hEvent); + ov.hEvent =NULL ; + }return status; }
Signature · 1 line
1.7.9.1
Quoted 11 lines · Stefan Hajnoczi
The following changes since commit
5bd33de6635577744b3c10dd3913bfe8c5ffaf40:tcg: fix sparc host for AREG0 free operation (2012-03-18 19:15:32 +0000)
are available in the git repository at:
git://github.com/stefanha/qemu.gittrivial-patchesfor you to fetch changes up to
b71706d122838d9656e1a6dae80e22401babdf37:qemu-ga: for w32, fix leaked handle ov.hEvent in ga_channel_write() (2012-03-19 11:31:04 +0000)
Pulled. Thanks.
Regards,
Anthony Liguori
Quoted 33 lines
----------------------------------------------------------------
Chen Yufei (1):
Remove type field in ModuleEntry as it's not usedDavid Gibson (1):
.gitignore: add qemu-bridge-helper and option rom build productsJason Wang (1):
ioapic: fix build withDEBUG_IOAPICJeff Cody (2):
monitor: Remove unused bool field 'qapi' inmon_cmd_tstruct
qemu-ga: for w32, fix leaked handle ov.hEvent inga_channel_write()Joshua Housh (1):
cleanup obsolete typedefStefan Weil (2):
vnc: Fix packed boolean struct members
ds1338: Add missing break statement.gitignore | 6 ++++++ hw/ds1338.c | 1 + hw/ioapic.c | 2 +- module.c | 1 - monitor.c | 1 - qemu-common.h | 1 - qga/channel-win32.c | 4 ++++ ui/vnc-auth-sasl.c | 4 +++- ui/vnc-auth-sasl.h | 4 ++-- 9 files changed, 17 insertions(+), 7 deletions(-)