--- src/conf/cpu_conf.c | 4 +- src/conf/domain_conf.c | 100 ++++++++++++++++++----------------- src/conf/interface_conf.c | 2 +- src/conf/network_conf.c | 2 +- src/conf/node_device_conf.c | 4 +- src/conf/nwfilter_conf.c | 6 +- src/conf/secret_conf.c | 2 +- src/conf/storage_conf.c | 2 +- src/conf/storage_encryption_conf.c | 4 +- 9 files changed, 64 insertions(+), 62 deletions(-) diff --git a/src/conf/cpu_conf.c b/src/conf/cpu_conf.c index ad49916..db8b4bb 100644 --- a/src/conf/cpu_conf.c +++ b/src/conf/cpu_conf.c @@ -156,7 +156,7 @@ virCPUDefParseXML(const xmlNodePtr node, VIR_FREE(match); if (def->match < 0) { - virCPUReportError(VIR_ERR_INTERNAL_ERROR, + virCPUReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", _("Invalid match attribute for CPU specification")); goto error; } @@ -257,7 +257,7 @@ virCPUDefParseXML(const xmlNodePtr node, VIR_FREE(strpolicy); if (policy < 0) { - virCPUReportError(VIR_ERR_INTERNAL_ERROR, + virCPUReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", _("Invalid CPU feature policy")); goto error; } diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 0e7aeb5..7fba385 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -1634,7 +1634,7 @@ virDomainDeviceInfoParseXML(xmlNodePtr node, if (type) { if ((info->type = virDomainDeviceAddressTypeFromString(type)) < 0) { - virDomainReportError(VIR_ERR_INTERNAL_ERROR, + virDomainReportError(VIR_ERR_CONFIG_UNSUPPORTED, _("unknown address type '%s'"), type); goto cleanup; } @@ -1841,7 +1841,7 @@ virDomainDiskDefParseXML(virCapsPtr caps, type = virXMLPropString(node, "type"); if (type) { if ((def->type = virDomainDiskTypeFromString(type)) < 0) { - virDomainReportError(VIR_ERR_INTERNAL_ERROR, + virDomainReportError(VIR_ERR_CONFIG_UNSUPPORTED, _("unknown disk type '%s'"), type); goto error; } @@ -1874,7 +1874,7 @@ virDomainDiskDefParseXML(virCapsPtr caps, } def->protocol = virDomainDiskProtocolTypeFromString(protocol); if (def->protocol < 0) { - virDomainReportError(VIR_ERR_INTERNAL_ERROR, + virDomainReportError(VIR_ERR_CONFIG_UNSUPPORTED, _("unknown protocol type '%s'"), protocol); goto error; @@ -1973,7 +1973,7 @@ virDomainDiskDefParseXML(virCapsPtr caps, device = virXMLPropString(node, "device"); if (device) { if ((def->device = virDomainDiskDeviceTypeFromString(device)) < 0) { - virDomainReportError(VIR_ERR_INTERNAL_ERROR, + virDomainReportError(VIR_ERR_CONFIG_UNSUPPORTED, _("unknown disk device '%s'"), device); goto error; } @@ -2021,7 +2021,7 @@ virDomainDiskDefParseXML(virCapsPtr caps, if (bus) { if ((def->bus = virDomainDiskBusTypeFromString(bus)) < 0) { - virDomainReportError(VIR_ERR_INTERNAL_ERROR, + virDomainReportError(VIR_ERR_CONFIG_UNSUPPORTED, _("unknown disk bus type '%s'"), bus); goto error; } @@ -2059,14 +2059,14 @@ virDomainDiskDefParseXML(virCapsPtr caps, if (cachetag && (def->cachemode = virDomainDiskCacheTypeFromString(cachetag)) < 0) { - virDomainReportError(VIR_ERR_INTERNAL_ERROR, + virDomainReportError(VIR_ERR_CONFIG_UNSUPPORTED, _("unknown disk cache mode '%s'"), cachetag); goto error; } if (error_policy && (def->error_policy = virDomainDiskErrorPolicyTypeFromString(error_policy)) < 0) { - virDomainReportError(VIR_ERR_INTERNAL_ERROR, + virDomainReportError(VIR_ERR_CONFIG_UNSUPPORTED, _("unknown disk error policy '%s'"), error_policy); goto error; } @@ -2074,7 +2074,7 @@ virDomainDiskDefParseXML(virCapsPtr caps, if (iotag) { if ((def->iomode = virDomainDiskIoTypeFromString(iotag)) < 0 || def->iomode == VIR_DOMAIN_DISK_IO_DEFAULT) { - virDomainReportError(VIR_ERR_INTERNAL_ERROR, + virDomainReportError(VIR_ERR_CONFIG_UNSUPPORTED, _("unknown disk io mode '%s'"), iotag); goto error; } @@ -2178,7 +2178,7 @@ virDomainControllerDefParseXML(xmlNodePtr node, type = virXMLPropString(node, "type"); if (type) { if ((def->type = virDomainControllerTypeFromString(type)) < 0) { - virDomainReportError(VIR_ERR_INTERNAL_ERROR, + virDomainReportError(VIR_ERR_CONFIG_UNSUPPORTED, _("Unknown controller type '%s'"), type); goto error; } @@ -2196,7 +2196,7 @@ virDomainControllerDefParseXML(xmlNodePtr node, model = virXMLPropString(node, "model"); if (model) { if ((def->model = virDomainControllerModelTypeFromString(model)) < 0) { - virDomainReportError(VIR_ERR_INTERNAL_ERROR, + virDomainReportError(VIR_ERR_CONFIG_UNSUPPORTED, _("Unknown model type '%s'"), model); goto error; } @@ -2286,7 +2286,7 @@ virDomainFSDefParseXML(xmlNodePtr node, type = virXMLPropString(node, "type"); if (type) { if ((def->type = virDomainFSTypeFromString(type)) < 0) { - virDomainReportError(VIR_ERR_INTERNAL_ERROR, + virDomainReportError(VIR_ERR_CONFIG_UNSUPPORTED, _("unknown filesystem type '%s'"), type); goto error; } @@ -2297,7 +2297,7 @@ virDomainFSDefParseXML(xmlNodePtr node, accessmode = virXMLPropString(node, "accessmode"); if (accessmode) { if ((def->accessmode = virDomainFSAccessModeTypeFromString(accessmode)) < 0) { - virDomainReportError(VIR_ERR_INTERNAL_ERROR, + virDomainReportError(VIR_ERR_CONFIG_UNSUPPORTED, _("unknown accessmode '%s'"), accessmode); goto error; } @@ -2549,7 +2549,7 @@ virDomainNetDefParseXML(virCapsPtr caps, type = virXMLPropString(node, "type"); if (type != NULL) { if ((int)(def->type = virDomainNetTypeFromString(type)) < 0) { - virDomainReportError(VIR_ERR_INTERNAL_ERROR, + virDomainReportError(VIR_ERR_CONFIG_UNSUPPORTED, _("unknown interface type '%s'"), type); goto error; } @@ -2761,7 +2761,7 @@ virDomainNetDefParseXML(virCapsPtr caps, if (mode != NULL) { int m; if ((m = virDomainNetdevMacvtapTypeFromString(mode)) < 0) { - virDomainReportError(VIR_ERR_INTERNAL_ERROR, "%s", + virDomainReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", _("Unkown mode has been specified")); goto error; } @@ -2814,7 +2814,7 @@ virDomainNetDefParseXML(virCapsPtr caps, int name; if (((name = virDomainNetBackendTypeFromString(backend)) < 0) || (name == VIR_DOMAIN_NET_BACKEND_TYPE_DEFAULT)) { - virDomainReportError(VIR_ERR_INTERNAL_ERROR, + virDomainReportError(VIR_ERR_CONFIG_UNSUPPORTED, _("Unknown interface <driver name='%s'> " "has been specified"), backend); @@ -2826,7 +2826,7 @@ virDomainNetDefParseXML(virCapsPtr caps, int m; if (((m = virDomainNetVirtioTxModeTypeFromString(txmode)) < 0) || (m == VIR_DOMAIN_NET_VIRTIO_TX_MODE_DEFAULT)) { - virDomainReportError(VIR_ERR_INTERNAL_ERROR, + virDomainReportError(VIR_ERR_CONFIG_UNSUPPORTED, _("Unknown interface <driver txmode='%s'> " "has been specified"), txmode); @@ -2964,6 +2964,8 @@ virDomainChrDefParseTargetXML(virCapsPtr caps, if ((def->targetType = virDomainChrTargetTypeFromString(caps, def->deviceType, targetType)) < 0) { + virDomainReportError(VIR_ERR_CONFIG_UNSUPPORTED, + _("unknown type %s"), targetType); goto error; } @@ -3186,7 +3188,7 @@ virDomainChrSourceDefParseXML(virDomainChrSourceDefPtr def, def->data.tcp.protocol = VIR_DOMAIN_CHR_TCP_PROTOCOL_RAW; else if ((def->data.tcp.protocol = virDomainChrTcpProtocolTypeFromString(protocol)) < 0) { - virDomainReportError(VIR_ERR_INTERNAL_ERROR, + virDomainReportError(VIR_ERR_CONFIG_UNSUPPORTED, _("Unknown protocol '%s'"), protocol); goto error; } @@ -3313,7 +3315,7 @@ virDomainChrDefParseXML(virCapsPtr caps, if (type == NULL) { def->source.type = VIR_DOMAIN_CHR_TYPE_PTY; } else if ((def->source.type = virDomainChrTypeFromString(type)) < 0) { - virDomainReportError(VIR_ERR_XML_ERROR, + virDomainReportError(VIR_ERR_CONFIG_UNSUPPORTED, _("unknown type presented to host for character device: %s"), type); goto error; @@ -3321,7 +3323,7 @@ virDomainChrDefParseXML(virCapsPtr caps, nodeName = (const char *) node->name; if ((def->deviceType = virDomainChrDeviceTypeFromString(nodeName)) < 0) { - virDomainReportError(VIR_ERR_XML_ERROR, + virDomainReportError(VIR_ERR_CONFIG_UNSUPPORTED, _("unknown character device type: %s"), nodeName); } @@ -3391,7 +3393,7 @@ virDomainSmartcardDefParseXML(xmlNodePtr node, goto error; } if ((def->type = virDomainSmartcardTypeFromString(mode)) < 0) { - virDomainReportError(VIR_ERR_XML_ERROR, + virDomainReportError(VIR_ERR_CONFIG_UNSUPPORTED, _("unknown smartcard device mode: %s"), mode); goto error; @@ -3453,7 +3455,7 @@ virDomainSmartcardDefParseXML(xmlNodePtr node, goto error; } if ((def->data.passthru.type = virDomainChrTypeFromString(type)) < 0) { - virDomainReportError(VIR_ERR_XML_ERROR, + virDomainReportError(VIR_ERR_CONFIG_UNSUPPORTED, _("unknown type presented to host for " "character device: %s"), type); goto error; @@ -3521,14 +3523,14 @@ virDomainInputDefParseXML(const char *ostype, } if ((def->type = virDomainInputTypeFromString(type)) < 0) { - virDomainReportError(VIR_ERR_INTERNAL_ERROR, + virDomainReportError(VIR_ERR_CONFIG_UNSUPPORTED, _("unknown input device type '%s'"), type); goto error; } if (bus) { if ((def->bus = virDomainInputBusTypeFromString(bus)) < 0) { - virDomainReportError(VIR_ERR_INTERNAL_ERROR, + virDomainReportError(VIR_ERR_CONFIG_UNSUPPORTED, _("unknown input bus type '%s'"), bus); goto error; } @@ -3618,7 +3620,7 @@ virDomainTimerDefParseXML(const xmlNodePtr node, goto error; } if ((def->name = virDomainTimerNameTypeFromString(name)) < 0) { - virDomainReportError(VIR_ERR_INTERNAL_ERROR, + virDomainReportError(VIR_ERR_CONFIG_UNSUPPORTED, _("unknown timer name '%s'"), name); goto error; } @@ -3640,7 +3642,7 @@ virDomainTimerDefParseXML(const xmlNodePtr node, tickpolicy = virXMLPropString(node, "tickpolicy"); if (tickpolicy != NULL) { if ((def->tickpolicy = virDomainTimerTickpolicyTypeFromString(tickpolicy)) < 0) { - virDomainReportError(VIR_ERR_INTERNAL_ERROR, + virDomainReportError(VIR_ERR_CONFIG_UNSUPPORTED, _("unknown timer tickpolicy '%s'"), tickpolicy); goto error; } @@ -3650,7 +3652,7 @@ virDomainTimerDefParseXML(const xmlNodePtr node, track = virXMLPropString(node, "track"); if (track != NULL) { if ((def->track = virDomainTimerTrackTypeFromString(track)) < 0) { - virDomainReportError(VIR_ERR_INTERNAL_ERROR, + virDomainReportError(VIR_ERR_CONFIG_UNSUPPORTED, _("unknown timer track '%s'"), track); goto error; } @@ -3669,7 +3671,7 @@ virDomainTimerDefParseXML(const xmlNodePtr node, mode = virXMLPropString(node, "mode"); if (mode != NULL) { if ((def->mode = virDomainTimerModeTypeFromString(mode)) < 0) { - virDomainReportError(VIR_ERR_INTERNAL_ERROR, + virDomainReportError(VIR_ERR_CONFIG_UNSUPPORTED, _("unknown timer mode '%s'"), mode); goto error; } @@ -3790,7 +3792,7 @@ virDomainGraphicsDefParseXML(xmlNodePtr node, int flags) { } if ((def->type = virDomainGraphicsTypeFromString(type)) < 0) { - virDomainReportError(VIR_ERR_INTERNAL_ERROR, + virDomainReportError(VIR_ERR_CONFIG_UNSUPPORTED, _("unknown graphics device type '%s'"), type); goto error; } @@ -3979,7 +3981,7 @@ virDomainGraphicsDefParseXML(xmlNodePtr node, int flags) { } if ((nameval = virDomainGraphicsSpiceChannelNameTypeFromString(name)) < 0) { - virDomainReportError(VIR_ERR_INTERNAL_ERROR, + virDomainReportError(VIR_ERR_CONFIG_UNSUPPORTED, _("unknown spice channel name %s"), name); VIR_FREE(name); @@ -3987,7 +3989,7 @@ virDomainGraphicsDefParseXML(xmlNodePtr node, int flags) { goto error; } if ((modeval = virDomainGraphicsSpiceChannelModeTypeFromString(mode)) < 0) { - virDomainReportError(VIR_ERR_INTERNAL_ERROR, + virDomainReportError(VIR_ERR_CONFIG_UNSUPPORTED, _("unknown spice channel mode %s"), mode); VIR_FREE(name); @@ -4114,7 +4116,7 @@ virDomainSoundDefParseXML(const xmlNodePtr node, model = virXMLPropString(node, "model"); if ((def->model = virDomainSoundModelTypeFromString(model)) < 0) { - virDomainReportError(VIR_ERR_INTERNAL_ERROR, + virDomainReportError(VIR_ERR_CONFIG_UNSUPPORTED, _("unknown sound model '%s'"), model); goto error; } @@ -4156,7 +4158,7 @@ virDomainWatchdogDefParseXML(const xmlNodePtr node, } def->model = virDomainWatchdogModelTypeFromString (model); if (def->model < 0) { - virDomainReportError(VIR_ERR_INTERNAL_ERROR, + virDomainReportError(VIR_ERR_CONFIG_UNSUPPORTED, _("unknown watchdog model '%s'"), model); goto error; } @@ -4167,7 +4169,7 @@ virDomainWatchdogDefParseXML(const xmlNodePtr node, else { def->action = virDomainWatchdogActionTypeFromString (action); if (def->action < 0) { - virDomainReportError(VIR_ERR_INTERNAL_ERROR, + virDomainReportError(VIR_ERR_CONFIG_UNSUPPORTED, _("unknown watchdog action '%s'"), action); goto error; } @@ -4208,7 +4210,7 @@ virDomainMemballoonDefParseXML(const xmlNodePtr node, goto error; } if ((def->model = virDomainMemballoonModelTypeFromString(model)) < 0) { - virDomainReportError(VIR_ERR_INTERNAL_ERROR, + virDomainReportError(VIR_ERR_CONFIG_UNSUPPORTED, _("unknown memory balloon model '%s'"), model); goto error; } @@ -4252,7 +4254,7 @@ virSysinfoParseXML(const xmlNodePtr node, goto error; } if ((def->type = virDomainSysinfoTypeFromString(type)) < 0) { - virDomainReportError(VIR_ERR_INTERNAL_ERROR, + virDomainReportError(VIR_ERR_CONFIG_UNSUPPORTED, _("unknown sysinfo type '%s'"), type); goto error; } @@ -4429,13 +4431,13 @@ virDomainVideoDefParseXML(const xmlNodePtr node, if (type) { if ((def->type = virDomainVideoTypeFromString(type)) < 0) { - virDomainReportError(VIR_ERR_INTERNAL_ERROR, + virDomainReportError(VIR_ERR_CONFIG_UNSUPPORTED, _("unknown video model '%s'"), type); goto error; } } else { if ((def->type = virDomainVideoDefaultType(dom)) < 0) { - virDomainReportError(VIR_ERR_INTERNAL_ERROR, "%s", + virDomainReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", _("missing video model and cannot determine default")); goto error; } @@ -4443,7 +4445,7 @@ virDomainVideoDefParseXML(const xmlNodePtr node, if (vram) { if (virStrToLong_ui(vram, NULL, 10, &def->vram) < 0) { - virDomainReportError(VIR_ERR_INTERNAL_ERROR, + virDomainReportError(VIR_ERR_CONFIG_UNSUPPORTED, _("cannot parse video ram '%s'"), vram); goto error; } @@ -4453,7 +4455,7 @@ virDomainVideoDefParseXML(const xmlNodePtr node, if (heads) { if (virStrToLong_ui(heads, NULL, 10, &def->heads) < 0) { - virDomainReportError(VIR_ERR_INTERNAL_ERROR, + virDomainReportError(VIR_ERR_CONFIG_UNSUPPORTED, _("cannot parse video heads '%s'"), heads); goto error; } @@ -4666,7 +4668,7 @@ virDomainHostdevDefParseXML(const xmlNodePtr node, mode = virXMLPropString(node, "mode"); if (mode) { if ((def->mode=virDomainHostdevModeTypeFromString(mode)) < 0) { - virDomainReportError(VIR_ERR_INTERNAL_ERROR, + virDomainReportError(VIR_ERR_CONFIG_UNSUPPORTED, _("unknown hostdev mode '%s'"), mode); goto error; } @@ -4677,7 +4679,7 @@ virDomainHostdevDefParseXML(const xmlNodePtr node, type = virXMLPropString(node, "type"); if (type) { if ((def->source.subsys.type = virDomainHostdevSubsysTypeFromString(type)) < 0) { - virDomainReportError(VIR_ERR_INTERNAL_ERROR, + virDomainReportError(VIR_ERR_CONFIG_UNSUPPORTED, _("unknown host device type '%s'"), type); goto error; } @@ -4796,7 +4798,7 @@ virSecurityLabelDefParseXML(const virDomainDefPtr def, def->seclabel.type = virDomainSeclabelTypeFromString(p); VIR_FREE(p); if (def->seclabel.type < 0) { - virDomainReportError(VIR_ERR_XML_ERROR, + virDomainReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", _("invalid security type")); goto error; } @@ -5206,7 +5208,7 @@ virDomainDefParseBootXML(xmlXPathContextPtr ctxt, goto cleanup; } if ((val = virDomainBootTypeFromString(dev)) < 0) { - virDomainReportError(VIR_ERR_INTERNAL_ERROR, + virDomainReportError(VIR_ERR_CONFIG_UNSUPPORTED, _("unknown boot device '%s'"), dev); VIR_FREE(dev); @@ -5341,7 +5343,7 @@ static virDomainDefPtr virDomainDefParseXML(virCapsPtr caps, } if ((def->virtType = virDomainVirtTypeFromString(tmp)) < 0) { - virDomainReportError(VIR_ERR_INTERNAL_ERROR, + virDomainReportError(VIR_ERR_CONFIG_UNSUPPORTED, _("invalid domain type %s"), tmp); goto error; } @@ -5515,7 +5517,7 @@ static virDomainDefPtr virDomainDefParseXML(virCapsPtr caps, for (i = 0 ; i < n ; i++) { int val = virDomainFeatureTypeFromString((const char *)nodes[i]->name); if (val < 0) { - virDomainReportError(VIR_ERR_INTERNAL_ERROR, + virDomainReportError(VIR_ERR_CONFIG_UNSUPPORTED, _("unexpected feature %s"), nodes[i]->name); goto error; @@ -6177,7 +6179,7 @@ static virDomainDefPtr virDomainDefParseXML(virCapsPtr caps, int mode; if ((mode = virDomainSmbiosModeTypeFromString(tmp)) < 0) { - virDomainReportError(VIR_ERR_INTERNAL_ERROR, + virDomainReportError(VIR_ERR_CONFIG_UNSUPPORTED, _("unknown smbios mode '%s'"), tmp); goto error; } @@ -6252,7 +6254,7 @@ static virDomainObjPtr virDomainObjParseXML(virCapsPtr caps, goto error; } if ((obj->state = virDomainStateTypeFromString(tmp)) < 0) { - virDomainReportError(VIR_ERR_INTERNAL_ERROR, + virDomainReportError(VIR_ERR_CONFIG_UNSUPPORTED, _("invalid domain state '%s'"), tmp); VIR_FREE(tmp); goto error; @@ -9070,7 +9072,7 @@ virDomainSnapshotDefPtr virDomainSnapshotDefParseString(const char *xmlStr, } def->state = virDomainStateTypeFromString(state); if (def->state < 0) { - virDomainReportError(VIR_ERR_INTERNAL_ERROR, + virDomainReportError(VIR_ERR_CONFIG_UNSUPPORTED, _("Invalid state '%s' in domain snapshot XML"), state); goto cleanup; @@ -9421,7 +9423,7 @@ int virDomainDiskDefForeachPath(virDomainDiskDefPtr disk, formatStr = "raw"; /* Xen compat */ if ((format = virStorageFileFormatTypeFromString(formatStr)) < 0) { - virDomainReportError(VIR_ERR_INTERNAL_ERROR, + virDomainReportError(VIR_ERR_CONFIG_UNSUPPORTED, _("unknown disk format '%s' for %s"), disk->driverType, disk->src); return -1; diff --git a/src/conf/interface_conf.c b/src/conf/interface_conf.c index 2fa2fa0..37b9c7c 100644 --- a/src/conf/interface_conf.c +++ b/src/conf/interface_conf.c @@ -682,7 +682,7 @@ virInterfaceDefParseXML(xmlXPathContextPtr ctxt, int parentIfType) { } type = virInterfaceTypeFromString(tmp); if (type == -1) { - virInterfaceReportError(VIR_ERR_XML_ERROR, + virInterfaceReportError(VIR_ERR_CONFIG_UNSUPPORTED, _("unknown interface type %s"), tmp); VIR_FREE(tmp); return(NULL); diff --git a/src/conf/network_conf.c b/src/conf/network_conf.c index 5738757..7ab2352 100644 --- a/src/conf/network_conf.c +++ b/src/conf/network_conf.c @@ -671,7 +671,7 @@ virNetworkDefParseXML(xmlXPathContextPtr ctxt) tmp = virXPathString("string(./forward[1]/@mode)", ctxt); if (tmp) { if ((def->forwardType = virNetworkForwardTypeFromString(tmp)) < 0) { - virNetworkReportError(VIR_ERR_INTERNAL_ERROR, + virNetworkReportError(VIR_ERR_CONFIG_UNSUPPORTED, _("unknown forwarding type '%s'"), tmp); VIR_FREE(tmp); goto error; diff --git a/src/conf/node_device_conf.c b/src/conf/node_device_conf.c index 0b080ce..cc28b2a 100644 --- a/src/conf/node_device_conf.c +++ b/src/conf/node_device_conf.c @@ -832,7 +832,7 @@ virNodeDevCapNetParseXML(xmlXPathContextPtr ctxt, int val = virNodeDevNetCapTypeFromString(tmp); VIR_FREE(tmp); if (val < 0) { - virNodeDeviceReportError(VIR_ERR_INTERNAL_ERROR, + virNodeDeviceReportError(VIR_ERR_CONFIG_UNSUPPORTED, _("invalid network type supplied for '%s'"), def->name); goto out; @@ -1082,7 +1082,7 @@ virNodeDevCapsDefParseXML(xmlXPathContextPtr ctxt, } if ((val = virNodeDevCapTypeFromString(tmp)) < 0) { - virNodeDeviceReportError(VIR_ERR_INTERNAL_ERROR, + virNodeDeviceReportError(VIR_ERR_CONFIG_UNSUPPORTED, _("unknown capability type '%s'"), tmp); VIR_FREE(tmp); goto error; diff --git a/src/conf/nwfilter_conf.c b/src/conf/nwfilter_conf.c index 09dc32b..368aca0 100644 --- a/src/conf/nwfilter_conf.c +++ b/src/conf/nwfilter_conf.c @@ -1890,7 +1890,7 @@ virNWFilterRuleParse(xmlNodePtr node) } if ((ret->action = virNWFilterRuleActionTypeFromString(action)) < 0) { - virNWFilterReportError(VIR_ERR_INTERNAL_ERROR, + virNWFilterReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", _("unknown rule action attribute value")); goto err_exit; @@ -1904,7 +1904,7 @@ virNWFilterRuleParse(xmlNodePtr node) } if ((ret->tt = virNWFilterRuleDirectionTypeFromString(direction)) < 0) { - virNWFilterReportError(VIR_ERR_INTERNAL_ERROR, + virNWFilterReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", _("unknown rule direction attribute value")); goto err_exit; @@ -2003,7 +2003,7 @@ virNWFilterDefParseXML(xmlXPathContextPtr ctxt) { if (chain) { if ((ret->chainsuffix = virNWFilterChainSuffixTypeFromString(chain)) < 0) { - virNWFilterReportError(VIR_ERR_INTERNAL_ERROR, + virNWFilterReportError(VIR_ERR_CONFIG_UNSUPPORTED, _("unknown chain suffix '%s'"), chain); goto cleanup; } diff --git a/src/conf/secret_conf.c b/src/conf/secret_conf.c index fc4ae82..30f1a3d 100644 --- a/src/conf/secret_conf.c +++ b/src/conf/secret_conf.c @@ -74,7 +74,7 @@ virSecretDefParseUsage(xmlXPathContextPtr ctxt, } type = virSecretUsageTypeTypeFromString(type_str); if (type < 0) { - virSecretReportError(VIR_ERR_XML_ERROR, + virSecretReportError(VIR_ERR_CONFIG_UNSUPPORTED, _("unknown secret usage type %s"), type_str); VIR_FREE(type_str); return -1; diff --git a/src/conf/storage_conf.c b/src/conf/storage_conf.c index 116898d..9ccff15 100644 --- a/src/conf/storage_conf.c +++ b/src/conf/storage_conf.c @@ -630,7 +630,7 @@ virStoragePoolDefParseXML(xmlXPathContextPtr ctxt) { type = virXPathString("string(./@type)", ctxt); if ((ret->type = virStoragePoolTypeFromString((const char *)type)) < 0) { - virStorageReportError(VIR_ERR_INTERNAL_ERROR, + virStorageReportError(VIR_ERR_CONFIG_UNSUPPORTED, _("unknown storage pool type %s"), (const char*)type); goto cleanup; } diff --git a/src/conf/storage_encryption_conf.c b/src/conf/storage_encryption_conf.c index 20e822c..4414817 100644 --- a/src/conf/storage_encryption_conf.c +++ b/src/conf/storage_encryption_conf.c @@ -94,7 +94,7 @@ virStorageEncryptionSecretParse(xmlXPathContextPtr ctxt, } type = virStorageEncryptionSecretTypeTypeFromString(type_str); if (type < 0) { - virStorageReportError(VIR_ERR_XML_ERROR, + virStorageReportError(VIR_ERR_CONFIG_UNSUPPORTED, _("unknown volume encryption secret type %s"), type_str); VIR_FREE(type_str); @@ -148,7 +148,7 @@ virStorageEncryptionParseXML(xmlXPathContextPtr ctxt) } format = virStorageEncryptionFormatTypeFromString(format_str); if (format < 0) { - virStorageReportError(VIR_ERR_XML_ERROR, + virStorageReportError(VIR_ERR_CONFIG_UNSUPPORTED, _("unknown volume encryption format type %s"), format_str); VIR_FREE(format_str); -- 1.7.4.4 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list