bhyve: 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 16:52:33 +02:00
parent 371835a2bb
commit 34f5d89e40
3 changed files with 12 additions and 25 deletions

View File

@ -60,8 +60,7 @@ bhyveBuildNetArgStr(const virDomainDef *def,
nic_model = g_strdup("e1000"); nic_model = g_strdup("e1000");
} else { } else {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
_("NIC model 'e1000' is not supported " _("NIC model 'e1000' is not supported by given bhyve binary"));
"by given bhyve binary"));
return -1; return -1;
} }
} else { } else {
@ -190,8 +189,7 @@ bhyveBuildAHCIControllerArgStr(const virDomainDef *def,
if ((disk->device == VIR_DOMAIN_DISK_DEVICE_CDROM) && if ((disk->device == VIR_DOMAIN_DISK_DEVICE_CDROM) &&
(disk_source == NULL)) { (disk_source == NULL)) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
_("cdrom device without source path " _("cdrom device without source path not supported"));
"not supported"));
return -1; return -1;
} }
@ -341,8 +339,7 @@ bhyveBuildControllerArgStr(const virDomainDef *def,
case VIR_DOMAIN_CONTROLLER_TYPE_PCI: case VIR_DOMAIN_CONTROLLER_TYPE_PCI:
if (controller->model != VIR_DOMAIN_CONTROLLER_MODEL_PCI_ROOT) { if (controller->model != VIR_DOMAIN_CONTROLLER_MODEL_PCI_ROOT) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
_("unsupported PCI controller model: " _("unsupported PCI controller model: only PCI root supported"));
"only PCI root supported"));
return -1; return -1;
} }
break; break;
@ -391,8 +388,7 @@ bhyveBuildGraphicsArgStr(const virDomainDef *def,
def->os.bootloader || def->os.bootloader ||
!def->os.loader) { !def->os.loader) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
_("Graphics are only supported" _("Graphics are only supported when booting using UEFI"));
" when booting using UEFI"));
return -1; return -1;
} }
@ -465,8 +461,7 @@ bhyveBuildGraphicsArgStr(const virDomainDef *def,
if (graphics->data.vnc.auth.passwd) { if (graphics->data.vnc.auth.passwd) {
if (!(bhyveDriverGetBhyveCaps(driver) & BHYVE_CAP_VNC_PASSWORD)) { if (!(bhyveDriverGetBhyveCaps(driver) & BHYVE_CAP_VNC_PASSWORD)) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
_("VNC Password authentication not supported " _("VNC Password authentication not supported by bhyve"));
"by bhyve"));
return -1; return -1;
} }
@ -510,8 +505,7 @@ bhyveBuildSoundArgStr(const virDomainDef *def G_GNUC_UNUSED,
/* Currently, bhyve only supports "hda" sound devices, so /* Currently, bhyve only supports "hda" sound devices, so
if it's not supported, sound devices are not supported at all */ if it's not supported, sound devices are not supported at all */
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
_("Sound devices emulation is not supported " _("Sound devices emulation is not supported by given bhyve binary"));
"by given bhyve binary"));
return -1; return -1;
} }
@ -667,9 +661,7 @@ virBhyveProcessBuildBhyveCmd(struct _bhyveConn *driver, virDomainDef *def,
} }
if (nvcpus != def->cpu->sockets * def->cpu->cores * def->cpu->threads) { if (nvcpus != def->cpu->sockets * def->cpu->cores * def->cpu->threads) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
_("Invalid CPU topology: total number of vCPUs " _("Invalid CPU topology: total number of vCPUs must equal the product of sockets, cores, and threads"));
"must equal the product of sockets, cores, "
"and threads"));
return NULL; return NULL;
} }
@ -681,8 +673,7 @@ virBhyveProcessBuildBhyveCmd(struct _bhyveConn *driver, virDomainDef *def,
def->cpu->threads); def->cpu->threads);
} else { } else {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
_("Installed bhyve binary does not support " _("Installed bhyve binary does not support defining CPU topology"));
"defining CPU topology"));
return NULL; return NULL;
} }
} else { } else {
@ -716,8 +707,7 @@ virBhyveProcessBuildBhyveCmd(struct _bhyveConn *driver, virDomainDef *def,
virCommandAddArg(cmd, "-u"); virCommandAddArg(cmd, "-u");
} else { } else {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
_("Installed bhyve binary does not support " _("Installed bhyve binary does not support UTC clock"));
"UTC clock"));
return NULL; return NULL;
} }
break; break;
@ -751,8 +741,7 @@ virBhyveProcessBuildBhyveCmd(struct _bhyveConn *driver, virDomainDef *def,
virCommandAddArgFormat(cmd, "bootrom,%s", def->os.loader->path); virCommandAddArgFormat(cmd, "bootrom,%s", def->os.loader->path);
} else { } else {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
_("Installed bhyve binary does not support " _("Installed bhyve binary does not support UEFI loader"));
"UEFI loader"));
return NULL; return NULL;
} }
} }

View File

@ -174,8 +174,7 @@ bhyveDomainDeviceDefPostParse(virDomainDeviceDef *dev,
cont->model == VIR_DOMAIN_CONTROLLER_MODEL_PCIE_ROOT) && cont->model == VIR_DOMAIN_CONTROLLER_MODEL_PCIE_ROOT) &&
cont->idx != 0) { cont->idx != 0) {
virReportError(VIR_ERR_XML_ERROR, "%s", virReportError(VIR_ERR_XML_ERROR, "%s",
_("pci-root and pcie-root controllers " _("pci-root and pcie-root controllers should have index 0"));
"should have index 0"));
return -1; return -1;
} }
} }

View File

@ -694,8 +694,7 @@ bhyveConnectDomainXMLToNative(virConnectPtr conn,
if ((bhyveDriverGetBhyveCaps(privconn) & BHYVE_CAP_LPC_BOOTROM) == 0) { if ((bhyveDriverGetBhyveCaps(privconn) & BHYVE_CAP_LPC_BOOTROM) == 0) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
_("Installed bhyve binary does not support " _("Installed bhyve binary does not support bootrom"));
"bootrom"));
return NULL; return NULL;
} }
} else { } else {