tools: 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:
Michal Privoznik 2023-08-24 17:04:34 +02:00
parent d918ac2977
commit f9947f75b9
11 changed files with 47 additions and 94 deletions

View File

@ -418,8 +418,7 @@ virshEventGraphicsPrint(virConnectPtr conn G_GNUC_UNUSED,
g_auto(virBuffer) buf = VIR_BUFFER_INITIALIZER; g_auto(virBuffer) buf = VIR_BUFFER_INITIALIZER;
size_t i; size_t i;
virBufferAsprintf(&buf, _("event 'graphics' for domain '%1$s': " virBufferAsprintf(&buf, _("event 'graphics' for domain '%1$s': %2$s local[%3$s %4$s %5$s] remote[%6$s %7$s %8$s] %9$s\n"),
"%2$s local[%3$s %4$s %5$s] remote[%6$s %7$s %8$s] %9$s\n"),
virDomainGetName(dom), virDomainGetName(dom),
virshGraphicsPhaseToString(phase), virshGraphicsPhaseToString(phase),
virshGraphicsAddressToString(local->family), virshGraphicsAddressToString(local->family),
@ -497,8 +496,7 @@ virshEventDiskChangePrint(virConnectPtr conn G_GNUC_UNUSED,
{ {
g_auto(virBuffer) buf = VIR_BUFFER_INITIALIZER; g_auto(virBuffer) buf = VIR_BUFFER_INITIALIZER;
virBufferAsprintf(&buf, _("event 'disk-change' for domain '%1$s' disk %2$s: " virBufferAsprintf(&buf, _("event 'disk-change' for domain '%1$s' disk %2$s: %3$s -> %4$s: %5$s\n"),
"%3$s -> %4$s: %5$s\n"),
virDomainGetName(dom), virDomainGetName(dom),
alias, alias,
NULLSTR(oldSrc), NULLSTR(oldSrc),
@ -633,8 +631,7 @@ virshEventAgentLifecyclePrint(virConnectPtr conn G_GNUC_UNUSED,
{ {
g_auto(virBuffer) buf = VIR_BUFFER_INITIALIZER; g_auto(virBuffer) buf = VIR_BUFFER_INITIALIZER;
virBufferAsprintf(&buf, _("event 'agent-lifecycle' for domain '%1$s': state: " virBufferAsprintf(&buf, _("event 'agent-lifecycle' for domain '%1$s': state: '%2$s' reason: '%3$s'\n"),
"'%2$s' reason: '%3$s'\n"),
virDomainGetName(dom), virDomainGetName(dom),
UNKNOWNSTR(virshEventAgentLifecycleStateTypeToString(state)), UNKNOWNSTR(virshEventAgentLifecycleStateTypeToString(state)),
UNKNOWNSTR(virshEventAgentLifecycleReasonTypeToString(reason))); UNKNOWNSTR(virshEventAgentLifecycleReasonTypeToString(reason)));
@ -649,8 +646,7 @@ virshEventMigrationIterationPrint(virConnectPtr conn G_GNUC_UNUSED,
{ {
g_auto(virBuffer) buf = VIR_BUFFER_INITIALIZER; g_auto(virBuffer) buf = VIR_BUFFER_INITIALIZER;
virBufferAsprintf(&buf, _("event 'migration-iteration' for domain '%1$s': " virBufferAsprintf(&buf, _("event 'migration-iteration' for domain '%1$s': iteration: '%2$d'\n"),
"iteration: '%2$d'\n"),
virDomainGetName(dom), virDomainGetName(dom),
iteration); iteration);
@ -727,8 +723,7 @@ virshEventBlockThresholdPrint(virConnectPtr conn G_GNUC_UNUSED,
{ {
g_auto(virBuffer) buf = VIR_BUFFER_INITIALIZER; g_auto(virBuffer) buf = VIR_BUFFER_INITIALIZER;
virBufferAsprintf(&buf, _("event 'block-threshold' for domain '%1$s': " virBufferAsprintf(&buf, _("event 'block-threshold' for domain '%1$s': dev: %2$s(%3$s) %4$llu %5$llu\n"),
"dev: %2$s(%3$s) %4$llu %5$llu\n"),
virDomainGetName(dom), virDomainGetName(dom),
dev, NULLSTR(path), threshold, excess); dev, NULLSTR(path), threshold, excess);
virshEventPrint(opaque, &buf); virshEventPrint(opaque, &buf);

View File

@ -2143,14 +2143,12 @@ cmdBlockcommit(vshControl *ctl, const vshCmd *cmd)
if (!blocking) { if (!blocking) {
if (verbose) { if (verbose) {
vshError(ctl, "%s", _("--verbose requires at least one of --timeout, " vshError(ctl, "%s", _("--verbose requires at least one of --timeout, --wait, --pivot, or --keep-overlay"));
"--wait, --pivot, or --keep-overlay"));
return false; return false;
} }
if (async) { if (async) {
vshError(ctl, "%s", _("--async requires at least one of --timeout, " vshError(ctl, "%s", _("--async requires at least one of --timeout, --wait, --pivot, or --keep-overlay"));
"--wait, --pivot, or --keep-overlay"));
return false; return false;
} }
} }
@ -2214,8 +2212,7 @@ cmdBlockcommit(vshControl *ctl, const vshCmd *cmd)
goto cleanup; goto cleanup;
} }
vshPrintExtra(ctl, "\n%s", _("Commit complete, overlay " vshPrintExtra(ctl, "\n%s", _("Commit complete, overlay image kept"));
"image kept"));
} else { } else {
vshPrintExtra(ctl, "\n%s", _("Now in synchronized phase")); vshPrintExtra(ctl, "\n%s", _("Now in synchronized phase"));
} }
@ -2411,14 +2408,12 @@ cmdBlockcopy(vshControl *ctl, const vshCmd *cmd)
if (!blocking) { if (!blocking) {
if (verbose) { if (verbose) {
vshError(ctl, "%s", _("--verbose requires at least one of --timeout, " vshError(ctl, "%s", _("--verbose requires at least one of --timeout, --wait, --pivot, or --finish"));
"--wait, --pivot, or --finish"));
return false; return false;
} }
if (async) { if (async) {
vshError(ctl, "%s", _("--async requires at least one of --timeout, " vshError(ctl, "%s", _("--async requires at least one of --timeout, --wait, --pivot, or --finish"));
"--wait, --pivot, or --finish"));
return false; return false;
} }
} }
@ -3703,8 +3698,7 @@ cmdUndefine(vshControl *ctl, const vshCmd *cmd)
if (!(vol_string || remove_all_storage) && wipe_storage) { if (!(vol_string || remove_all_storage) && wipe_storage) {
vshError(ctl, vshError(ctl,
_("'--wipe-storage' requires '--storage <string>' or " _("'--wipe-storage' requires '--storage <string>' or '--remove-all-storage'"));
"'--remove-all-storage'"));
return false; return false;
} }
@ -3789,8 +3783,7 @@ cmdUndefine(vshControl *ctl, const vshCmd *cmd)
if (vol_string || remove_all_storage) { if (vol_string || remove_all_storage) {
if (running) { if (running) {
vshError(ctl, vshError(ctl,
_("Storage volume deletion is supported only on " _("Storage volume deletion is supported only on stopped domains"));
"stopped domains"));
goto cleanup; goto cleanup;
} }
@ -3927,8 +3920,7 @@ cmdUndefine(vshControl *ctl, const vshCmd *cmd)
if (has_managed_save) { if (has_managed_save) {
if (!managed_save) { if (!managed_save) {
vshError(ctl, "%s", vshError(ctl, "%s",
_("Refusing to undefine while domain managed save " _("Refusing to undefine while domain managed save image exists"));
"image exists"));
goto cleanup; goto cleanup;
} }
if (virDomainManagedSaveRemove(dom, 0) < 0) { if (virDomainManagedSaveRemove(dom, 0) < 0) {
@ -5149,8 +5141,7 @@ cmdSchedInfoUpdate(vshControl *ctl, const vshCmd *cmd,
g_autofree char *set_field = g_strdup(opt->data); g_autofree char *set_field = g_strdup(opt->data);
if (!(set_val = strchr(set_field, '='))) { if (!(set_val = strchr(set_field, '='))) {
vshError(ctl, "%s", _("Invalid syntax for --set, " vshError(ctl, "%s", _("Invalid syntax for --set, expecting name=value"));
"expecting name=value"));
goto cleanup; goto cleanup;
} }
@ -7400,8 +7391,7 @@ cmdGuestvcpus(vshControl *ctl, const vshCmd *cmd)
return false; return false;
if (cpulist && !(enable || disable)) { if (cpulist && !(enable || disable)) {
vshError(ctl, _("One of options --enable or --disable is required by " vshError(ctl, _("One of options --enable or --disable is required by option --cpulist"));
"option --cpulist"));
return false; return false;
} }
@ -12528,8 +12518,7 @@ virshDomainDetachInterface(char *doc,
if (virMacAddrCompare(tmp_mac, mac) == 0) { if (virMacAddrCompare(tmp_mac, mac) == 0) {
if (matchNode) { if (matchNode) {
/* this is the 2nd match, so it's ambiguous */ /* this is the 2nd match, so it's ambiguous */
vshError(ctl, _("Domain has multiple interfaces matching MAC address %1$s. " vshError(ctl, _("Domain has multiple interfaces matching MAC address %1$s. You must use detach-device and specify the device pci address to remove it."),
"You must use detach-device and specify the device pci address to remove it."),
mac); mac);
return false; return false;
} }
@ -13787,8 +13776,7 @@ cmdDomDirtyRateCalc(vshControl *ctl, const vshCmd *cmd)
if (virDomainStartDirtyRateCalc(dom, seconds, flags) < 0) if (virDomainStartDirtyRateCalc(dom, seconds, flags) < 0)
return false; return false;
vshPrintExtra(ctl, _("Start to calculate domain's memory " vshPrintExtra(ctl, _("Start to calculate domain's memory dirty rate successfully.\n"));
"dirty rate successfully.\n"));
return true; return true;
} }

View File

@ -355,8 +355,7 @@ cmdFreepages(vshControl *ctl, const vshCmd *cmd)
nodes_cnt = virXPathNodeSet("/capabilities/host/topology/cells/cell/pages", nodes_cnt = virXPathNodeSet("/capabilities/host/topology/cells/cell/pages",
ctxt, &nodes); ctxt, &nodes);
if (nodes_cnt <= 0) { if (nodes_cnt <= 0) {
vshError(ctl, "%s", _("could not get information about " vshError(ctl, "%s", _("could not get information about supported page sizes"));
"supported page sizes"));
goto cleanup; goto cleanup;
} }
} }
@ -548,8 +547,7 @@ cmdAllocpages(vshControl *ctl, const vshCmd *cmd)
ctxt, &nodes); ctxt, &nodes);
if (nodes_cnt == -1) { if (nodes_cnt == -1) {
vshError(ctl, "%s", _("could not get information about " vshError(ctl, "%s", _("could not get information about NUMA topology"));
"NUMA topology"));
return false; return false;
} }
@ -1180,8 +1178,7 @@ vshExtractCPUDefXMLs(vshControl *ctl,
while (nodes[i]->properties) { while (nodes[i]->properties) {
if (xmlRemoveProp(nodes[i]->properties) < 0) { if (xmlRemoveProp(nodes[i]->properties) < 0) {
vshError(ctl, vshError(ctl,
_("Cannot extract CPU definition from domain " _("Cannot extract CPU definition from domain capabilities XML"));
"capabilities XML"));
return NULL; return NULL;
} }
} }

View File

@ -1093,8 +1093,7 @@ cmdNetworkList(vshControl *ctl, const vshCmd *cmd G_GNUC_UNUSED)
if (optTable + optName + optUUID > 1) { if (optTable + optName + optUUID > 1) {
vshError(ctl, "%s", vshError(ctl, "%s",
_("Only one argument from --table, --name and --uuid " _("Only one argument from --table, --name and --uuid may be specified."));
"may be specified."));
return false; return false;
} }
@ -2140,8 +2139,7 @@ cmdNetworkPortList(vshControl *ctl, const vshCmd *cmd)
if (optTable + optUUID > 1) { if (optTable + optUUID > 1) {
vshError(ctl, "%s", vshError(ctl, "%s",
_("Only one argument from --table and --uuid " _("Only one argument from --table and --uuid may be specified."));
"may be specified."));
return false; return false;
} }

View File

@ -297,8 +297,7 @@ virshNodeDeviceListCollect(vshControl *ctl,
device = list->devices[i]; device = list->devices[i];
if ((ncaps = virNodeDeviceNumOfCaps(device)) < 0) { if ((ncaps = virNodeDeviceNumOfCaps(device)) < 0) {
vshError(ctl, "%s", _("Failed to get capability numbers " vshError(ctl, "%s", _("Failed to get capability numbers of the device"));
"of the device"));
goto cleanup; goto cleanup;
} }

View File

@ -895,8 +895,7 @@ virshStoragePoolListCollect(vshControl *ctl,
/* There is no way to get the pool type */ /* There is no way to get the pool type */
if (VSH_MATCH(VIR_CONNECT_LIST_STORAGE_POOLS_FILTERS_POOL_TYPE)) { if (VSH_MATCH(VIR_CONNECT_LIST_STORAGE_POOLS_FILTERS_POOL_TYPE)) {
vshError(ctl, "%s", _("Filtering using --type is not supported " vshError(ctl, "%s", _("Filtering using --type is not supported by this libvirt"));
"by this libvirt"));
goto cleanup; goto cleanup;
} }

View File

@ -166,8 +166,7 @@ virshConnect(vshControl *ctl, const char *uri, bool readonly)
virConnectSetKeepAlive(c, interval, count) != 0) { virConnectSetKeepAlive(c, interval, count) != 0) {
if (keepalive_forced) { if (keepalive_forced) {
vshError(ctl, "%s", vshError(ctl, "%s",
_("Cannot setup keepalive on connection " _("Cannot setup keepalive on connection as requested, disconnecting"));
"as requested, disconnecting"));
g_clear_pointer(&c, virConnectClose); g_clear_pointer(&c, virConnectClose);
goto cleanup; goto cleanup;
} }
@ -209,8 +208,7 @@ virshReconnect(vshControl *ctl, const char *name, bool readonly, bool force)
if (ret < 0) if (ret < 0)
vshError(ctl, "%s", _("Failed to disconnect from the hypervisor")); vshError(ctl, "%s", _("Failed to disconnect from the hypervisor"));
else if (ret > 0) else if (ret > 0)
vshError(ctl, "%s", _("One or more references were leaked after " vshError(ctl, "%s", _("One or more references were leaked after disconnect from the hypervisor"));
"disconnect from the hypervisor"));
} }
priv->conn = virshConnect(ctl, name ? name : ctl->connname, readonly); priv->conn = virshConnect(ctl, name ? name : ctl->connname, readonly);
@ -400,8 +398,7 @@ virshDeinit(vshControl *ctl)
if (ret < 0) if (ret < 0)
vshError(ctl, "%s", _("Failed to disconnect from the hypervisor")); vshError(ctl, "%s", _("Failed to disconnect from the hypervisor"));
else if (ret > 0) else if (ret > 0)
vshError(ctl, "%s", _("One or more references were leaked after " vshError(ctl, "%s", _("One or more references were leaked after disconnect from the hypervisor"));
"disconnect from the hypervisor"));
} }
virResetLastError(); virResetLastError();

View File

@ -139,8 +139,7 @@ vshAdmDisconnect(vshControl *ctl)
if (ret < 0) if (ret < 0)
vshError(ctl, "%s", _("Failed to disconnect from the admin server")); vshError(ctl, "%s", _("Failed to disconnect from the admin server"));
else if (ret > 0) else if (ret > 0)
vshError(ctl, "%s", _("One or more references were leaked after " vshError(ctl, "%s", _("One or more references were leaked after disconnect from the hypervisor"));
"disconnect from the hypervisor"));
priv->conn = NULL; priv->conn = NULL;
return ret; return ret;
} }
@ -500,8 +499,7 @@ cmdSrvThreadpoolSet(vshControl *ctl, const vshCmd *cmd)
if (!nparams) { if (!nparams) {
vshError(ctl, "%s", vshError(ctl, "%s",
_("At least one of options --min-workers, --max-workers, " _("At least one of options --min-workers, --max-workers, --priority-workers is mandatory"));
"--priority-workers is mandatory"));
goto cleanup; goto cleanup;
} }
@ -509,8 +507,7 @@ cmdSrvThreadpoolSet(vshControl *ctl, const vshCmd *cmd)
VIR_THREADPOOL_WORKERS_MAX, &max) && VIR_THREADPOOL_WORKERS_MAX, &max) &&
virTypedParamsGetUInt(params, nparams, virTypedParamsGetUInt(params, nparams,
VIR_THREADPOOL_WORKERS_MIN, &min) && min > max) { VIR_THREADPOOL_WORKERS_MIN, &min) && min > max) {
vshError(ctl, "%s", _("--min-workers must be less than or equal to " vshError(ctl, "%s", _("--min-workers must be less than or equal to --max-workers"));
"--max-workers"));
goto cleanup; goto cleanup;
} }
@ -820,8 +817,7 @@ cmdSrvClientsInfo(vshControl *ctl, const vshCmd *cmd)
goto cleanup; goto cleanup;
if (virAdmServerGetClientLimits(srv, &params, &nparams, 0) < 0) { if (virAdmServerGetClientLimits(srv, &params, &nparams, 0) < 0) {
vshError(ctl, "%s", _("Unable to retrieve client limits " vshError(ctl, "%s", _("Unable to retrieve client limits from server's configuration"));
"from server's configuration"));
goto cleanup; goto cleanup;
} }
@ -904,8 +900,7 @@ cmdSrvClientsSet(vshControl *ctl, const vshCmd *cmd)
#undef PARSE_CMD_TYPED_PARAM #undef PARSE_CMD_TYPED_PARAM
if (!nparams) { if (!nparams) {
vshError(ctl, "%s", _("At least one of options --max-clients, " vshError(ctl, "%s", _("At least one of options --max-clients, --max-unauth-clients is mandatory"));
"--max-unauth-clients is mandatory"));
goto cleanup; goto cleanup;
} }
@ -914,8 +909,7 @@ cmdSrvClientsSet(vshControl *ctl, const vshCmd *cmd)
virTypedParamsGetUInt(params, nparams, virTypedParamsGetUInt(params, nparams,
VIR_SERVER_CLIENTS_UNAUTH_MAX, &unauth_max) && VIR_SERVER_CLIENTS_UNAUTH_MAX, &unauth_max) &&
unauth_max > max) { unauth_max > max) {
vshError(ctl, "%s", _("--max-unauth-clients must be less than or equal to " vshError(ctl, "%s", _("--max-unauth-clients must be less than or equal to --max-clients"));
"--max-clients"));
goto cleanup; goto cleanup;
} }
@ -936,8 +930,7 @@ cmdSrvClientsSet(vshControl *ctl, const vshCmd *cmd)
vshSaveLibvirtError(); vshSaveLibvirtError();
error: error:
vshError(ctl, "%s", _("Unable to change server's client-related " vshError(ctl, "%s", _("Unable to change server's client-related configuration limits"));
"configuration limits"));
goto cleanup; goto cleanup;
} }

View File

@ -33,8 +33,7 @@ int virHostValidateCh(void)
bool hasVirtFlag = false; bool hasVirtFlag = false;
virArch arch = virArchFromHost(); virArch arch = virArchFromHost();
const char *kvmhint = const char *kvmhint =
_("Check that CPU and firmware supports virtualization " _("Check that CPU and firmware supports virtualization and kvm module is loaded");
"and kvm module is loaded");
if (!(flags = virHostValidateGetCPUFlags())) if (!(flags = virHostValidateGetCPUFlags()))
return -1; return -1;
@ -43,8 +42,7 @@ int virHostValidateCh(void)
switch ((int)arch) { switch ((int)arch) {
case VIR_ARCH_X86_64: case VIR_ARCH_X86_64:
hasVirtFlag = true; hasVirtFlag = true;
kvmhint = _("Check that the 'kvm-intel' or 'kvm-amd' modules are " kvmhint = _("Check that the 'kvm-intel' or 'kvm-amd' modules are loaded & the BIOS has enabled virtualization");
"loaded & the BIOS has enabled virtualization");
if (virBitmapIsBitSet(flags, VIR_HOST_VALIDATE_CPU_FLAG_SVM) || if (virBitmapIsBitSet(flags, VIR_HOST_VALIDATE_CPU_FLAG_SVM) ||
virBitmapIsBitSet(flags, VIR_HOST_VALIDATE_CPU_FLAG_VMX)) virBitmapIsBitSet(flags, VIR_HOST_VALIDATE_CPU_FLAG_VMX))
hasHwVirt = true; hasHwVirt = true;
@ -64,8 +62,7 @@ int virHostValidateCh(void)
virHostMsgPass(); virHostMsgPass();
} else { } else {
virHostMsgFail(VIR_HOST_VALIDATE_FAIL, virHostMsgFail(VIR_HOST_VALIDATE_FAIL,
_("Only emulated CPUs are available, performance will be " _("Only emulated CPUs are available, performance will be significantly limited"));
"significantly limited"));
ret = -1; ret = -1;
} }
} }
@ -75,8 +72,7 @@ int virHostValidateCh(void)
kvmhint) < 0) kvmhint) < 0)
ret = -1; ret = -1;
else if (virHostValidateDeviceAccessible("CH", "/dev/kvm", VIR_HOST_VALIDATE_FAIL, else if (virHostValidateDeviceAccessible("CH", "/dev/kvm", VIR_HOST_VALIDATE_FAIL,
_("Check /dev/kvm is world writable or you are in " _("Check /dev/kvm is world writable or you are in a group that is allowed to access it")) < 0)
"a group that is allowed to access it")) < 0)
ret = -1; ret = -1;
} }

View File

@ -34,8 +34,7 @@ int virHostValidateQEMU(void)
bool hasHwVirt = false; bool hasHwVirt = false;
bool hasVirtFlag = false; bool hasVirtFlag = false;
virArch arch = virArchFromHost(); virArch arch = virArchFromHost();
const char *kvmhint = _("Check that CPU and firmware supports virtualization " const char *kvmhint = _("Check that CPU and firmware supports virtualization and kvm module is loaded");
"and kvm module is loaded");
if (!(flags = virHostValidateGetCPUFlags())) if (!(flags = virHostValidateGetCPUFlags()))
return -1; return -1;
@ -44,8 +43,7 @@ int virHostValidateQEMU(void)
case VIR_ARCH_I686: case VIR_ARCH_I686:
case VIR_ARCH_X86_64: case VIR_ARCH_X86_64:
hasVirtFlag = true; hasVirtFlag = true;
kvmhint = _("Check that the 'kvm-intel' or 'kvm-amd' modules are " kvmhint = _("Check that the 'kvm-intel' or 'kvm-amd' modules are loaded & the BIOS has enabled virtualization");
"loaded & the BIOS has enabled virtualization");
if (virBitmapIsBitSet(flags, VIR_HOST_VALIDATE_CPU_FLAG_SVM) || if (virBitmapIsBitSet(flags, VIR_HOST_VALIDATE_CPU_FLAG_SVM) ||
virBitmapIsBitSet(flags, VIR_HOST_VALIDATE_CPU_FLAG_VMX)) virBitmapIsBitSet(flags, VIR_HOST_VALIDATE_CPU_FLAG_VMX))
hasHwVirt = true; hasHwVirt = true;
@ -71,8 +69,7 @@ int virHostValidateQEMU(void)
virHostMsgPass(); virHostMsgPass();
} else { } else {
virHostMsgFail(VIR_HOST_VALIDATE_FAIL, virHostMsgFail(VIR_HOST_VALIDATE_FAIL,
_("Host not compatible with KVM; HW virtualization CPU features not found. " _("Host not compatible with KVM; HW virtualization CPU features not found. Only emulated CPUs are available; performance will be significantly limited"));
"Only emulated CPUs are available; performance will be significantly limited"));
ret = -1; ret = -1;
} }
} }
@ -84,8 +81,7 @@ int virHostValidateQEMU(void)
ret = -1; ret = -1;
else if (virHostValidateDeviceAccessible("QEMU", "/dev/kvm", else if (virHostValidateDeviceAccessible("QEMU", "/dev/kvm",
VIR_HOST_VALIDATE_FAIL, VIR_HOST_VALIDATE_FAIL,
_("Check /dev/kvm is world writable or you are in " _("Check /dev/kvm is world writable or you are in a group that is allowed to access it")) < 0)
"a group that is allowed to access it")) < 0)
ret = -1; ret = -1;
} }
@ -101,8 +97,7 @@ int virHostValidateQEMU(void)
if (virHostValidateDeviceExists("QEMU", "/dev/vhost-net", if (virHostValidateDeviceExists("QEMU", "/dev/vhost-net",
VIR_HOST_VALIDATE_WARN, VIR_HOST_VALIDATE_WARN,
_("Load the 'vhost_net' module to improve performance " _("Load the 'vhost_net' module to improve performance of virtio networking")) < 0)
"of virtio networking")) < 0)
ret = -1; ret = -1;
if (virHostValidateDeviceExists("QEMU", "/dev/net/tun", if (virHostValidateDeviceExists("QEMU", "/dev/net/tun",

View File

@ -2358,8 +2358,7 @@ vshAskReedit(vshControl *ctl, const char *msg, bool relax_avail)
if (relax_avail) { if (relax_avail) {
vshPrintRaw(ctl, vshPrintRaw(ctl,
_("i - turn off validation and try to redefine " _("i - turn off validation and try to redefine again"),
"again"),
NULL); NULL);
} }
@ -2385,8 +2384,7 @@ vshAskReedit(vshControl *ctl,
const char *msg G_GNUC_UNUSED, const char *msg G_GNUC_UNUSED,
bool relax_avail G_GNUC_UNUSED) bool relax_avail G_GNUC_UNUSED)
{ {
vshDebug(ctl, VSH_ERR_WARNING, "%s", _("This function is not " vshDebug(ctl, VSH_ERR_WARNING, "%s", _("This function is not supported on WIN32 platform"));
"supported on WIN32 platform"));
return 0; return 0;
} }
#endif /* WIN32 */ #endif /* WIN32 */
@ -3022,8 +3020,7 @@ vshInit(vshControl *ctl, const vshCmdGrp *groups, const vshCmdDef *set)
} }
if (!groups && !set) { if (!groups && !set) {
vshError(ctl, "%s", _("command groups and command set " vshError(ctl, "%s", _("command groups and command set cannot both be NULL"));
"cannot both be NULL"));
return false; return false;
} }
@ -3041,8 +3038,7 @@ bool
vshInitReload(vshControl *ctl) vshInitReload(vshControl *ctl)
{ {
if (!cmdGroups && !cmdSet) { if (!cmdGroups && !cmdSet) {
vshError(ctl, "%s", _("command groups and command are both NULL " vshError(ctl, "%s", _("command groups and command are both NULL run vshInit before reloading"));
"run vshInit before reloading"));
return false; return false;
} }