Call gettext() on parameters for warning()/warningx() instead of

having warning() do it for us.
This commit is contained in:
Todd C. Miller
2012-11-25 09:34:04 -05:00
parent 15c69e0e3f
commit 7b3d268687
31 changed files with 205 additions and 216 deletions

View File

@@ -1069,7 +1069,7 @@ exec_monitor(struct command_details *details, int backchannel)
error(1, _("unable to create pipe"));
cmnd_pid = sudo_debug_fork();
if (cmnd_pid == -1) {
warning(N_("unable to fork"));
warning(_("unable to fork"));
goto bad;
}
if (cmnd_pid == 0) {
@@ -1145,7 +1145,7 @@ exec_monitor(struct command_details *details, int backchannel)
if (n == -1) {
if (errno == EINTR || errno == EAGAIN)
continue;
warning(N_("error reading from signal pipe"));
warning(_("error reading from signal pipe"));
goto done;
}
/*
@@ -1166,7 +1166,7 @@ exec_monitor(struct command_details *details, int backchannel)
if (n == -1) {
if (errno == EINTR)
continue;
warning(N_("error reading from pipe"));
warning(_("error reading from pipe"));
goto done;
}
/* Got errno or EOF, either way we are done with errpipe. */
@@ -1182,11 +1182,11 @@ exec_monitor(struct command_details *details, int backchannel)
if (n == -1) {
if (errno == EINTR)
continue;
warning(N_("error reading from socketpair"));
warning(_("error reading from socketpair"));
goto done;
}
if (cstmp.type != CMD_SIGNO) {
warningx(N_("unexpected reply type on backchannel: %d"),
warningx(_("unexpected reply type on backchannel: %d"),
cstmp.type);
continue;
}
@@ -1274,7 +1274,7 @@ flush_output(void)
break; /* all I/O flushed */
if (errno == EINTR || errno == ENOMEM)
continue;
warning(N_("select failed"));
warning(_("select failed"));
}
if (perform_io(fdsr, fdsw, NULL) != 0 || nready == -1)
break;