mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-12 15:52:55 +00:00
cleanup: Change datatype of usbdev->allow to boolean
This commit is contained in:
parent
00b6828dc2
commit
f2adc3b435
@ -8679,9 +8679,9 @@ virDomainRedirFilterUsbDevDefParseXML(const xmlNodePtr node)
|
|||||||
allow = virXMLPropString(node, "allow");
|
allow = virXMLPropString(node, "allow");
|
||||||
if (allow) {
|
if (allow) {
|
||||||
if (STREQ(allow, "yes"))
|
if (STREQ(allow, "yes"))
|
||||||
def->allow = 1;
|
def->allow = true;
|
||||||
else if (STREQ(allow, "no"))
|
else if (STREQ(allow, "no"))
|
||||||
def->allow = 0;
|
def->allow = false;
|
||||||
else {
|
else {
|
||||||
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
|
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
|
||||||
_("Invalid allow value, either 'yes' or 'no'"));
|
_("Invalid allow value, either 'yes' or 'no'"));
|
||||||
|
@ -1440,7 +1440,7 @@ struct _virDomainRedirFilterUsbDevDef {
|
|||||||
int vendor;
|
int vendor;
|
||||||
int product;
|
int product;
|
||||||
int version;
|
int version;
|
||||||
unsigned int allow :1;
|
bool allow;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _virDomainRedirFilterDef {
|
struct _virDomainRedirFilterDef {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user