From 9b10782bb7a91830202bd573ad0e79571c8dca15 Mon Sep 17 00:00:00 2001 From: Michal Privoznik Date: Thu, 24 Aug 2023 17:03:58 +0200 Subject: [PATCH] nwfilter: 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 Reviewed-by: Pavel Hrdina --- src/nwfilter/nwfilter_dhcpsnoop.c | 12 ++++-------- src/nwfilter/nwfilter_learnipaddr.c | 8 ++------ 2 files changed, 6 insertions(+), 14 deletions(-) diff --git a/src/nwfilter/nwfilter_dhcpsnoop.c b/src/nwfilter/nwfilter_dhcpsnoop.c index 2f89923856..26072ec26e 100644 --- a/src/nwfilter/nwfilter_dhcpsnoop.c +++ b/src/nwfilter/nwfilter_dhcpsnoop.c @@ -1441,9 +1441,7 @@ virNWFilterDHCPSnoopReq(virNWFilterTechDriver *techdriver, /* check that all tools are available for applying the filters (late) */ if (!techdriver->canApplyBasicRules()) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", - _("IP parameter must be provided since " - "snooping the IP address does not work " - "possibly due to missing tools")); + _("IP parameter must be provided since snooping the IP address does not work possibly due to missing tools")); goto exit_snoopreqput; } @@ -1454,8 +1452,7 @@ virNWFilterDHCPSnoopReq(virNWFilterTechDriver *techdriver, &req->binding->mac, dhcpsrvrs, false) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, "%s", - _("applyDHCPOnlyRules " - "failed - spoofing not protected!")); + _("applyDHCPOnlyRules failed - spoofing not protected!")); goto exit_snoopreqput; } @@ -1990,9 +1987,8 @@ virNWFilterDHCPSnoopReq(virNWFilterTechDriver *techdriver G_GNUC_UNUSED, virNWFilterDriverState *driver G_GNUC_UNUSED) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("libvirt was not compiled with libpcap and \"" - NWFILTER_VARNAME_CTRL_IP_LEARNING - "='dhcp'\" requires it.")); + _("libvirt was not compiled with libpcap and \"%1$s\" requires it"), + NWFILTER_VARNAME_CTRL_IP_LEARNING "='dhcp'"); return -1; } #endif /* WITH_LIBPCAP */ diff --git a/src/nwfilter/nwfilter_learnipaddr.c b/src/nwfilter/nwfilter_learnipaddr.c index 90e9a21a4e..73d8302c13 100644 --- a/src/nwfilter/nwfilter_learnipaddr.c +++ b/src/nwfilter/nwfilter_learnipaddr.c @@ -669,9 +669,7 @@ virNWFilterLearnIPAddress(virNWFilterTechDriver *techdriver, if (!techdriver->canApplyBasicRules()) { virReportError(VIR_ERR_INTERNAL_ERROR, "%s", - _("IP parameter must be provided since " - "snooping the IP address does not work " - "possibly due to missing tools")); + _("IP parameter must be provided since snooping the IP address does not work possibly due to missing tools")); return -1; } @@ -717,9 +715,7 @@ virNWFilterLearnIPAddress(virNWFilterTechDriver *techdriver G_GNUC_UNUSED, int howDetect G_GNUC_UNUSED) { virReportError(VIR_ERR_INTERNAL_ERROR, "%s", - _("IP parameter must be given since libvirt " - "was not compiled with IP address learning " - "support")); + _("IP parameter must be given since libvirt was not compiled with IP address learning support")); return -1; } #endif /* WITH_LIBPCAP */