can't -> "unable to" in warning/error messages

This commit is contained in:
Todd C. Miller
2011-05-18 12:36:26 -04:00
parent 159d7e393a
commit 6f8cd91928
9 changed files with 32 additions and 29 deletions

View File

@@ -133,7 +133,7 @@ pty_setup(uid_t uid, const char *tty, const char *utmp_user)
if (io_fds[SFD_USERTTY] != -1) {
if (!get_pty(&io_fds[SFD_MASTER], &io_fds[SFD_SLAVE],
slavename, sizeof(slavename), uid))
error(1, _("can't allocate pty"));
error(1, _("unable to allocate pty"));
/* Add entry to utmp/utmpx? */
if (utmp_user != NULL)
utmp_login(tty, slavename, io_fds[SFD_SLAVE], utmp_user);

View File

@@ -356,7 +356,7 @@ get_user_groups(struct user_details *ud)
ud->groups = emalloc2(ud->ngroups, sizeof(GETGROUPS_T));
if (getgroups(ud->ngroups, ud->groups) < 0)
error(1, _("can't get group vector"));
error(1, _("unable to get group vector"));
glsize = sizeof("groups=") - 1 + (ud->ngroups * (MAX_UID_T_LEN + 1));
gid_list = emalloc(glsize);
memcpy(gid_list, "groups=", sizeof("groups=") - 1);

View File

@@ -260,12 +260,12 @@ utmp_slot(const char *line, int ttyfd)
* doesn't take an argument.
*/
if ((sfd = dup(STDIN_FILENO)) == -1)
error(1, _("can't save stdin"));
error(1, _("unable to save stdin"));
if (dup2(ttyfd, STDIN_FILENO) == -1)
error(1, _("can't dup2 stdin"));
error(1, _("unable to dup2 stdin"));
slot = ttyslot();
if (dup2(sfd, STDIN_FILENO) == -1)
error(1, _("can't restore stdin"));
error(1, _("unable to restore stdin"));
close(sfd);
return slot;