mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-01 16:58:33 +03:00
conf: Move error messages onto a single line
Error messages are exempt from the 80 columns rule. Move them onto one line. Signed-off-by: Michal Privoznik <mprivozn@redhat.com> Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
This commit is contained in:
parent
bfa322d6ce
commit
80178428ca
@ -394,8 +394,7 @@ virCPUDefParseXML(xmlXPathContextPtr ctxt,
|
||||
if (virXPathBoolean("boolean(./arch)", ctxt)) {
|
||||
if (virXPathBoolean("boolean(./@match)", ctxt)) {
|
||||
virReportError(VIR_ERR_XML_ERROR, "%s",
|
||||
_("'arch' element cannot be used inside 'cpu'"
|
||||
" element with 'match' attribute'"));
|
||||
_("'arch' element cannot be used inside 'cpu' element with 'match' attribute'"));
|
||||
return -1;
|
||||
}
|
||||
def->type = VIR_CPU_TYPE_HOST;
|
||||
@ -436,8 +435,7 @@ virCPUDefParseXML(xmlXPathContextPtr ctxt,
|
||||
def->mode != VIR_CPU_MODE_HOST_PASSTHROUGH &&
|
||||
def->mode != VIR_CPU_MODE_MAXIMUM) {
|
||||
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
|
||||
_("Attribute migratable is only allowed for "
|
||||
"'host-passthrough' / 'maximum' CPU mode"));
|
||||
_("Attribute migratable is only allowed for 'host-passthrough' / 'maximum' CPU mode"));
|
||||
return -1;
|
||||
}
|
||||
|
||||
@ -593,8 +591,7 @@ virCPUDefParseXML(xmlXPathContextPtr ctxt,
|
||||
if (n > 0) {
|
||||
if (!def->model && def->mode == VIR_CPU_MODE_CUSTOM) {
|
||||
virReportError(VIR_ERR_XML_ERROR, "%s",
|
||||
_("Non-empty feature list specified without "
|
||||
"CPU model"));
|
||||
_("Non-empty feature list specified without CPU model"));
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
@ -905,8 +905,7 @@ virDomainPCIAddressEnsureAddr(virDomainPCIAddressSet *addrs,
|
||||
*/
|
||||
if (dev->addr.pci.function != 0) {
|
||||
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
|
||||
_("Only PCI device addresses with function=0"
|
||||
" are supported"));
|
||||
_("Only PCI device addresses with function=0 are supported"));
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
@ -2152,8 +2152,7 @@ virDomainDefSetVcpus(virDomainDef *def,
|
||||
|
||||
if (vcpus > def->maxvcpus) {
|
||||
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
|
||||
_("maximum vCPU count must not be less than current "
|
||||
"vCPU count"));
|
||||
_("maximum vCPU count must not be less than current vCPU count"));
|
||||
return -1;
|
||||
}
|
||||
|
||||
@ -4348,8 +4347,7 @@ virDomainObjUpdateModificationImpact(virDomainObj *vm,
|
||||
|
||||
if (!vm->persistent && (*flags & VIR_DOMAIN_AFFECT_CONFIG)) {
|
||||
virReportError(VIR_ERR_OPERATION_INVALID, "%s",
|
||||
_("transient domains do not have any "
|
||||
"persistent config"));
|
||||
_("transient domains do not have any persistent config"));
|
||||
return -1;
|
||||
}
|
||||
|
||||
@ -4429,9 +4427,7 @@ virDomainObjGetOneDefState(virDomainObj *vm,
|
||||
if (flags & VIR_DOMAIN_AFFECT_LIVE &&
|
||||
flags & VIR_DOMAIN_AFFECT_CONFIG) {
|
||||
virReportInvalidArg(flags, "%s",
|
||||
_("Flags 'VIR_DOMAIN_AFFECT_LIVE' and "
|
||||
"'VIR_DOMAIN_AFFECT_CONFIG' are mutually "
|
||||
"exclusive"));
|
||||
_("Flags 'VIR_DOMAIN_AFFECT_LIVE' and 'VIR_DOMAIN_AFFECT_CONFIG' are mutually exclusive"));
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@ -6027,8 +6023,7 @@ virDomainHostdevSubsysSCSIiSCSIDefParseXML(xmlNodePtr sourcenode,
|
||||
}
|
||||
if (iscsisrc->src->nhosts > 1) {
|
||||
virReportError(VIR_ERR_XML_ERROR, "%s",
|
||||
_("only one source host address may be specified "
|
||||
"for the iSCSI hostdev"));
|
||||
_("only one source host address may be specified for the iSCSI hostdev"));
|
||||
return -1;
|
||||
}
|
||||
|
||||
@ -6239,8 +6234,7 @@ virDomainHostdevDefParseXMLSubsys(xmlNodePtr node,
|
||||
if (def->source.subsys.type != VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_USB &&
|
||||
virXPathBoolean("boolean(./source/@startupPolicy)", ctxt)) {
|
||||
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
|
||||
_("Setting startupPolicy is only allowed for USB"
|
||||
" devices"));
|
||||
_("Setting startupPolicy is only allowed for USB devices"));
|
||||
return -1;
|
||||
}
|
||||
|
||||
@ -6885,8 +6879,7 @@ virSecurityLabelDefsParseXML(virDomainDef *def,
|
||||
for (; n; n--) {
|
||||
if (def->seclabels[n - 1]->model == NULL) {
|
||||
virReportError(VIR_ERR_XML_ERROR, "%s",
|
||||
_("missing security model "
|
||||
"when using multiple labels"));
|
||||
_("missing security model when using multiple labels"));
|
||||
goto error;
|
||||
}
|
||||
}
|
||||
@ -7075,8 +7068,7 @@ virDomainDiskSourcePoolDefParse(xmlNodePtr node,
|
||||
|
||||
if (!source->pool || !source->volume) {
|
||||
virReportError(VIR_ERR_XML_ERROR, "%s",
|
||||
_("'pool' and 'volume' must be specified together "
|
||||
"for 'pool' type source"));
|
||||
_("'pool' and 'volume' must be specified together for 'pool' type source"));
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
@ -7709,8 +7701,7 @@ virDomainDiskDefMirrorParse(virDomainDiskDef *def,
|
||||
} else {
|
||||
if (def->mirrorJob != VIR_DOMAIN_BLOCK_JOB_TYPE_COPY) {
|
||||
virReportError(VIR_ERR_XML_ERROR, "%s",
|
||||
_("mirror without type only supported "
|
||||
"by copy job"));
|
||||
_("mirror without type only supported by copy job"));
|
||||
return -1;
|
||||
}
|
||||
mirrorFormat = virXMLPropString(cur, "format");
|
||||
@ -8929,8 +8920,7 @@ virDomainActualNetDefParseXML(xmlNodePtr node,
|
||||
|
||||
if (!brname && actual->type == VIR_DOMAIN_NET_TYPE_BRIDGE) {
|
||||
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
|
||||
_("Missing <source> element with bridge name in "
|
||||
"interface's <actual> element"));
|
||||
_("Missing <source> element with bridge name in interface's <actual> element"));
|
||||
goto error;
|
||||
}
|
||||
actual->data.bridge.brname = brname;
|
||||
@ -9882,8 +9872,7 @@ virDomainChrDefParseTargetXML(virDomainChrDef *def,
|
||||
|
||||
if (addrStr == NULL) {
|
||||
virReportError(VIR_ERR_XML_ERROR, "%s",
|
||||
_("guestfwd channel does not "
|
||||
"define a target address"));
|
||||
_("guestfwd channel does not define a target address"));
|
||||
return -1;
|
||||
}
|
||||
|
||||
@ -9891,9 +9880,8 @@ virDomainChrDefParseTargetXML(virDomainChrDef *def,
|
||||
return -1;
|
||||
|
||||
if (def->target.addr->data.stor.ss_family != AF_INET) {
|
||||
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
|
||||
"%s", _("guestfwd channel only supports "
|
||||
"IPv4 addresses"));
|
||||
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
|
||||
_("guestfwd channel only supports IPv4 addresses"));
|
||||
return -1;
|
||||
}
|
||||
|
||||
@ -10137,14 +10125,12 @@ virDomainChrSourceDefParseXML(virDomainChrSourceDef *def,
|
||||
* user can specify two source elements. */
|
||||
if (nsources > 1 && def->type != VIR_DOMAIN_CHR_TYPE_UDP) {
|
||||
virReportError(VIR_ERR_XML_ERROR, "%s",
|
||||
_("only one source element is allowed for "
|
||||
"character device"));
|
||||
_("only one source element is allowed for character device"));
|
||||
goto error;
|
||||
}
|
||||
if (nsources > 2) {
|
||||
virReportError(VIR_ERR_XML_ERROR, "%s",
|
||||
_("only two source elements are allowed for "
|
||||
"character device"));
|
||||
_("only two source elements are allowed for character device"));
|
||||
goto error;
|
||||
}
|
||||
|
||||
@ -10229,8 +10215,7 @@ virDomainChrSourceDefParseXML(virDomainChrSourceDef *def,
|
||||
goto error;
|
||||
} else if (nlogs > 1) {
|
||||
virReportError(VIR_ERR_XML_ERROR, "%s",
|
||||
_("only one log element is allowed for "
|
||||
"character device"));
|
||||
_("only one log element is allowed for character device"));
|
||||
goto error;
|
||||
}
|
||||
|
||||
@ -10242,8 +10227,7 @@ virDomainChrSourceDefParseXML(virDomainChrSourceDef *def,
|
||||
goto error;
|
||||
} else if (nprotocols > 1) {
|
||||
virReportError(VIR_ERR_XML_ERROR, "%s",
|
||||
_("only one protocol element is allowed for "
|
||||
"character device"));
|
||||
_("only one protocol element is allowed for character device"));
|
||||
goto error;
|
||||
}
|
||||
|
||||
@ -10397,8 +10381,7 @@ virDomainChrDefParseXML(virDomainXMLOption *xmlopt,
|
||||
if (def->source->type == VIR_DOMAIN_CHR_TYPE_SPICEVMC) {
|
||||
if (def->targetType != VIR_DOMAIN_CHR_CHANNEL_TARGET_TYPE_VIRTIO) {
|
||||
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
|
||||
_("spicevmc device type only supports "
|
||||
"virtio"));
|
||||
_("spicevmc device type only supports virtio"));
|
||||
goto error;
|
||||
} else {
|
||||
def->source->data.spicevmc = VIR_DOMAIN_CHR_SPICEVMC_VDAGENT;
|
||||
@ -10451,8 +10434,7 @@ virDomainSmartcardDefParseXML(virDomainXMLOption *xmlopt,
|
||||
n = virXPathNodeSet("./certificate", ctxt, &certificates);
|
||||
if (n != VIR_DOMAIN_SMARTCARD_NUM_CERTIFICATES) {
|
||||
virReportError(VIR_ERR_XML_ERROR, "%s",
|
||||
_("host-certificates mode needs "
|
||||
"exactly three certificates"));
|
||||
_("host-certificates mode needs exactly three certificates"));
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@ -10480,8 +10462,7 @@ virDomainSmartcardDefParseXML(virDomainXMLOption *xmlopt,
|
||||
type = virXMLPropString(node, "type");
|
||||
if (type == NULL) {
|
||||
virReportError(VIR_ERR_XML_ERROR, "%s",
|
||||
_("passthrough mode requires a character "
|
||||
"device type attribute"));
|
||||
_("passthrough mode requires a character device type attribute"));
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@ -11069,8 +11050,7 @@ virDomainGraphicsListenDefParseXML(virDomainGraphicsListenDef *def,
|
||||
if (network && network[0]) {
|
||||
if (def->type != VIR_DOMAIN_GRAPHICS_LISTEN_TYPE_NETWORK) {
|
||||
virReportError(VIR_ERR_XML_ERROR, "%s",
|
||||
_("'network' attribute is valid only for listen "
|
||||
"type 'network'"));
|
||||
_("'network' attribute is valid only for listen type 'network'"));
|
||||
goto error;
|
||||
}
|
||||
def->network = g_steal_pointer(&network);
|
||||
@ -11079,8 +11059,7 @@ virDomainGraphicsListenDefParseXML(virDomainGraphicsListenDef *def,
|
||||
if (socketPath && socketPath[0]) {
|
||||
if (def->type != VIR_DOMAIN_GRAPHICS_LISTEN_TYPE_SOCKET) {
|
||||
virReportError(VIR_ERR_XML_ERROR, "%s",
|
||||
_("'socket' attribute is valid only for listen "
|
||||
"type 'socket'"));
|
||||
_("'socket' attribute is valid only for listen type 'socket'"));
|
||||
goto error;
|
||||
}
|
||||
def->socket = g_steal_pointer(&socketPath);
|
||||
@ -12685,8 +12664,7 @@ virSysinfoParseFWCfgDef(virSysinfoDef *def,
|
||||
|
||||
if (!value && !file) {
|
||||
virReportError(VIR_ERR_XML_ERROR, "%s",
|
||||
_("Firmware entry must have either value or "
|
||||
"'file' attribute"));
|
||||
_("Firmware entry must have either value or 'file' attribute"));
|
||||
return -1;
|
||||
}
|
||||
|
||||
@ -13476,8 +13454,7 @@ virDomainSEVDefParseXML(virDomainSEVDef *def,
|
||||
def->haveReducedPhysBits = true;
|
||||
} else if (rc == -2) {
|
||||
virReportError(VIR_ERR_XML_ERROR, "%s",
|
||||
_("Invalid format for launch security "
|
||||
"reduced-phys-bits"));
|
||||
_("Invalid format for launch security reduced-phys-bits"));
|
||||
return -1;
|
||||
}
|
||||
|
||||
@ -15444,8 +15421,7 @@ virDomainMemoryInsert(virDomainDef *def,
|
||||
if (mem->info.type != VIR_DOMAIN_DEVICE_ADDRESS_TYPE_NONE &&
|
||||
virDomainDefHasDeviceAddress(def, &mem->info)) {
|
||||
virReportError(VIR_ERR_OPERATION_INVALID, "%s",
|
||||
_("Domain already contains a device with the same "
|
||||
"address"));
|
||||
_("Domain already contains a device with the same address"));
|
||||
return -1;
|
||||
}
|
||||
|
||||
@ -18640,16 +18616,14 @@ virDomainDefControllersParse(virDomainDef *def,
|
||||
if (controller->model == VIR_DOMAIN_CONTROLLER_MODEL_USB_NONE) {
|
||||
if (usb_other || *usb_none) {
|
||||
virReportError(VIR_ERR_XML_DETAIL, "%s",
|
||||
_("Can't add another USB controller: "
|
||||
"USB is disabled for this domain"));
|
||||
_("Can't add another USB controller: USB is disabled for this domain"));
|
||||
return -1;
|
||||
}
|
||||
*usb_none = true;
|
||||
} else {
|
||||
if (*usb_none) {
|
||||
virReportError(VIR_ERR_XML_DETAIL, "%s",
|
||||
_("Can't add another USB controller: "
|
||||
"USB is disabled for this domain"));
|
||||
_("Can't add another USB controller: USB is disabled for this domain"));
|
||||
return -1;
|
||||
}
|
||||
usb_other = true;
|
||||
@ -18727,8 +18701,7 @@ virDomainDefParseXML(xmlXPathContextPtr ctxt,
|
||||
|
||||
if (virDomainNumaGetCPUCountTotal(def->numa) > virDomainDefGetVcpusMax(def)) {
|
||||
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
|
||||
_("Number of CPUs in <numa> exceeds the"
|
||||
" <vcpu> count"));
|
||||
_("Number of CPUs in <numa> exceeds the <vcpu> count"));
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@ -18982,8 +18955,7 @@ virDomainDefParseXML(xmlXPathContextPtr ctxt,
|
||||
if (input->bus == VIR_DOMAIN_INPUT_BUS_USB && usb_none) {
|
||||
virDomainInputDefFree(input);
|
||||
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
|
||||
_("Can't add USB input device. "
|
||||
"USB bus is disabled"));
|
||||
_("Can't add USB input device. USB bus is disabled"));
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@ -19085,8 +19057,7 @@ virDomainDefParseXML(xmlXPathContextPtr ctxt,
|
||||
if (hostdev->source.subsys.type == VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_USB &&
|
||||
usb_none) {
|
||||
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
|
||||
_("Can't add host USB device: "
|
||||
"USB is disabled in this host"));
|
||||
_("Can't add host USB device: USB is disabled in this host"));
|
||||
virDomainHostdevDefFree(hostdev);
|
||||
return NULL;
|
||||
}
|
||||
@ -19177,8 +19148,7 @@ virDomainDefParseXML(xmlXPathContextPtr ctxt,
|
||||
|
||||
if (n > 2) {
|
||||
virReportError(VIR_ERR_XML_ERROR, "%s",
|
||||
_("a maximum of two TPM devices is supported, one of "
|
||||
"them being a TPM Proxy device"));
|
||||
_("a maximum of two TPM devices is supported, one of them being a TPM Proxy device"));
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@ -19226,8 +19196,7 @@ virDomainDefParseXML(xmlXPathContextPtr ctxt,
|
||||
if (hub->type == VIR_DOMAIN_HUB_TYPE_USB && usb_none) {
|
||||
virDomainHubDefFree(hub);
|
||||
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
|
||||
_("Can't add USB hub: "
|
||||
"USB is disabled for this domain"));
|
||||
_("Can't add USB hub: USB is disabled for this domain"));
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@ -20358,8 +20327,7 @@ virDomainChannelDefCheckABIStability(virDomainChrDef *src,
|
||||
dst->source->type == VIR_DOMAIN_CHR_TYPE_SPICEVMC) &&
|
||||
!src->target.name) {
|
||||
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
|
||||
_("Changing device type to/from spicevmc would"
|
||||
" change default target channel name"));
|
||||
_("Changing device type to/from spicevmc would change default target channel name"));
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
@ -20937,8 +20905,7 @@ virDomainShmemDefCheckABIStability(virDomainShmemDef *src,
|
||||
|
||||
if (src->server.enabled != dst->server.enabled) {
|
||||
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
|
||||
_("Target shared memory server usage doesn't match "
|
||||
"source"));
|
||||
_("Target shared memory server usage doesn't match source"));
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -20946,8 +20913,7 @@ virDomainShmemDefCheckABIStability(virDomainShmemDef *src,
|
||||
src->msi.enabled != dst->msi.enabled ||
|
||||
src->msi.ioeventfd != dst->msi.ioeventfd) {
|
||||
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
|
||||
_("Target shared memory MSI configuration doesn't match "
|
||||
"source"));
|
||||
_("Target shared memory MSI configuration doesn't match source"));
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -21085,15 +21051,13 @@ virDomainMemoryDefCheckABIStability(virDomainMemoryDef *src,
|
||||
|
||||
if (src->source.nvdimm.pmem != dst->source.nvdimm.pmem) {
|
||||
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
|
||||
_("Target NVDIMM pmem flag doesn't match "
|
||||
"source NVDIMM pmem flag"));
|
||||
_("Target NVDIMM pmem flag doesn't match source NVDIMM pmem flag"));
|
||||
return false;
|
||||
}
|
||||
|
||||
if (src->target.nvdimm.readonly != dst->target.nvdimm.readonly) {
|
||||
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
|
||||
_("Target NVDIMM readonly flag doesn't match "
|
||||
"source NVDIMM readonly flag"));
|
||||
_("Target NVDIMM readonly flag doesn't match source NVDIMM readonly flag"));
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -21666,8 +21630,7 @@ virDomainDefCheckABIStabilityFlags(virDomainDef *src,
|
||||
|
||||
if (!!src->iommu != !!dst->iommu) {
|
||||
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
|
||||
_("Target domain IOMMU device count "
|
||||
"does not match source"));
|
||||
_("Target domain IOMMU device count does not match source"));
|
||||
goto error;
|
||||
}
|
||||
|
||||
@ -21677,8 +21640,7 @@ virDomainDefCheckABIStabilityFlags(virDomainDef *src,
|
||||
|
||||
if (!!src->vsock != !!dst->vsock) {
|
||||
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
|
||||
_("Target domain vsock device count "
|
||||
"does not match source"));
|
||||
_("Target domain vsock device count does not match source"));
|
||||
goto error;
|
||||
}
|
||||
|
||||
@ -28172,16 +28134,14 @@ virDomainDefCompatibleDevice(virDomainDef *def,
|
||||
def->os.type != VIR_DOMAIN_OSTYPE_EXE &&
|
||||
virDomainDeviceIsUSB(dev)) {
|
||||
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
|
||||
_("Device configuration is not compatible: "
|
||||
"Domain has no USB bus support"));
|
||||
_("Device configuration is not compatible: Domain has no USB bus support"));
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (data.newInfo && data.newInfo->bootIndex > 0) {
|
||||
if (def->os.nBootDevs > 0) {
|
||||
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
|
||||
_("per-device boot elements cannot be used"
|
||||
" together with os/boot elements"));
|
||||
_("per-device boot elements cannot be used together with os/boot elements"));
|
||||
return -1;
|
||||
}
|
||||
if (virDomainDeviceInfoIterate(def,
|
||||
@ -28195,8 +28155,7 @@ virDomainDefCompatibleDevice(virDomainDef *def,
|
||||
|
||||
if (!virDomainDefHasMemoryHotplug(def)) {
|
||||
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
|
||||
_("cannot use/hotplug a memory device when domain "
|
||||
"'maxMemory' is not defined"));
|
||||
_("cannot use/hotplug a memory device when domain 'maxMemory' is not defined"));
|
||||
return -1;
|
||||
}
|
||||
|
||||
@ -29603,23 +29562,20 @@ virDomainDefGetShortName(const virDomainDef *def)
|
||||
|
||||
if (len == (size_t) -1) {
|
||||
virReportSystemError(errno, "%s",
|
||||
_("Cannot convert domain name to "
|
||||
"wide character string"));
|
||||
_("Cannot convert domain name to wide character string"));
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (mbstowcs(wshortname, def->name, VIR_DOMAIN_SHORT_NAME_MAX) == (size_t) -1) {
|
||||
virReportSystemError(errno, "%s",
|
||||
_("Cannot convert domain name to "
|
||||
"wide character string"));
|
||||
_("Cannot convert domain name to wide character string"));
|
||||
return NULL;
|
||||
}
|
||||
|
||||
len = wcstombs(NULL, wshortname, 0);
|
||||
if (len == (size_t) -1) {
|
||||
virReportSystemError(errno, "%s",
|
||||
_("Cannot convert wide character string "
|
||||
"back to multi-byte domain name"));
|
||||
_("Cannot convert wide character string back to multi-byte domain name"));
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@ -29627,8 +29583,7 @@ virDomainDefGetShortName(const virDomainDef *def)
|
||||
|
||||
if (wcstombs(shortname, wshortname, len) == (size_t) -1) {
|
||||
virReportSystemError(errno, "%s",
|
||||
_("Cannot convert wide character string "
|
||||
"back to multi-byte domain name"));
|
||||
_("Cannot convert wide character string back to multi-byte domain name"));
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@ -30479,8 +30434,7 @@ virDomainStorageSourceTranslateSourcePool(virStorageSource *src,
|
||||
|
||||
if (src->srcpool->mode && pooldef->type != VIR_STORAGE_POOL_ISCSI) {
|
||||
virReportError(VIR_ERR_XML_ERROR, "%s",
|
||||
_("disk source mode is only valid when "
|
||||
"storage pool is of iscsi type"));
|
||||
_("disk source mode is only valid when storage pool is of iscsi type"));
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
@ -38,16 +38,14 @@ virDomainDefBootValidate(const virDomainDef *def)
|
||||
{
|
||||
if (def->os.bm_timeout_set && def->os.bm_timeout > 65535) {
|
||||
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
|
||||
_("invalid value for boot menu timeout, "
|
||||
"must be in range [0,65535]"));
|
||||
_("invalid value for boot menu timeout, must be in range [0,65535]"));
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (def->os.bios.rt_set &&
|
||||
(def->os.bios.rt_delay < -1 || def->os.bios.rt_delay > 65535)) {
|
||||
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
|
||||
_("invalid value for rebootTimeout, "
|
||||
"must be in range [-1,65535]"));
|
||||
_("invalid value for rebootTimeout, must be in range [-1,65535]"));
|
||||
return -1;
|
||||
}
|
||||
|
||||
@ -118,20 +116,17 @@ virDomainCheckVirtioOptionsAreAbsent(virDomainVirtioOptions *virtio)
|
||||
|
||||
if (virtio->iommu != VIR_TRISTATE_SWITCH_ABSENT) {
|
||||
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
|
||||
_("iommu driver option is only supported "
|
||||
"for virtio devices"));
|
||||
_("iommu driver option is only supported for virtio devices"));
|
||||
return -1;
|
||||
}
|
||||
if (virtio->ats != VIR_TRISTATE_SWITCH_ABSENT) {
|
||||
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
|
||||
_("ats driver option is only supported "
|
||||
"for virtio devices"));
|
||||
_("ats driver option is only supported for virtio devices"));
|
||||
return -1;
|
||||
}
|
||||
if (virtio->packed != VIR_TRISTATE_SWITCH_ABSENT) {
|
||||
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
|
||||
_("packed driver option is only supported "
|
||||
"for virtio devices"));
|
||||
_("packed driver option is only supported for virtio devices"));
|
||||
return -1;
|
||||
}
|
||||
|
||||
@ -163,8 +158,7 @@ virDomainVideoDefValidate(const virDomainVideoDef *video,
|
||||
if (def->videos[i]->type == VIR_DOMAIN_VIDEO_TYPE_NONE &&
|
||||
def->nvideos > 1) {
|
||||
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
|
||||
_("a 'none' video type must be the only video device "
|
||||
"defined for the domain"));
|
||||
_("a 'none' video type must be the only video device defined for the domain"));
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
@ -303,8 +297,7 @@ virSecurityDeviceLabelDefValidate(virSecurityDeviceLabelDef **seclabels,
|
||||
|
||||
if (!vmSeclabels[j]->relabel) {
|
||||
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
|
||||
_("label overrides require relabeling to be "
|
||||
"enabled at the domain level"));
|
||||
_("label overrides require relabeling to be enabled at the domain level"));
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
@ -543,8 +536,7 @@ virDomainDiskDefValidateSourceChainOne(const virStorageSource *src)
|
||||
encryption->encinfo.cipher_name) {
|
||||
|
||||
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
|
||||
_("supplying <cipher> for domain disk definition "
|
||||
"is unnecessary"));
|
||||
_("supplying <cipher> for domain disk definition is unnecessary"));
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
@ -554,15 +546,13 @@ virDomainDiskDefValidateSourceChainOne(const virStorageSource *src)
|
||||
src->protocol != VIR_STORAGE_NET_PROTOCOL_RBD) {
|
||||
if (src->snapshot) {
|
||||
virReportError(VIR_ERR_XML_ERROR, "%s",
|
||||
_("<snapshot> element is currently supported "
|
||||
"only with 'rbd' disks"));
|
||||
_("<snapshot> element is currently supported only with 'rbd' disks"));
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (src->configFile) {
|
||||
virReportError(VIR_ERR_XML_ERROR, "%s",
|
||||
_("<config> element is currently supported "
|
||||
"only with 'rbd' disks"));
|
||||
_("<config> element is currently supported only with 'rbd' disks"));
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
@ -998,8 +988,7 @@ virDomainChrSourceDefValidate(const virDomainChrSourceDef *src_def,
|
||||
if ((src_def->data.nmdm.master && !src_def->data.nmdm.slave) ||
|
||||
(!src_def->data.nmdm.master && src_def->data.nmdm.slave)) {
|
||||
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
|
||||
_("Should define both master and slave "
|
||||
"path attributes for nmdm device"));
|
||||
_("Should define both master and slave path attributes for nmdm device"));
|
||||
return -1;
|
||||
}
|
||||
|
||||
@ -1082,8 +1071,7 @@ virDomainRedirdevDefValidate(const virDomainDef *def,
|
||||
if (redirdev->bus == VIR_DOMAIN_REDIRDEV_BUS_USB &&
|
||||
!virDomainDefHasUSB(def)) {
|
||||
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
|
||||
_("cannot add redirected USB device: "
|
||||
"USB is disabled for this domain"));
|
||||
_("cannot add redirected USB device: USB is disabled for this domain"));
|
||||
return -1;
|
||||
}
|
||||
|
||||
@ -1641,8 +1629,7 @@ virDomainDefOSValidate(const virDomainDef *def,
|
||||
} else {
|
||||
if (def->os.firmwareFeatures) {
|
||||
virReportError(VIR_ERR_XML_DETAIL, "%s",
|
||||
_("cannot use feature-based firmware autoselection "
|
||||
"when firmware autoselection is disabled"));
|
||||
_("cannot use feature-based firmware autoselection when firmware autoselection is disabled"));
|
||||
return -1;
|
||||
}
|
||||
|
||||
@ -1742,8 +1729,7 @@ virDomainDefIOMMUValidate(const virDomainDef *def)
|
||||
if (def->iommu->intremap == VIR_TRISTATE_SWITCH_ON &&
|
||||
def->features[VIR_DOMAIN_FEATURE_IOAPIC] != VIR_DOMAIN_IOAPIC_QEMU) {
|
||||
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
|
||||
_("IOMMU interrupt remapping requires split I/O APIC "
|
||||
"(ioapic driver='qemu')"));
|
||||
_("IOMMU interrupt remapping requires split I/O APIC (ioapic driver='qemu')"));
|
||||
return -1;
|
||||
}
|
||||
|
||||
@ -2042,8 +2028,7 @@ virDomainNetDefValidate(const virDomainNetDef *net)
|
||||
if ((net->hostIP.nroutes || net->hostIP.nips) &&
|
||||
net->type != VIR_DOMAIN_NET_TYPE_ETHERNET) {
|
||||
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
|
||||
_("Invalid attempt to set network interface host-side IP route and/or address info on interface of type '%1$s'. "
|
||||
"This is only supported on interfaces of type 'ethernet'"),
|
||||
_("Invalid attempt to set network interface host-side IP route and/or address info on interface of type '%1$s'. This is only supported on interfaces of type 'ethernet'"),
|
||||
virDomainNetTypeToString(net->type));
|
||||
return -1;
|
||||
}
|
||||
@ -2169,8 +2154,7 @@ virDomainHostdevDefValidate(const virDomainHostdevDef *hostdev)
|
||||
hostdev->info->type != VIR_DOMAIN_DEVICE_ADDRESS_TYPE_UNASSIGNED &&
|
||||
hostdev->info->type != VIR_DOMAIN_DEVICE_ADDRESS_TYPE_PCI) {
|
||||
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
|
||||
_("PCI host devices must use 'pci' or "
|
||||
"'unassigned' address type"));
|
||||
_("PCI host devices must use 'pci' or 'unassigned' address type"));
|
||||
return -1;
|
||||
}
|
||||
break;
|
||||
@ -2178,8 +2162,7 @@ virDomainHostdevDefValidate(const virDomainHostdevDef *hostdev)
|
||||
if (hostdev->info->type != VIR_DOMAIN_DEVICE_ADDRESS_TYPE_NONE &&
|
||||
hostdev->info->type != VIR_DOMAIN_DEVICE_ADDRESS_TYPE_DRIVE) {
|
||||
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
|
||||
_("SCSI host device must use 'drive' "
|
||||
"address type"));
|
||||
_("SCSI host device must use 'drive' address type"));
|
||||
return -1;
|
||||
}
|
||||
if (hostdev->source.subsys.u.scsi.sgio == VIR_DOMAIN_DEVICE_SGIO_UNFILTERED) {
|
||||
@ -2193,8 +2176,7 @@ virDomainHostdevDefValidate(const virDomainHostdevDef *hostdev)
|
||||
hostdev->info->type != VIR_DOMAIN_DEVICE_ADDRESS_TYPE_PCI &&
|
||||
hostdev->info->type != VIR_DOMAIN_DEVICE_ADDRESS_TYPE_CCW) {
|
||||
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
|
||||
_("SCSI_host host device must use 'pci' "
|
||||
"or 'ccw' address type"));
|
||||
_("SCSI_host host device must use 'pci' or 'ccw' address type"));
|
||||
return -1;
|
||||
}
|
||||
break;
|
||||
|
@ -105,8 +105,7 @@ virNetDevBandwidthParse(virNetDevBandwidth **bandwidth,
|
||||
if (rc == 1) {
|
||||
if (!class_id) {
|
||||
virReportError(VIR_ERR_XML_DETAIL, "%s",
|
||||
_("classID attribute not supported on <bandwidth> "
|
||||
"in this usage context"));
|
||||
_("classID attribute not supported on <bandwidth> in this usage context"));
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
@ -47,8 +47,7 @@ virNetDevVlanParse(xmlNodePtr node, xmlXPathContextPtr ctxt, virNetDevVlan *def)
|
||||
|
||||
if (nTags == 0) {
|
||||
virReportError(VIR_ERR_XML_ERROR, "%s",
|
||||
_("missing tag id - each <vlan> must have "
|
||||
"at least one <tag id='n'/> subelement"));
|
||||
_("missing tag id - each <vlan> must have at least one <tag id='n'/> subelement"));
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
@ -106,8 +105,7 @@ virNetDevVlanParse(xmlNodePtr node, xmlXPathContextPtr ctxt, virNetDevVlan *def)
|
||||
}
|
||||
if (def->nativeMode != 0) {
|
||||
virReportError(VIR_ERR_XML_ERROR, "%s",
|
||||
_("invalid configuration in <vlan> - \"trunk='no'\" is "
|
||||
"not allowed with a native vlan id"));
|
||||
_("invalid configuration in <vlan> - \"trunk='no'\" is not allowed with a native vlan id"));
|
||||
goto cleanup;
|
||||
}
|
||||
/* allow (but discard) "trunk='no' if there is a single tag */
|
||||
|
@ -432,8 +432,7 @@ virNetworkDHCPLeaseTimeDefParseXML(virNetworkDHCPLeaseTimeDef **lease,
|
||||
if ((unit == VIR_NETWORK_DHCP_LEASETIME_UNIT_SECONDS && expiry < 120) ||
|
||||
(unit == VIR_NETWORK_DHCP_LEASETIME_UNIT_MINUTES && expiry < 2)) {
|
||||
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
|
||||
_("The minimum lease time should be greater "
|
||||
"than 2 minutes"));
|
||||
_("The minimum lease time should be greater than 2 minutes"));
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
@ -922,8 +921,7 @@ virNetworkDNSDefParseXML(const char *networkName,
|
||||
def->forwarders[i].domain = virXMLPropString(fwdNodes[i], "domain");
|
||||
if (!(addr || def->forwarders[i].domain)) {
|
||||
virReportError(VIR_ERR_XML_ERROR, "%s",
|
||||
_("Invalid forwarder element, must contain "
|
||||
"at least one of addr or domain"));
|
||||
_("Invalid forwarder element, must contain at least one of addr or domain"));
|
||||
return -1;
|
||||
}
|
||||
def->nfwds++;
|
||||
@ -2787,8 +2785,7 @@ virNetworkDefUpdateIPDHCPHost(virNetworkDef *def,
|
||||
VIR_SOCKET_ADDR_FAMILY(&ipdef->address)
|
||||
!= VIR_SOCKET_ADDR_FAMILY(&host.ip)) {
|
||||
virReportError(VIR_ERR_OPERATION_INVALID, "%s",
|
||||
_("the address family of a host entry IP must match "
|
||||
"the address family of the dhcp element's parent"));
|
||||
_("the address family of a host entry IP must match the address family of the dhcp element's parent"));
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
@ -2913,8 +2910,7 @@ virNetworkDefUpdateIPDHCPRange(virNetworkDef *def,
|
||||
if (command == VIR_NETWORK_UPDATE_COMMAND_MODIFY) {
|
||||
|
||||
virReportError(VIR_ERR_OPERATION_UNSUPPORTED, "%s",
|
||||
_("dhcp ranges cannot be modified, "
|
||||
"only added or deleted"));
|
||||
_("dhcp ranges cannot be modified, only added or deleted"));
|
||||
return -1;
|
||||
}
|
||||
|
||||
@ -2924,8 +2920,7 @@ virNetworkDefUpdateIPDHCPRange(virNetworkDef *def,
|
||||
if (VIR_SOCKET_ADDR_FAMILY(&ipdef->address)
|
||||
!= VIR_SOCKET_ADDR_FAMILY(&range.addr.start)) {
|
||||
virReportError(VIR_ERR_OPERATION_INVALID, "%s",
|
||||
_("the address family of a dhcp range must match "
|
||||
"the address family of the dhcp element's parent"));
|
||||
_("the address family of a dhcp range must match the address family of the dhcp element's parent"));
|
||||
return -1;
|
||||
}
|
||||
|
||||
@ -3014,8 +3009,7 @@ virNetworkDefUpdateForwardInterface(virNetworkDef *def,
|
||||
|
||||
if (command == VIR_NETWORK_UPDATE_COMMAND_MODIFY) {
|
||||
virReportError(VIR_ERR_OPERATION_UNSUPPORTED, "%s",
|
||||
_("forward interface entries cannot be modified, "
|
||||
"only added or deleted"));
|
||||
_("forward interface entries cannot be modified, only added or deleted"));
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
@ -3204,8 +3198,7 @@ virNetworkDefUpdateDNSHost(virNetworkDef *def,
|
||||
|
||||
if (command == VIR_NETWORK_UPDATE_COMMAND_MODIFY) {
|
||||
virReportError(VIR_ERR_OPERATION_UNSUPPORTED, "%s",
|
||||
_("DNS HOST records cannot be modified, "
|
||||
"only added or deleted"));
|
||||
_("DNS HOST records cannot be modified, only added or deleted"));
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
@ -3301,8 +3294,7 @@ virNetworkDefUpdateDNSSrv(virNetworkDef *def,
|
||||
|
||||
if (command == VIR_NETWORK_UPDATE_COMMAND_MODIFY) {
|
||||
virReportError(VIR_ERR_OPERATION_UNSUPPORTED, "%s",
|
||||
_("DNS SRV records cannot be modified, "
|
||||
"only added or deleted"));
|
||||
_("DNS SRV records cannot be modified, only added or deleted"));
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
@ -3383,8 +3375,7 @@ virNetworkDefUpdateDNSTxt(virNetworkDef *def,
|
||||
|
||||
if (command == VIR_NETWORK_UPDATE_COMMAND_MODIFY) {
|
||||
virReportError(VIR_ERR_OPERATION_UNSUPPORTED, "%s",
|
||||
_("DNS TXT records cannot be modified, "
|
||||
"only added or deleted"));
|
||||
_("DNS TXT records cannot be modified, only added or deleted"));
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
|
@ -930,8 +930,7 @@ virNodeDevCapMdevTypesParseXML(xmlXPathContextPtr ctxt,
|
||||
|
||||
if (!(type->id = virXPathString("string(./@id[1])", ctxt))) {
|
||||
virReportError(VIR_ERR_XML_ERROR, "%s",
|
||||
_("missing 'id' attribute for mediated device's "
|
||||
"<type> element"));
|
||||
_("missing 'id' attribute for mediated device's <type> element"));
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
|
@ -103,8 +103,7 @@ virNodeDeviceCreateVport(virStorageAdapterFCHost *fchost)
|
||||
} else {
|
||||
if (!(parent_hoststr = virVHBAFindVportHost(NULL))) {
|
||||
virReportError(VIR_ERR_XML_ERROR, "%s",
|
||||
_("'parent' for vHBA not specified, and "
|
||||
"cannot find one on this host"));
|
||||
_("'parent' for vHBA not specified, and cannot find one on this host"));
|
||||
return NULL;
|
||||
}
|
||||
skip_capable_check = true;
|
||||
|
@ -147,15 +147,13 @@ virDomainNumatuneNodeParseXML(virDomainNuma *numa,
|
||||
if (numa->memory.specified &&
|
||||
numa->memory.placement == VIR_DOMAIN_NUMATUNE_PLACEMENT_AUTO) {
|
||||
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
|
||||
_("Per-node binding is not compatible with "
|
||||
"automatic NUMA placement."));
|
||||
_("Per-node binding is not compatible with automatic NUMA placement."));
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (!numa->nmem_nodes) {
|
||||
virReportError(VIR_ERR_XML_ERROR, "%s",
|
||||
_("Element 'memnode' is invalid without "
|
||||
"any guest NUMA cells"));
|
||||
_("Element 'memnode' is invalid without any guest NUMA cells"));
|
||||
return -1;
|
||||
}
|
||||
|
||||
@ -171,8 +169,7 @@ virDomainNumatuneNodeParseXML(virDomainNuma *numa,
|
||||
|
||||
if (cellid >= numa->nmem_nodes) {
|
||||
virReportError(VIR_ERR_XML_ERROR, "%s",
|
||||
_("Argument 'cellid' in memnode element must "
|
||||
"correspond to existing guest's NUMA cell"));
|
||||
_("Argument 'cellid' in memnode element must correspond to existing guest's NUMA cell"));
|
||||
return -1;
|
||||
}
|
||||
|
||||
@ -194,8 +191,7 @@ virDomainNumatuneNodeParseXML(virDomainNuma *numa,
|
||||
tmp = virXMLPropString(cur_node, "nodeset");
|
||||
if (!tmp) {
|
||||
virReportError(VIR_ERR_XML_ERROR, "%s",
|
||||
_("Missing required nodeset attribute "
|
||||
"in memnode element"));
|
||||
_("Missing required nodeset attribute in memnode element"));
|
||||
return -1;
|
||||
}
|
||||
if (virBitmapParse(tmp, &mem_node->nodeset, VIR_DOMAIN_CPUMASK_LEN) < 0)
|
||||
@ -447,8 +443,7 @@ virDomainNumatuneMaybeGetNodeset(virDomainNuma *numatune,
|
||||
numatune->memory.placement == VIR_DOMAIN_NUMATUNE_PLACEMENT_AUTO &&
|
||||
!auto_nodeset) {
|
||||
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
|
||||
_("Advice from numad is needed in case of "
|
||||
"automatic numa placement"));
|
||||
_("Advice from numad is needed in case of automatic numa placement"));
|
||||
return -1;
|
||||
}
|
||||
|
||||
@ -533,8 +528,7 @@ virDomainNumatuneSet(virDomainNuma *numa,
|
||||
if (placement == VIR_DOMAIN_NUMATUNE_PLACEMENT_STATIC &&
|
||||
!numa->memory.nodeset) {
|
||||
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
|
||||
_("nodeset for NUMA memory tuning must be set "
|
||||
"if 'placement' is 'static'"));
|
||||
_("nodeset for NUMA memory tuning must be set if 'placement' is 'static'"));
|
||||
return -1;
|
||||
}
|
||||
|
||||
@ -878,9 +872,7 @@ virDomainNumaDefParseXML(virDomainNuma *def,
|
||||
/* cells are in order of parsing or explicitly numbered */
|
||||
if (cur_cell >= n) {
|
||||
virReportError(VIR_ERR_XML_ERROR, "%s",
|
||||
_("Exactly one 'cell' element per guest "
|
||||
"NUMA cell allowed, non-contiguous ranges or "
|
||||
"ranges not starting from 0 are not allowed"));
|
||||
_("Exactly one 'cell' element per guest NUMA cell allowed, non-contiguous ranges or ranges not starting from 0 are not allowed"));
|
||||
return -1;
|
||||
}
|
||||
|
||||
@ -1385,8 +1377,7 @@ virDomainNumaSetNodeDistance(virDomainNuma *numa,
|
||||
if (!distances ||
|
||||
cellid >= numa->mem_nodes[node].ndistances) {
|
||||
virReportError(VIR_ERR_XML_ERROR, "%s",
|
||||
_("Arguments under memnode element do not "
|
||||
"correspond with existing guest's NUMA cell"));
|
||||
_("Arguments under memnode element do not correspond with existing guest's NUMA cell"));
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
@ -362,10 +362,8 @@ virNWFilterVarCombIterAddVariable(virNWFilterVarCombIterEntry *cie,
|
||||
cie->curValue = minValue;
|
||||
} else {
|
||||
if (cie->maxValue != maxValue) {
|
||||
virReportError(VIR_ERR_INTERNAL_ERROR,
|
||||
_("Cardinality of list items must be "
|
||||
"the same for processing them in "
|
||||
"parallel"));
|
||||
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
|
||||
_("Cardinality of list items must be the same for processing them in parallel"));
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
@ -355,8 +355,7 @@ virDomainSnapshotDefParse(xmlXPathContextPtr ctxt,
|
||||
def->memory != VIR_DOMAIN_SNAPSHOT_LOCATION_DEFAULT &&
|
||||
def->memory != VIR_DOMAIN_SNAPSHOT_LOCATION_NO) {
|
||||
virReportError(VIR_ERR_XML_ERROR, "%s",
|
||||
_("memory state cannot be saved with offline or "
|
||||
"disk-only snapshot"));
|
||||
_("memory state cannot be saved with offline or disk-only snapshot"));
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
@ -100,8 +100,7 @@ virStorageAdapterParseXMLSCSIHost(xmlNodePtr node,
|
||||
&scsi_host->unique_id) < 0) ||
|
||||
(scsi_host->unique_id < 0)) {
|
||||
virReportError(VIR_ERR_XML_ERROR, "%s",
|
||||
_("Missing or invalid scsi adapter "
|
||||
"'unique_id' value"));
|
||||
_("Missing or invalid scsi adapter 'unique_id' value"));
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
@ -140,15 +139,13 @@ virStorageAdapterParseXMLLegacy(xmlNodePtr node,
|
||||
VIR_FREE(wwpn);
|
||||
VIR_FREE(parent);
|
||||
virReportError(VIR_ERR_XML_ERROR, "%s",
|
||||
_("Use of 'wwnn', 'wwpn', and 'parent' attributes "
|
||||
"requires use of the adapter 'type'"));
|
||||
_("Use of 'wwnn', 'wwpn', and 'parent' attributes requires use of the adapter 'type'"));
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (virXPathNode("./parentaddr", ctxt)) {
|
||||
virReportError(VIR_ERR_XML_ERROR, "%s",
|
||||
_("Use of 'parentaddr' element requires use "
|
||||
"of the adapter 'type'"));
|
||||
_("Use of 'parentaddr' element requires use of the adapter 'type'"));
|
||||
return -1;
|
||||
}
|
||||
|
||||
@ -198,8 +195,7 @@ virStorageAdapterValidateFCHost(virStorageAdapterFCHost *fchost)
|
||||
{
|
||||
if (!fchost->wwnn || !fchost->wwpn) {
|
||||
virReportError(VIR_ERR_XML_ERROR, "%s",
|
||||
_("'wwnn' and 'wwpn' must be specified for adapter "
|
||||
"type 'fchost'"));
|
||||
_("'wwnn' and 'wwpn' must be specified for adapter type 'fchost'"));
|
||||
return -1;
|
||||
}
|
||||
|
||||
@ -238,15 +234,13 @@ virStorageAdapterValidateSCSIHost(virStorageAdapterSCSIHost *scsi_host)
|
||||
{
|
||||
if (!scsi_host->name && !scsi_host->has_parent) {
|
||||
virReportError(VIR_ERR_XML_ERROR, "%s",
|
||||
_("Either 'name' or 'parent' must be specified "
|
||||
"for the 'scsi_host' adapter"));
|
||||
_("Either 'name' or 'parent' must be specified for the 'scsi_host' adapter"));
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (scsi_host->name && scsi_host->has_parent) {
|
||||
virReportError(VIR_ERR_XML_ERROR, "%s",
|
||||
_("Both 'name' and 'parent' cannot be specified "
|
||||
"for the 'scsi_host' adapter"));
|
||||
_("Both 'name' and 'parent' cannot be specified for the 'scsi_host' adapter"));
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
@ -492,8 +492,7 @@ virDomainObjBeginJobInternal(virDomainObj *obj,
|
||||
agentBlocker);
|
||||
} else {
|
||||
virReportError(VIR_ERR_OPERATION_FAILED, "%s",
|
||||
_("cannot acquire state change lock "
|
||||
"due to max_queued limit"));
|
||||
_("cannot acquire state change lock due to max_queued limit"));
|
||||
}
|
||||
ret = -2;
|
||||
} else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user