diff options
author | Anthony Liguori <aliguori@us.ibm.com> | 2011-11-01 13:06:17 -0500 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2011-11-01 13:06:17 -0500 |
commit | 596235300608575ece1828b12a5faf32ebfee3fc (patch) | |
tree | d8f458d70ddceae02c9e6e027d68910a91c3c16b | |
parent | 90ea59fe7d121c722e1b44cb9bc0fad1ade73686 (diff) | |
parent | 0ce6a434176e274a7e86bcaa268542c5cc402696 (diff) | |
download | qemu-596235300608575ece1828b12a5faf32ebfee3fc.zip qemu-596235300608575ece1828b12a5faf32ebfee3fc.tar.gz qemu-596235300608575ece1828b12a5faf32ebfee3fc.tar.bz2 |
Merge remote-tracking branch 'stefanha/trivial-patches' into staging
-rw-r--r-- | acl.c | 4 | ||||
-rw-r--r-- | docs/qapi-code-gen.txt | 4 | ||||
-rw-r--r-- | hw/sysbus.c | 2 | ||||
-rw-r--r-- | net/tap-linux.c | 6 |
4 files changed, 11 insertions, 5 deletions
@@ -95,13 +95,13 @@ int qemu_acl_party_is_allowed(qemu_acl *acl, void qemu_acl_reset(qemu_acl *acl) { - qemu_acl_entry *entry; + qemu_acl_entry *entry, *next_entry; /* Put back to deny by default, so there is no window * of "open access" while the user re-initializes the * access control list */ acl->defaultDeny = 1; - QTAILQ_FOREACH(entry, &acl->entries, next) { + QTAILQ_FOREACH_SAFE(entry, &acl->entries, next, next_entry) { QTAILQ_REMOVE(&acl->entries, entry, next); free(entry->match); free(entry); diff --git a/docs/qapi-code-gen.txt b/docs/qapi-code-gen.txt index f345866..c0a9325 100644 --- a/docs/qapi-code-gen.txt +++ b/docs/qapi-code-gen.txt @@ -41,7 +41,7 @@ dictionary. This corresponds to a struct in C or an Object in JSON. An example of a complex type is: { 'type': 'MyType', - 'data' { 'member1': 'str', 'member2': 'int', '*member3': 'str } } + 'data': { 'member1': 'str', 'member2': 'int', '*member3': 'str' } } The use of '*' as a prefix to the name means the member is optional. Optional members should always be added to the end of the dictionary to preserve @@ -63,7 +63,7 @@ An example command is: { 'command': 'my-command', 'data': { 'arg1': 'str', '*arg2': 'str' }, - 'returns': 'str' ] + 'returns': 'str' } Command names should be all lower case with words separated by a hyphen. diff --git a/hw/sysbus.c b/hw/sysbus.c index 4fab5a4..fd2fc6a 100644 --- a/hw/sysbus.c +++ b/hw/sysbus.c @@ -198,6 +198,7 @@ DeviceState *sysbus_create_varargs(const char *name, sysbus_connect_irq(s, n, irq); n++; } + va_end(va); return dev; } @@ -229,6 +230,7 @@ DeviceState *sysbus_try_create_varargs(const char *name, sysbus_connect_irq(s, n, irq); n++; } + va_end(va); return dev; } diff --git a/net/tap-linux.c b/net/tap-linux.c index ff8cad0..41d581b 100644 --- a/net/tap-linux.c +++ b/net/tap-linux.c @@ -73,7 +73,11 @@ int tap_open(char *ifname, int ifname_size, int *vnet_hdr, int vnet_hdr_required pstrcpy(ifr.ifr_name, IFNAMSIZ, "tap%d"); ret = ioctl(fd, TUNSETIFF, (void *) &ifr); if (ret != 0) { - error_report("could not configure %s (%s): %m", PATH_NET_TUN, ifr.ifr_name); + if (ifname[0] != '\0') { + error_report("could not configure %s (%s): %m", PATH_NET_TUN, ifr.ifr_name); + } else { + error_report("could not configure %s: %m", PATH_NET_TUN); + } close(fd); return -1; } |