nwfilter: Update format strings in translated messages

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
Jiri Denemark 2023-03-09 12:30:21 +01:00
parent 6b8763675d
commit 04df8f474b
5 changed files with 60 additions and 69 deletions

View File

@ -485,8 +485,7 @@ virNWFilterSnoopReqNew(const char *ifkey)
if (ifkey == NULL || strlen(ifkey) != VIR_IFKEY_LEN - 1) { if (ifkey == NULL || strlen(ifkey) != VIR_IFKEY_LEN - 1) {
virReportError(VIR_ERR_INTERNAL_ERROR, virReportError(VIR_ERR_INTERNAL_ERROR,
_("virNWFilterSnoopReqNew called with invalid " _("virNWFilterSnoopReqNew called with invalid key \"%1$s\" (%2$zu)"),
"key \"%s\" (%zu)"),
NULLSTR_EMPTY(ifkey), NULLSTR_EMPTY(ifkey),
ifkey ? strlen(ifkey) : 0); ifkey ? strlen(ifkey) : 0);
return NULL; return NULL;
@ -955,26 +954,26 @@ virNWFilterSnoopDHCPOpen(const char *ifname, virMacAddr *mac,
pcap_set_immediate_mode(handle, 1) < 0 || pcap_set_immediate_mode(handle, 1) < 0 ||
pcap_activate(handle) < 0) { pcap_activate(handle) < 0) {
virReportError(VIR_ERR_INTERNAL_ERROR, virReportError(VIR_ERR_INTERNAL_ERROR,
_("setup of pcap handle failed: %s"), _("setup of pcap handle failed: %1$s"),
pcap_geterr(handle)); pcap_geterr(handle));
goto cleanup; goto cleanup;
} }
if (pcap_compile(handle, &fp, ext_filter, 1, PCAP_NETMASK_UNKNOWN) != 0) { if (pcap_compile(handle, &fp, ext_filter, 1, PCAP_NETMASK_UNKNOWN) != 0) {
virReportError(VIR_ERR_INTERNAL_ERROR, virReportError(VIR_ERR_INTERNAL_ERROR,
_("pcap_compile: %s"), pcap_geterr(handle)); _("pcap_compile: %1$s"), pcap_geterr(handle));
goto cleanup; goto cleanup;
} }
if (pcap_setfilter(handle, &fp) != 0) { if (pcap_setfilter(handle, &fp) != 0) {
virReportError(VIR_ERR_INTERNAL_ERROR, virReportError(VIR_ERR_INTERNAL_ERROR,
_("pcap_setfilter: %s"), pcap_geterr(handle)); _("pcap_setfilter: %1$s"), pcap_geterr(handle));
goto cleanup_freecode; goto cleanup_freecode;
} }
if (pcap_setdirection(handle, dir) < 0) { if (pcap_setdirection(handle, dir) < 0) {
virReportError(VIR_ERR_INTERNAL_ERROR, virReportError(VIR_ERR_INTERNAL_ERROR,
_("pcap_setdirection: %s"), _("pcap_setdirection: %1$s"),
pcap_geterr(handle)); pcap_geterr(handle));
goto cleanup_freecode; goto cleanup_freecode;
} }
@ -1004,8 +1003,8 @@ static void virNWFilterDHCPDecodeWorker(void *jobdata, void *opaque)
req->jobCompletionStatus = -1; req->jobCompletionStatus = -1;
virReportError(VIR_ERR_INTERNAL_ERROR, virReportError(VIR_ERR_INTERNAL_ERROR,
_("Instantiation of rules failed on " _("Instantiation of rules failed on interface '%1$s'"),
"interface '%s'"), req->binding->portdevname); req->binding->portdevname);
} }
ignore_value(!!g_atomic_int_dec_and_test(job->qCtr)); ignore_value(!!g_atomic_int_dec_and_test(job->qCtr));
} }
@ -1306,7 +1305,7 @@ virNWFilterDHCPSnoopThread(void *req0)
/* protect req->binding->portdevname */ /* protect req->binding->portdevname */
VIR_WITH_MUTEX_LOCK_GUARD(&req->lock) { VIR_WITH_MUTEX_LOCK_GUARD(&req->lock) {
virReportError(VIR_ERR_INTERNAL_ERROR, virReportError(VIR_ERR_INTERNAL_ERROR,
_("interface '%s' failing; reopening"), _("interface '%1$s' failing; reopening"),
req->binding->portdevname); req->binding->portdevname);
if (req->binding->portdevname) if (req->binding->portdevname)
pcapConf[i].handle = pcapConf[i].handle =
@ -1359,8 +1358,8 @@ virNWFilterDHCPSnoopThread(void *req0)
pcapConf[i].dir, pcapConf[i].dir,
&pcapConf[i].qCtr) < 0) { &pcapConf[i].qCtr) < 0) {
virReportError(VIR_ERR_INTERNAL_ERROR, virReportError(VIR_ERR_INTERNAL_ERROR,
_("Job submission failed on " _("Job submission failed on interface '%1$s'"),
"interface '%s'"), req->binding->portdevname); req->binding->portdevname);
error = true; error = true;
break; break;
} }
@ -1468,8 +1467,8 @@ virNWFilterDHCPSnoopReq(virNWFilterTechDriver *techdriver,
req->binding->portdevname, req->binding->portdevname,
req->ifkey) < 0) { req->ifkey) < 0) {
virReportError(VIR_ERR_INTERNAL_ERROR, virReportError(VIR_ERR_INTERNAL_ERROR,
_("virNWFilterDHCPSnoopReq ifname map failed" _("virNWFilterDHCPSnoopReq ifname map failed on interface \"%1$s\" key \"%2$s\""),
" on interface \"%s\" key \"%s\""), binding->portdevname, binding->portdevname,
ifkey); ifkey);
goto exit_snoopunlock; goto exit_snoopunlock;
} }
@ -1477,8 +1476,8 @@ virNWFilterDHCPSnoopReq(virNWFilterTechDriver *techdriver,
if (isnewreq && if (isnewreq &&
virHashAddEntry(virNWFilterSnoopState.snoopReqs, ifkey, req) < 0) { virHashAddEntry(virNWFilterSnoopState.snoopReqs, ifkey, req) < 0) {
virReportError(VIR_ERR_INTERNAL_ERROR, virReportError(VIR_ERR_INTERNAL_ERROR,
_("virNWFilterDHCPSnoopReq req add failed on" _("virNWFilterDHCPSnoopReq req add failed on interface \"%1$s\" ifkey \"%2$s\""),
" interface \"%s\" ifkey \"%s\""), binding->portdevname, binding->portdevname,
ifkey); ifkey);
goto exit_rem_ifnametokey; goto exit_rem_ifnametokey;
} }
@ -1489,8 +1488,8 @@ virNWFilterDHCPSnoopReq(virNWFilterTechDriver *techdriver,
if (virThreadCreateFull(&thread, false, virNWFilterDHCPSnoopThread, if (virThreadCreateFull(&thread, false, virNWFilterDHCPSnoopThread,
"dhcp-snoop", false, req) != 0) { "dhcp-snoop", false, req) != 0) {
virReportError(VIR_ERR_INTERNAL_ERROR, virReportError(VIR_ERR_INTERNAL_ERROR,
_("virNWFilterDHCPSnoopReq virThreadCreate " _("virNWFilterDHCPSnoopReq virThreadCreate failed on interface '%1$s'"),
"failed on interface '%s'"), binding->portdevname); binding->portdevname);
goto exit_snoopreq_unlock; goto exit_snoopreq_unlock;
} }
@ -1501,15 +1500,15 @@ virNWFilterDHCPSnoopReq(virNWFilterTechDriver *techdriver,
req->threadkey = virNWFilterSnoopActivate(req); req->threadkey = virNWFilterSnoopActivate(req);
if (!req->threadkey) { if (!req->threadkey) {
virReportError(VIR_ERR_INTERNAL_ERROR, virReportError(VIR_ERR_INTERNAL_ERROR,
_("Activation of snoop request failed on " _("Activation of snoop request failed on interface '%1$s'"),
"interface '%s'"), req->binding->portdevname); req->binding->portdevname);
goto exit_snoopreq_unlock; goto exit_snoopreq_unlock;
} }
if (virNWFilterSnoopReqRestore(req) < 0) { if (virNWFilterSnoopReqRestore(req) < 0) {
virReportError(VIR_ERR_INTERNAL_ERROR, virReportError(VIR_ERR_INTERNAL_ERROR,
_("Restoring of leases failed on " _("Restoring of leases failed on interface '%1$s'"),
"interface '%s'"), req->binding->portdevname); req->binding->portdevname);
goto exit_snoop_cancel; goto exit_snoop_cancel;
} }
@ -1677,17 +1676,17 @@ virNWFilterSnoopLeaseFileRefresh(void)
int tfd; int tfd;
if (g_mkdir_with_parents(LEASEFILE_DIR, 0700) < 0) { if (g_mkdir_with_parents(LEASEFILE_DIR, 0700) < 0) {
virReportError(errno, _("mkdir(\"%s\")"), LEASEFILE_DIR); virReportError(errno, _("mkdir(\"%1$s\")"), LEASEFILE_DIR);
return; return;
} }
if (unlink(TMPLEASEFILE) < 0 && errno != ENOENT) if (unlink(TMPLEASEFILE) < 0 && errno != ENOENT)
virReportSystemError(errno, _("unlink(\"%s\")"), TMPLEASEFILE); virReportSystemError(errno, _("unlink(\"%1$s\")"), TMPLEASEFILE);
/* lease file loaded, delete old one */ /* lease file loaded, delete old one */
tfd = open(TMPLEASEFILE, O_CREAT|O_RDWR|O_TRUNC|O_EXCL, 0644); tfd = open(TMPLEASEFILE, O_CREAT|O_RDWR|O_TRUNC|O_EXCL, 0644);
if (tfd < 0) { if (tfd < 0) {
virReportSystemError(errno, _("open(\"%s\")"), TMPLEASEFILE); virReportSystemError(errno, _("open(\"%1$s\")"), TMPLEASEFILE);
return; return;
} }
@ -1701,13 +1700,13 @@ virNWFilterSnoopLeaseFileRefresh(void)
} }
if (VIR_CLOSE(tfd) < 0) { if (VIR_CLOSE(tfd) < 0) {
virReportSystemError(errno, _("unable to close %s"), TMPLEASEFILE); virReportSystemError(errno, _("unable to close %1$s"), TMPLEASEFILE);
/* assuming the old lease file is still better, skip the renaming */ /* assuming the old lease file is still better, skip the renaming */
goto cleanup; goto cleanup;
} }
if (rename(TMPLEASEFILE, LEASEFILE) < 0) { if (rename(TMPLEASEFILE, LEASEFILE) < 0) {
virReportSystemError(errno, _("rename(\"%s\", \"%s\")"), virReportSystemError(errno, _("rename(\"%1$s\", \"%2$s\")"),
TMPLEASEFILE, LEASEFILE); TMPLEASEFILE, LEASEFILE);
unlink(TMPLEASEFILE); unlink(TMPLEASEFILE);
} }
@ -1737,8 +1736,8 @@ virNWFilterSnoopLeaseFileLoad(void)
if (line[strlen(line)-1] != '\n') { if (line[strlen(line)-1] != '\n') {
virReportError(VIR_ERR_INTERNAL_ERROR, virReportError(VIR_ERR_INTERNAL_ERROR,
_("virNWFilterSnoopLeaseFileLoad lease file " _("virNWFilterSnoopLeaseFileLoad lease file line %1$d corrupt"),
"line %d corrupt"), ln); ln);
break; break;
} }
ln++; ln++;
@ -1746,8 +1745,8 @@ virNWFilterSnoopLeaseFileLoad(void)
if (sscanf(line, "%llu %54s %15s %15s", if (sscanf(line, "%llu %54s %15s %15s",
&timeout, ifkey, ipstr, srvstr) < 4) { &timeout, ifkey, ipstr, srvstr) < 4) {
virReportError(VIR_ERR_INTERNAL_ERROR, virReportError(VIR_ERR_INTERNAL_ERROR,
_("virNWFilterSnoopLeaseFileLoad lease file " _("virNWFilterSnoopLeaseFileLoad lease file line %1$d corrupt"),
"line %d corrupt"), ln); ln);
break; break;
} }
ipl.timeout = timeout; ipl.timeout = timeout;
@ -1764,15 +1763,15 @@ virNWFilterSnoopLeaseFileLoad(void)
if (tmp < 0) { if (tmp < 0) {
virNWFilterSnoopReqPut(req); virNWFilterSnoopReqPut(req);
virReportError(VIR_ERR_INTERNAL_ERROR, virReportError(VIR_ERR_INTERNAL_ERROR,
_("virNWFilterSnoopLeaseFileLoad req add" _("virNWFilterSnoopLeaseFileLoad req add failed on interface \"%1$s\""),
" failed on interface \"%s\""), ifkey); ifkey);
continue; continue;
} }
} }
if (virSocketAddrParseIPv4(&ipl.ipAddress, ipstr) < 0) { if (virSocketAddrParseIPv4(&ipl.ipAddress, ipstr) < 0) {
virReportError(VIR_ERR_INTERNAL_ERROR, virReportError(VIR_ERR_INTERNAL_ERROR,
_("line %d corrupt ipaddr \"%s\""), _("line %1$d corrupt ipaddr \"%2$s\""),
ln, ipstr); ln, ipstr);
virNWFilterSnoopReqPut(req); virNWFilterSnoopReqPut(req);
continue; continue;
@ -1917,7 +1916,7 @@ virNWFilterDHCPSnoopEnd(const char *ifname)
req = virNWFilterSnoopReqGetByIFKey(ifkey); req = virNWFilterSnoopReqGetByIFKey(ifkey);
if (!req) { if (!req) {
virReportError(VIR_ERR_INTERNAL_ERROR, virReportError(VIR_ERR_INTERNAL_ERROR,
_("ifkey \"%s\" has no req"), ifkey); _("ifkey \"%1$s\" has no req"), ifkey);
return; return;
} }

View File

@ -248,7 +248,7 @@ nwfilterStateInitialize(bool privileged,
driver->stateDir = g_strdup(RUNSTATEDIR "/libvirt/nwfilter"); driver->stateDir = g_strdup(RUNSTATEDIR "/libvirt/nwfilter");
if (g_mkdir_with_parents(driver->stateDir, S_IRWXU) < 0) { if (g_mkdir_with_parents(driver->stateDir, S_IRWXU) < 0) {
virReportSystemError(errno, _("cannot create state directory '%s'"), virReportSystemError(errno, _("cannot create state directory '%1$s'"),
driver->stateDir); driver->stateDir);
goto error; goto error;
} }
@ -282,7 +282,7 @@ nwfilterStateInitialize(bool privileged,
driver->configDir = g_strdup(SYSCONFDIR "/libvirt/nwfilter"); driver->configDir = g_strdup(SYSCONFDIR "/libvirt/nwfilter");
if (g_mkdir_with_parents(driver->configDir, S_IRWXU) < 0) { if (g_mkdir_with_parents(driver->configDir, S_IRWXU) < 0) {
virReportSystemError(errno, _("cannot create config directory '%s'"), virReportSystemError(errno, _("cannot create config directory '%1$s'"),
driver->configDir); driver->configDir);
goto error; goto error;
} }
@ -290,7 +290,7 @@ nwfilterStateInitialize(bool privileged,
driver->bindingDir = g_strdup(RUNSTATEDIR "/libvirt/nwfilter-binding"); driver->bindingDir = g_strdup(RUNSTATEDIR "/libvirt/nwfilter-binding");
if (g_mkdir_with_parents(driver->bindingDir, S_IRWXU) < 0) { if (g_mkdir_with_parents(driver->bindingDir, S_IRWXU) < 0) {
virReportSystemError(errno, _("cannot create config directory '%s'"), virReportSystemError(errno, _("cannot create config directory '%1$s'"),
driver->bindingDir); driver->bindingDir);
goto error; goto error;
} }
@ -359,7 +359,7 @@ nwfilterConnectOpen(virConnectPtr conn,
if (STRNEQ(conn->uri->path, "/system")) { if (STRNEQ(conn->uri->path, "/system")) {
virReportError(VIR_ERR_INTERNAL_ERROR, virReportError(VIR_ERR_INTERNAL_ERROR,
_("unexpected nwfilter URI path '%s', try nwfilter:///system"), _("unexpected nwfilter URI path '%1$s', try nwfilter:///system"),
conn->uri->path); conn->uri->path);
return VIR_DRV_OPEN_ERROR; return VIR_DRV_OPEN_ERROR;
} }
@ -405,7 +405,7 @@ nwfilterObjFromNWFilter(const unsigned char *uuid)
if (!(obj = virNWFilterObjListFindByUUID(driver->nwfilters, uuid))) { if (!(obj = virNWFilterObjListFindByUUID(driver->nwfilters, uuid))) {
virUUIDFormat(uuid, uuidstr); virUUIDFormat(uuid, uuidstr);
virReportError(VIR_ERR_NO_NWFILTER, virReportError(VIR_ERR_NO_NWFILTER,
_("no nwfilter with matching uuid '%s'"), uuidstr); _("no nwfilter with matching uuid '%1$s'"), uuidstr);
} }
return obj; return obj;
} }
@ -452,7 +452,7 @@ nwfilterLookupByName(virConnectPtr conn,
if (!obj) { if (!obj) {
virReportError(VIR_ERR_NO_NWFILTER, virReportError(VIR_ERR_NO_NWFILTER,
_("no nwfilter with matching name '%s'"), name); _("no nwfilter with matching name '%1$s'"), name);
return NULL; return NULL;
} }
def = virNWFilterObjGetDef(obj); def = virNWFilterObjGetDef(obj);
@ -661,7 +661,7 @@ nwfilterBindingLookupByPortDev(virConnectPtr conn,
portdev); portdev);
if (!obj) { if (!obj) {
virReportError(VIR_ERR_NO_NWFILTER_BINDING, virReportError(VIR_ERR_NO_NWFILTER_BINDING,
_("no nwfilter binding for port dev '%s'"), portdev); _("no nwfilter binding for port dev '%1$s'"), portdev);
goto cleanup; goto cleanup;
} }
@ -706,7 +706,7 @@ nwfilterBindingGetXMLDesc(virNWFilterBindingPtr binding,
binding->portdev); binding->portdev);
if (!obj) { if (!obj) {
virReportError(VIR_ERR_NO_NWFILTER_BINDING, virReportError(VIR_ERR_NO_NWFILTER_BINDING,
_("no nwfilter binding for port dev '%s'"), binding->portdev); _("no nwfilter binding for port dev '%1$s'"), binding->portdev);
goto cleanup; goto cleanup;
} }
@ -790,7 +790,7 @@ nwfilterBindingDelete(virNWFilterBindingPtr binding)
obj = virNWFilterBindingObjListFindByPortDev(driver->bindings, binding->portdev); obj = virNWFilterBindingObjListFindByPortDev(driver->bindings, binding->portdev);
if (!obj) { if (!obj) {
virReportError(VIR_ERR_NO_NWFILTER_BINDING, virReportError(VIR_ERR_NO_NWFILTER_BINDING,
_("no nwfilter binding for port dev '%s'"), binding->portdev); _("no nwfilter binding for port dev '%1$s'"), binding->portdev);
return -1; return -1;
} }

View File

@ -153,8 +153,8 @@ printVar(virNWFilterVarCombIter *vars,
varName = virNWFilterVarAccessGetVarName(item->varAccess); varName = virNWFilterVarAccessGetVarName(item->varAccess);
virReportError(VIR_ERR_INTERNAL_ERROR, virReportError(VIR_ERR_INTERNAL_ERROR,
_("Buffer too small to print variable " _("Buffer too small to print variable '%1$s' into"),
"'%s' into"), varName); varName);
return -1; return -1;
} }
@ -295,7 +295,7 @@ _printDataType(virNWFilterVarCombIter *vars,
case DATATYPE_STRINGCOPY: case DATATYPE_STRINGCOPY:
case DATATYPE_BOOLEAN: case DATATYPE_BOOLEAN:
virReportError(VIR_ERR_INTERNAL_ERROR, virReportError(VIR_ERR_INTERNAL_ERROR,
_("Cannot print data type %x"), item->datatype); _("Cannot print data type %1$x"), item->datatype);
return -1; return -1;
case DATATYPE_LAST: case DATATYPE_LAST:
default: default:
@ -1441,7 +1441,7 @@ _iptablesCreateRuleInstance(virFirewall *fw,
default: default:
virReportError(VIR_ERR_INTERNAL_ERROR, virReportError(VIR_ERR_INTERNAL_ERROR,
_("Unexpected protocol %d"), _("Unexpected protocol %1$d"),
rule->prtclType); rule->prtclType);
return -1; return -1;
} }
@ -1846,8 +1846,7 @@ ebtablesCreateRuleInstance(virFirewall *fw,
if (reverse && if (reverse &&
HAS_ENTRY_ITEM(&rule->p.stpHdrFilter.ethHdr.dataSrcMACAddr)) { HAS_ENTRY_ITEM(&rule->p.stpHdrFilter.ethHdr.dataSrcMACAddr)) {
virReportError(VIR_ERR_INTERNAL_ERROR, virReportError(VIR_ERR_INTERNAL_ERROR,
_("STP filtering in %s direction with " _("STP filtering in %1$s direction with source MAC address set is not supported"),
"source MAC address set is not supported"),
virNWFilterRuleDirectionTypeToString( virNWFilterRuleDirectionTypeToString(
VIR_NWFILTER_RULE_DIRECTION_INOUT)); VIR_NWFILTER_RULE_DIRECTION_INOUT));
return -1; return -1;
@ -2351,7 +2350,7 @@ ebtablesCreateRuleInstance(virFirewall *fw,
default: default:
virReportError(VIR_ERR_INTERNAL_ERROR, virReportError(VIR_ERR_INTERNAL_ERROR,
_("Unexpected rule protocol %d"), _("Unexpected rule protocol %1$d"),
rule->prtclType); rule->prtclType);
return -1; return -1;
} }
@ -3126,8 +3125,7 @@ iptablesCheckBridgeNFCallEnabled(bool isIPv6)
if (buffer[0] == '0') { if (buffer[0] == '0') {
char msg[256]; char msg[256];
g_snprintf(msg, sizeof(msg), g_snprintf(msg, sizeof(msg),
_("To enable ip%stables filtering for the VM do " _("To enable ip%1$stables filtering for the VM do 'echo 1 > %2$s'"),
"'echo 1 > %s'"),
isIPv6 ? "6" : "", isIPv6 ? "6" : "",
pathname); pathname);
VIR_WARN("%s", msg); VIR_WARN("%s", msg);

View File

@ -514,8 +514,7 @@ virNWFilterDoInstantiate(virNWFilterTechDriver *techdriver,
} else { } else {
rc = -1; rc = -1;
virReportError(VIR_ERR_PARSE_FAILED, virReportError(VIR_ERR_PARSE_FAILED,
_("filter '%s' " _("filter '%1$s' learning value '%2$s' invalid."),
"learning value '%s' invalid."),
filter->name, learning); filter->name, learning);
goto error; goto error;
} }
@ -576,8 +575,8 @@ virNWFilterDoInstantiate(virNWFilterTechDriver *techdriver,
buf = virNWFilterPrintVars(missing_vars, ", ", false, reportIP); buf = virNWFilterPrintVars(missing_vars, ", ", false, reportIP);
if (buf) { if (buf) {
virReportError(VIR_ERR_INTERNAL_ERROR, virReportError(VIR_ERR_INTERNAL_ERROR,
_("Cannot instantiate filter due to unresolvable " _("Cannot instantiate filter due to unresolvable variables or unavailable list elements: %1$s"),
"variables or unavailable list elements: %s"), buf); buf);
} }
rc = -1; rc = -1;
@ -632,8 +631,7 @@ virNWFilterInstantiateFilterUpdate(virNWFilterDriverState *driver,
if (!techdriver) { if (!techdriver) {
virReportError(VIR_ERR_INTERNAL_ERROR, virReportError(VIR_ERR_INTERNAL_ERROR,
_("Could not get access to ACL tech " _("Could not get access to ACL tech driver '%1$s'"),
"driver '%s'"),
drvname); drvname);
return -1; return -1;
} }
@ -779,8 +777,7 @@ virNWFilterRollbackUpdateFilter(virNWFilterBindingDef *binding)
techdriver = virNWFilterTechDriverForName(drvname); techdriver = virNWFilterTechDriverForName(drvname);
if (!techdriver) { if (!techdriver) {
virReportError(VIR_ERR_INTERNAL_ERROR, virReportError(VIR_ERR_INTERNAL_ERROR,
_("Could not get access to ACL tech " _("Could not get access to ACL tech driver '%1$s'"),
"driver '%s'"),
drvname); drvname);
return -1; return -1;
} }
@ -805,8 +802,7 @@ virNWFilterTearOldFilter(virNWFilterBindingDef *binding)
techdriver = virNWFilterTechDriverForName(drvname); techdriver = virNWFilterTechDriverForName(drvname);
if (!techdriver) { if (!techdriver) {
virReportError(VIR_ERR_INTERNAL_ERROR, virReportError(VIR_ERR_INTERNAL_ERROR,
_("Could not get access to ACL tech " _("Could not get access to ACL tech driver '%1$s'"),
"driver '%s'"),
drvname); drvname);
return -1; return -1;
} }
@ -830,8 +826,7 @@ _virNWFilterTeardownFilter(const char *ifname)
if (!techdriver) { if (!techdriver) {
virReportError(VIR_ERR_INTERNAL_ERROR, virReportError(VIR_ERR_INTERNAL_ERROR,
_("Could not get access to ACL tech " _("Could not get access to ACL tech driver '%1$s'"),
"driver '%s'"),
drvname); drvname);
return -1; return -1;
} }

View File

@ -155,7 +155,7 @@ virNWFilterLockIface(const char *ifname)
if (virStrcpyStatic(ifaceLock->ifname, ifname) < 0) { if (virStrcpyStatic(ifaceLock->ifname, ifname) < 0) {
virReportError(VIR_ERR_INTERNAL_ERROR, virReportError(VIR_ERR_INTERNAL_ERROR,
_("interface name %s does not fit into buffer"), _("interface name %1$s does not fit into buffer"),
ifaceLock->ifname); ifaceLock->ifname);
g_free(ifaceLock); g_free(ifaceLock);
return -1; return -1;
@ -607,8 +607,8 @@ learnIPAddressThread(void *arg)
if ((inetaddr = virSocketAddrFormat(&sa)) != NULL) { if ((inetaddr = virSocketAddrFormat(&sa)) != NULL) {
if (virNWFilterIPAddrMapAddIPAddr(req->binding->portdevname, inetaddr) < 0) { if (virNWFilterIPAddrMapAddIPAddr(req->binding->portdevname, inetaddr) < 0) {
VIR_ERROR(_("Failed to add IP address %s to IP address " VIR_ERROR(_("Failed to add IP address %1$s to IP address cache for interface %2$s"),
"cache for interface %s"), inetaddr, req->binding->portdevname); inetaddr, req->binding->portdevname);
} }
ret = virNWFilterInstantiateFilterLate(req->driver, ret = virNWFilterInstantiateFilterLate(req->driver,
@ -620,8 +620,7 @@ learnIPAddressThread(void *arg)
} else { } else {
if (showError) if (showError)
virReportSystemError(req->status, virReportSystemError(req->status,
_("encountered an error on interface %s " _("encountered an error on interface %1$s index %2$d"),
"index %d"),
req->binding->portdevname, req->ifindex); req->binding->portdevname, req->ifindex);
techdriver->applyDropAllRules(req->binding->portdevname); techdriver->applyDropAllRules(req->binding->portdevname);