Merge remote-tracking branch 'stefanha/trivial-patches' into staging
This commit is contained in:
commit
5962353006
4
acl.c
4
acl.c
|
@ -95,13 +95,13 @@ int qemu_acl_party_is_allowed(qemu_acl *acl,
|
||||||
|
|
||||||
void qemu_acl_reset(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
|
/* Put back to deny by default, so there is no window
|
||||||
* of "open access" while the user re-initializes the
|
* of "open access" while the user re-initializes the
|
||||||
* access control list */
|
* access control list */
|
||||||
acl->defaultDeny = 1;
|
acl->defaultDeny = 1;
|
||||||
QTAILQ_FOREACH(entry, &acl->entries, next) {
|
QTAILQ_FOREACH_SAFE(entry, &acl->entries, next, next_entry) {
|
||||||
QTAILQ_REMOVE(&acl->entries, entry, next);
|
QTAILQ_REMOVE(&acl->entries, entry, next);
|
||||||
free(entry->match);
|
free(entry->match);
|
||||||
free(entry);
|
free(entry);
|
||||||
|
|
|
@ -41,7 +41,7 @@ dictionary. This corresponds to a struct in C or an Object in JSON. An
|
||||||
example of a complex type is:
|
example of a complex type is:
|
||||||
|
|
||||||
{ 'type': 'MyType',
|
{ '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
|
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
|
members should always be added to the end of the dictionary to preserve
|
||||||
|
@ -63,7 +63,7 @@ An example command is:
|
||||||
|
|
||||||
{ 'command': 'my-command',
|
{ 'command': 'my-command',
|
||||||
'data': { 'arg1': 'str', '*arg2': 'str' },
|
'data': { 'arg1': 'str', '*arg2': 'str' },
|
||||||
'returns': 'str' ]
|
'returns': 'str' }
|
||||||
|
|
||||||
Command names should be all lower case with words separated by a hyphen.
|
Command names should be all lower case with words separated by a hyphen.
|
||||||
|
|
||||||
|
|
|
@ -198,6 +198,7 @@ DeviceState *sysbus_create_varargs(const char *name,
|
||||||
sysbus_connect_irq(s, n, irq);
|
sysbus_connect_irq(s, n, irq);
|
||||||
n++;
|
n++;
|
||||||
}
|
}
|
||||||
|
va_end(va);
|
||||||
return dev;
|
return dev;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -229,6 +230,7 @@ DeviceState *sysbus_try_create_varargs(const char *name,
|
||||||
sysbus_connect_irq(s, n, irq);
|
sysbus_connect_irq(s, n, irq);
|
||||||
n++;
|
n++;
|
||||||
}
|
}
|
||||||
|
va_end(va);
|
||||||
return dev;
|
return dev;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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");
|
pstrcpy(ifr.ifr_name, IFNAMSIZ, "tap%d");
|
||||||
ret = ioctl(fd, TUNSETIFF, (void *) &ifr);
|
ret = ioctl(fd, TUNSETIFF, (void *) &ifr);
|
||||||
if (ret != 0) {
|
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);
|
close(fd);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue