mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-23 21:34:54 +03:00
virDomainHostdevDef: Change type of startupPolicy to virDomainStartupPolicy
Signed-off-by: Tim Wiederhake <twiederh@redhat.com> Reviewed-by: Laine Stump <laine@redhat.com>
This commit is contained in:
parent
bdbd902722
commit
e9c1e68d1f
@ -6704,14 +6704,14 @@ virDomainHostdevSubsysUSBDefParseXML(xmlNodePtr node,
|
||||
ctxt->node = node;
|
||||
|
||||
if ((startupPolicy = virXMLPropString(node, "startupPolicy"))) {
|
||||
def->startupPolicy =
|
||||
virDomainStartupPolicyTypeFromString(startupPolicy);
|
||||
if (def->startupPolicy <= 0) {
|
||||
int value = virDomainStartupPolicyTypeFromString(startupPolicy);
|
||||
if (value <= 0) {
|
||||
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
|
||||
_("Unknown startup policy '%s'"),
|
||||
startupPolicy);
|
||||
return -1;
|
||||
}
|
||||
def->startupPolicy = value;
|
||||
}
|
||||
|
||||
if ((autoAddress = virXMLPropString(node, "autoAddress")))
|
||||
|
@ -332,6 +332,15 @@ struct _virDomainHostdevCaps {
|
||||
};
|
||||
|
||||
|
||||
typedef enum {
|
||||
VIR_DOMAIN_STARTUP_POLICY_DEFAULT = 0,
|
||||
VIR_DOMAIN_STARTUP_POLICY_MANDATORY,
|
||||
VIR_DOMAIN_STARTUP_POLICY_REQUISITE,
|
||||
VIR_DOMAIN_STARTUP_POLICY_OPTIONAL,
|
||||
|
||||
VIR_DOMAIN_STARTUP_POLICY_LAST
|
||||
} virDomainStartupPolicy;
|
||||
|
||||
/* basic device for direct passthrough */
|
||||
struct _virDomainHostdevDef {
|
||||
/* If 'parentnet' is non-NULL it means this host dev was
|
||||
@ -343,7 +352,7 @@ struct _virDomainHostdevDef {
|
||||
virDomainNetDef *parentnet;
|
||||
|
||||
int mode; /* enum virDomainHostdevMode */
|
||||
int startupPolicy; /* enum virDomainStartupPolicy */
|
||||
virDomainStartupPolicy startupPolicy;
|
||||
bool managed;
|
||||
bool missing;
|
||||
bool readonly;
|
||||
@ -432,16 +441,6 @@ typedef enum {
|
||||
VIR_DOMAIN_DISK_IO_LAST
|
||||
} virDomainDiskIo;
|
||||
|
||||
typedef enum {
|
||||
VIR_DOMAIN_STARTUP_POLICY_DEFAULT = 0,
|
||||
VIR_DOMAIN_STARTUP_POLICY_MANDATORY,
|
||||
VIR_DOMAIN_STARTUP_POLICY_REQUISITE,
|
||||
VIR_DOMAIN_STARTUP_POLICY_OPTIONAL,
|
||||
|
||||
VIR_DOMAIN_STARTUP_POLICY_LAST
|
||||
} virDomainStartupPolicy;
|
||||
|
||||
|
||||
typedef enum {
|
||||
VIR_DOMAIN_DEVICE_SGIO_DEFAULT = 0,
|
||||
VIR_DOMAIN_DEVICE_SGIO_FILTERED,
|
||||
|
Loading…
Reference in New Issue
Block a user