提交 cb84580a 编写于 作者: E Eric Blake

maint: omit translation for all VIR_INFO

We were 31/73 on whether to translate; since less than 50% translated
and since VIR_INFO is less than VIR_WARN which also doesn't translate,
this makes sense.

* cfg.mk (sc_prohibit_gettext_markup): Add VIR_INFO, since it
falls between WARN and DEBUG.
* daemon/libvirtd.c (qemudDispatchSignalEvent, remoteCheckAccess)
(qemudDispatchServer): Adjust offenders.
* daemon/remote.c (remoteDispatchAuthPolkit): Likewise.
* src/network/bridge_driver.c (networkReloadIptablesRules)
(networkStartNetworkDaemon, networkShutdownNetworkDaemon)
(networkCreate, networkDefine, networkUndefine): Likewise.
* src/qemu/qemu_driver.c (qemudDomainDefine)
(qemudDomainUndefine): Likewise.
* src/storage/storage_driver.c (storagePoolCreate)
(storagePoolDefine, storagePoolUndefine, storagePoolStart)
(storagePoolDestroy, storagePoolDelete, storageVolumeCreateXML)
(storageVolumeCreateXMLFrom, storageVolumeDelete): Likewise.
* src/util/bridge.c (brProbeVnetHdr): Likewise.
* po/POTFILES.in: Drop src/util/bridge.c.
上级 5c129f74
...@@ -524,7 +524,7 @@ sc_copyright_format: ...@@ -524,7 +524,7 @@ sc_copyright_format:
# Some functions/macros produce messages intended solely for developers # Some functions/macros produce messages intended solely for developers
# and maintainers. Do not mark them for translation. # and maintainers. Do not mark them for translation.
sc_prohibit_gettext_markup: sc_prohibit_gettext_markup:
@prohibit='\<VIR_(WARN|DEBUG) *\(_\(' \ @prohibit='\<VIR_(WARN|INFO|DEBUG) *\(_\(' \
halt='do not mark these strings for translation' \ halt='do not mark these strings for translation' \
$(_sc_search_regexp) $(_sc_search_regexp)
......
...@@ -413,7 +413,7 @@ qemudDispatchSignalEvent(int watch ATTRIBUTE_UNUSED, ...@@ -413,7 +413,7 @@ qemudDispatchSignalEvent(int watch ATTRIBUTE_UNUSED,
switch (siginfo.si_signo) { switch (siginfo.si_signo) {
case SIGHUP: case SIGHUP:
VIR_INFO(_("Reloading configuration on SIGHUP")); VIR_INFO("Reloading configuration on SIGHUP");
virHookCall(VIR_HOOK_DRIVER_DAEMON, "-", virHookCall(VIR_HOOK_DRIVER_DAEMON, "-",
VIR_HOOK_DAEMON_OP_RELOAD, SIGHUP, "SIGHUP", NULL); VIR_HOOK_DAEMON_OP_RELOAD, SIGHUP, "SIGHUP", NULL);
if (virStateReload() < 0) if (virStateReload() < 0)
...@@ -429,7 +429,7 @@ qemudDispatchSignalEvent(int watch ATTRIBUTE_UNUSED, ...@@ -429,7 +429,7 @@ qemudDispatchSignalEvent(int watch ATTRIBUTE_UNUSED,
break; break;
default: default:
VIR_INFO(_("Received unexpected signal %d"), siginfo.si_signo); VIR_INFO("Received unexpected signal %d", siginfo.si_signo);
break; break;
} }
...@@ -1288,8 +1288,8 @@ remoteCheckAccess (struct qemud_client *client) ...@@ -1288,8 +1288,8 @@ remoteCheckAccess (struct qemud_client *client)
VIR_ERROR(_("remoteCheckCertificate: " VIR_ERROR(_("remoteCheckCertificate: "
"failed to verify client's certificate")); "failed to verify client's certificate"));
if (!tls_no_verify_certificate) return -1; if (!tls_no_verify_certificate) return -1;
else VIR_INFO(_("remoteCheckCertificate: tls_no_verify_certificate " else VIR_INFO("remoteCheckCertificate: tls_no_verify_certificate "
"is set so the bad certificate is ignored")); "is set so the bad certificate is ignored");
} }
if (client->tx) { if (client->tx) {
...@@ -1445,7 +1445,7 @@ static int qemudDispatchServer(struct qemud_server *server, struct qemud_socket ...@@ -1445,7 +1445,7 @@ static int qemudDispatchServer(struct qemud_server *server, struct qemud_socket
/* Client is running as root, so disable auth */ /* Client is running as root, so disable auth */
if (uid == 0) { if (uid == 0) {
VIR_INFO(_("Turn off polkit auth for privileged client pid %d from %s"), VIR_INFO("Turn off polkit auth for privileged client pid %d from %s",
pid, client->addrstr); pid, client->addrstr);
client->auth = REMOTE_AUTH_NONE; client->auth = REMOTE_AUTH_NONE;
} }
......
...@@ -2292,7 +2292,7 @@ remoteDispatchAuthPolkit(struct qemud_server *server, ...@@ -2292,7 +2292,7 @@ remoteDispatchAuthPolkit(struct qemud_server *server,
goto authfail; goto authfail;
} }
VIR_INFO(_("Checking PID %d running as %d"), callerPid, callerUid); VIR_INFO("Checking PID %d running as %d", callerPid, callerUid);
rv = snprintf(pidbuf, sizeof pidbuf, "%d", callerPid); rv = snprintf(pidbuf, sizeof pidbuf, "%d", callerPid);
if (rv < 0 || rv >= sizeof pidbuf) { if (rv < 0 || rv >= sizeof pidbuf) {
...@@ -2319,7 +2319,7 @@ remoteDispatchAuthPolkit(struct qemud_server *server, ...@@ -2319,7 +2319,7 @@ remoteDispatchAuthPolkit(struct qemud_server *server,
} }
PROBE(CLIENT_AUTH_ALLOW, "fd=%d, auth=%d, username=%s", PROBE(CLIENT_AUTH_ALLOW, "fd=%d, auth=%d, username=%s",
client->fd, REMOTE_AUTH_POLKIT, (char *)ident); client->fd, REMOTE_AUTH_POLKIT, (char *)ident);
VIR_INFO(_("Policy allowed action %s from pid %d, uid %d"), VIR_INFO("Policy allowed action %s from pid %d, uid %d",
action, callerPid, callerUid); action, callerPid, callerUid);
ret->complete = 1; ret->complete = 1;
client->auth = REMOTE_AUTH_NONE; client->auth = REMOTE_AUTH_NONE;
...@@ -2390,7 +2390,7 @@ remoteDispatchAuthPolkit(struct qemud_server *server, ...@@ -2390,7 +2390,7 @@ remoteDispatchAuthPolkit(struct qemud_server *server,
goto authfail; goto authfail;
} }
VIR_INFO(_("Checking PID %d running as %d"), callerPid, callerUid); VIR_INFO("Checking PID %d running as %d", callerPid, callerUid);
dbus_error_init(&err); dbus_error_init(&err);
if (!(pkcaller = polkit_caller_new_from_pid(server->sysbus, if (!(pkcaller = polkit_caller_new_from_pid(server->sysbus,
callerPid, &err))) { callerPid, &err))) {
...@@ -2450,7 +2450,7 @@ remoteDispatchAuthPolkit(struct qemud_server *server, ...@@ -2450,7 +2450,7 @@ remoteDispatchAuthPolkit(struct qemud_server *server,
} }
PROBE(CLIENT_AUTH_ALLOW, "fd=%d, auth=%d, username=%s", PROBE(CLIENT_AUTH_ALLOW, "fd=%d, auth=%d, username=%s",
client->fd, REMOTE_AUTH_POLKIT, ident); client->fd, REMOTE_AUTH_POLKIT, ident);
VIR_INFO(_("Policy allowed action %s from pid %d, uid %d, result %s"), VIR_INFO("Policy allowed action %s from pid %d, uid %d, result %s",
action, callerPid, callerUid, action, callerPid, callerUid,
polkit_result_to_string_representation(pkresult)); polkit_result_to_string_representation(pkresult));
ret->complete = 1; ret->complete = 1;
......
...@@ -86,7 +86,6 @@ src/test/test_driver.c ...@@ -86,7 +86,6 @@ src/test/test_driver.c
src/uml/uml_conf.c src/uml/uml_conf.c
src/uml/uml_driver.c src/uml/uml_driver.c
src/util/authhelper.c src/util/authhelper.c
src/util/bridge.c
src/util/cgroup.c src/util/cgroup.c
src/util/command.c src/util/command.c
src/util/conf.c src/util/conf.c
......
...@@ -1407,7 +1407,7 @@ networkReloadIptablesRules(struct network_driver *driver) ...@@ -1407,7 +1407,7 @@ networkReloadIptablesRules(struct network_driver *driver)
{ {
unsigned int i; unsigned int i;
VIR_INFO(_("Reloading iptables rules")); VIR_INFO("Reloading iptables rules");
for (i = 0 ; i < driver->networks.count ; i++) { for (i = 0 ; i < driver->networks.count ; i++) {
virNetworkObjLock(driver->networks.objs[i]); virNetworkObjLock(driver->networks.objs[i]);
...@@ -1752,7 +1752,7 @@ networkStartNetworkDaemon(struct network_driver *driver, ...@@ -1752,7 +1752,7 @@ networkStartNetworkDaemon(struct network_driver *driver,
} }
VIR_FREE(macTapIfName); VIR_FREE(macTapIfName);
VIR_INFO(_("Starting up network '%s'"), network->def->name); VIR_INFO("Starting up network '%s'", network->def->name);
network->active = 1; network->active = 1;
return 0; return 0;
...@@ -1825,7 +1825,7 @@ static int networkShutdownNetworkDaemon(struct network_driver *driver, ...@@ -1825,7 +1825,7 @@ static int networkShutdownNetworkDaemon(struct network_driver *driver,
char *stateFile; char *stateFile;
char *macTapIfName; char *macTapIfName;
VIR_INFO(_("Shutting down network '%s'"), network->def->name); VIR_INFO("Shutting down network '%s'", network->def->name);
if (!virNetworkObjIsActive(network)) if (!virNetworkObjIsActive(network))
return 0; return 0;
...@@ -2127,7 +2127,7 @@ static virNetworkPtr networkCreate(virConnectPtr conn, const char *xml) { ...@@ -2127,7 +2127,7 @@ static virNetworkPtr networkCreate(virConnectPtr conn, const char *xml) {
goto cleanup; goto cleanup;
} }
VIR_INFO(_("Creating network '%s'"), network->def->name); VIR_INFO("Creating network '%s'", network->def->name);
ret = virGetNetwork(conn, network->def->name, network->def->uuid); ret = virGetNetwork(conn, network->def->name, network->def->uuid);
cleanup: cleanup:
...@@ -2199,7 +2199,7 @@ static virNetworkPtr networkDefine(virConnectPtr conn, const char *xml) { ...@@ -2199,7 +2199,7 @@ static virNetworkPtr networkDefine(virConnectPtr conn, const char *xml) {
dnsmasqContextFree(dctx); dnsmasqContextFree(dctx);
} }
VIR_INFO(_("Defining network '%s'"), network->def->name); VIR_INFO("Defining network '%s'", network->def->name);
ret = virGetNetwork(conn, network->def->name, network->def->uuid); ret = virGetNetwork(conn, network->def->name, network->def->uuid);
cleanup: cleanup:
...@@ -2286,7 +2286,7 @@ static int networkUndefine(virNetworkPtr net) { ...@@ -2286,7 +2286,7 @@ static int networkUndefine(virNetworkPtr net) {
} }
VIR_INFO(_("Undefining network '%s'"), network->def->name); VIR_INFO("Undefining network '%s'", network->def->name);
virNetworkRemoveInactive(&driver->networks, virNetworkRemoveInactive(&driver->networks,
network); network);
network = NULL; network = NULL;
......
...@@ -3757,7 +3757,7 @@ static virDomainPtr qemudDomainDefine(virConnectPtr conn, const char *xml) { ...@@ -3757,7 +3757,7 @@ static virDomainPtr qemudDomainDefine(virConnectPtr conn, const char *xml) {
if (virDomainSaveConfig(driver->configDir, if (virDomainSaveConfig(driver->configDir,
vm->newDef ? vm->newDef : vm->def) < 0) { vm->newDef ? vm->newDef : vm->def) < 0) {
VIR_INFO(_("Defining domain '%s'"), vm->def->name); VIR_INFO("Defining domain '%s'", vm->def->name);
virDomainRemoveInactive(&driver->domains, virDomainRemoveInactive(&driver->domains,
vm); vm);
vm = NULL; vm = NULL;
...@@ -3770,7 +3770,7 @@ static virDomainPtr qemudDomainDefine(virConnectPtr conn, const char *xml) { ...@@ -3770,7 +3770,7 @@ static virDomainPtr qemudDomainDefine(virConnectPtr conn, const char *xml) {
VIR_DOMAIN_EVENT_DEFINED_ADDED : VIR_DOMAIN_EVENT_DEFINED_ADDED :
VIR_DOMAIN_EVENT_DEFINED_UPDATED); VIR_DOMAIN_EVENT_DEFINED_UPDATED);
VIR_INFO(_("Creating domain '%s'"), vm->def->name); VIR_INFO("Creating domain '%s'", vm->def->name);
dom = virGetDomain(conn, vm->def->name, vm->def->uuid); dom = virGetDomain(conn, vm->def->name, vm->def->uuid);
if (dom) dom->id = vm->def->id; if (dom) dom->id = vm->def->id;
...@@ -3820,7 +3820,7 @@ static int qemudDomainUndefine(virDomainPtr dom) { ...@@ -3820,7 +3820,7 @@ static int qemudDomainUndefine(virDomainPtr dom) {
VIR_DOMAIN_EVENT_UNDEFINED, VIR_DOMAIN_EVENT_UNDEFINED,
VIR_DOMAIN_EVENT_UNDEFINED_REMOVED); VIR_DOMAIN_EVENT_UNDEFINED_REMOVED);
VIR_INFO(_("Undefining domain '%s'"), vm->def->name); VIR_INFO("Undefining domain '%s'", vm->def->name);
virDomainRemoveInactive(&driver->domains, virDomainRemoveInactive(&driver->domains,
vm); vm);
vm = NULL; vm = NULL;
......
...@@ -551,7 +551,7 @@ storagePoolCreate(virConnectPtr conn, ...@@ -551,7 +551,7 @@ storagePoolCreate(virConnectPtr conn,
pool = NULL; pool = NULL;
goto cleanup; goto cleanup;
} }
VIR_INFO(_("Creating storage pool '%s'"), pool->def->name); VIR_INFO("Creating storage pool '%s'", pool->def->name);
pool->active = 1; pool->active = 1;
ret = virGetStoragePool(conn, pool->def->name, pool->def->uuid); ret = virGetStoragePool(conn, pool->def->name, pool->def->uuid);
...@@ -593,7 +593,7 @@ storagePoolDefine(virConnectPtr conn, ...@@ -593,7 +593,7 @@ storagePoolDefine(virConnectPtr conn,
} }
def = NULL; def = NULL;
VIR_INFO(_("Defining storage pool '%s'"), pool->def->name); VIR_INFO("Defining storage pool '%s'", pool->def->name);
ret = virGetStoragePool(conn, pool->def->name, pool->def->uuid); ret = virGetStoragePool(conn, pool->def->name, pool->def->uuid);
cleanup: cleanup:
...@@ -643,7 +643,7 @@ storagePoolUndefine(virStoragePoolPtr obj) { ...@@ -643,7 +643,7 @@ storagePoolUndefine(virStoragePoolPtr obj) {
VIR_FREE(pool->configFile); VIR_FREE(pool->configFile);
VIR_FREE(pool->autostartLink); VIR_FREE(pool->autostartLink);
VIR_INFO(_("Undefining storage pool '%s'"), pool->def->name); VIR_INFO("Undefining storage pool '%s'", pool->def->name);
virStoragePoolObjRemove(&driver->pools, pool); virStoragePoolObjRemove(&driver->pools, pool);
pool = NULL; pool = NULL;
ret = 0; ret = 0;
...@@ -691,7 +691,7 @@ storagePoolStart(virStoragePoolPtr obj, ...@@ -691,7 +691,7 @@ storagePoolStart(virStoragePoolPtr obj,
goto cleanup; goto cleanup;
} }
VIR_INFO(_("Starting up storage pool '%s'"), pool->def->name); VIR_INFO("Starting up storage pool '%s'", pool->def->name);
pool->active = 1; pool->active = 1;
ret = 0; ret = 0;
...@@ -779,7 +779,7 @@ storagePoolDestroy(virStoragePoolPtr obj) { ...@@ -779,7 +779,7 @@ storagePoolDestroy(virStoragePoolPtr obj) {
virStoragePoolObjClearVols(pool); virStoragePoolObjClearVols(pool);
pool->active = 0; pool->active = 0;
VIR_INFO(_("Shutting down storage pool '%s'"), pool->def->name); VIR_INFO("Shutting down storage pool '%s'", pool->def->name);
if (pool->configFile == NULL) { if (pool->configFile == NULL) {
virStoragePoolObjRemove(&driver->pools, pool); virStoragePoolObjRemove(&driver->pools, pool);
...@@ -836,7 +836,7 @@ storagePoolDelete(virStoragePoolPtr obj, ...@@ -836,7 +836,7 @@ storagePoolDelete(virStoragePoolPtr obj,
} }
if (backend->deletePool(obj->conn, pool, flags) < 0) if (backend->deletePool(obj->conn, pool, flags) < 0)
goto cleanup; goto cleanup;
VIR_INFO(_("Deleting storage pool '%s'"), pool->def->name); VIR_INFO("Deleting storage pool '%s'", pool->def->name);
ret = 0; ret = 0;
cleanup: cleanup:
...@@ -1366,7 +1366,7 @@ storageVolumeCreateXML(virStoragePoolPtr obj, ...@@ -1366,7 +1366,7 @@ storageVolumeCreateXML(virStoragePoolPtr obj,
} }
VIR_INFO(_("Creating volume '%s' in storage pool '%s'"), VIR_INFO("Creating volume '%s' in storage pool '%s'",
volobj->name, pool->def->name); volobj->name, pool->def->name);
ret = volobj; ret = volobj;
volobj = NULL; volobj = NULL;
...@@ -1526,7 +1526,7 @@ storageVolumeCreateXMLFrom(virStoragePoolPtr obj, ...@@ -1526,7 +1526,7 @@ storageVolumeCreateXMLFrom(virStoragePoolPtr obj,
goto cleanup; goto cleanup;
} }
VIR_INFO(_("Creating volume '%s' in storage pool '%s'"), VIR_INFO("Creating volume '%s' in storage pool '%s'",
volobj->name, pool->def->name); volobj->name, pool->def->name);
ret = volobj; ret = volobj;
volobj = NULL; volobj = NULL;
...@@ -1932,7 +1932,7 @@ storageVolumeDelete(virStorageVolPtr obj, ...@@ -1932,7 +1932,7 @@ storageVolumeDelete(virStorageVolPtr obj,
for (i = 0 ; i < pool->volumes.count ; i++) { for (i = 0 ; i < pool->volumes.count ; i++) {
if (pool->volumes.objs[i] == vol) { if (pool->volumes.objs[i] == vol) {
VIR_INFO(_("Deleting volume '%s' from storage pool '%s'"), VIR_INFO("Deleting volume '%s' from storage pool '%s'",
vol->name, pool->def->name); vol->name, pool->def->name);
virStorageVolDefFree(vol); virStorageVolDefFree(vol);
vol = NULL; vol = NULL;
......
/* /*
* Copyright (C) 2007, 2009 Red Hat, Inc. * Copyright (C) 2007, 2009, 2011 Red Hat, Inc.
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public * modify it under the terms of the GNU Lesser General Public
...@@ -428,14 +428,14 @@ brProbeVnetHdr(int tapfd) ...@@ -428,14 +428,14 @@ brProbeVnetHdr(int tapfd)
struct ifreq dummy; struct ifreq dummy;
if (ioctl(tapfd, TUNGETFEATURES, &features) != 0) { if (ioctl(tapfd, TUNGETFEATURES, &features) != 0) {
VIR_INFO(_("Not enabling IFF_VNET_HDR; " VIR_INFO("Not enabling IFF_VNET_HDR; "
"TUNGETFEATURES ioctl() not implemented")); "TUNGETFEATURES ioctl() not implemented");
return 0; return 0;
} }
if (!(features & IFF_VNET_HDR)) { if (!(features & IFF_VNET_HDR)) {
VIR_INFO(_("Not enabling IFF_VNET_HDR; " VIR_INFO("Not enabling IFF_VNET_HDR; "
"TUNGETFEATURES ioctl() reports no IFF_VNET_HDR")); "TUNGETFEATURES ioctl() reports no IFF_VNET_HDR");
return 0; return 0;
} }
...@@ -443,17 +443,17 @@ brProbeVnetHdr(int tapfd) ...@@ -443,17 +443,17 @@ brProbeVnetHdr(int tapfd)
* If TUNGETIFF is not implemented then errno == EBADFD. * If TUNGETIFF is not implemented then errno == EBADFD.
*/ */
if (ioctl(tapfd, TUNGETIFF, &dummy) != -1 || errno != EBADFD) { if (ioctl(tapfd, TUNGETIFF, &dummy) != -1 || errno != EBADFD) {
VIR_INFO(_("Not enabling IFF_VNET_HDR; " VIR_INFO("Not enabling IFF_VNET_HDR; "
"TUNGETIFF ioctl() not implemented")); "TUNGETIFF ioctl() not implemented");
return 0; return 0;
} }
VIR_INFO(_("Enabling IFF_VNET_HDR")); VIR_INFO("Enabling IFF_VNET_HDR");
return 1; return 1;
# else # else
(void) tapfd; (void) tapfd;
VIR_INFO(_("Not enabling IFF_VNET_HDR; disabled at build time")); VIR_INFO("Not enabling IFF_VNET_HDR; disabled at build time");
return 0; return 0;
# endif # endif
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册