From: Nicolas François Date: Mon, 19 Aug 2013 23:37:27 +0000 (+0200) Subject: Report error message rather than errno. X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=0881abd1aea2d55f3a4ff74b5b01f5598767e565;p=thirdparty%2Fshadow.git Report error message rather than errno. * src/su.c: Report error message rather than errno. --- diff --git a/ChangeLog b/ChangeLog index 753ebc357..162f9164e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2013-08-19 Nicolas François + + * src/su.c: Report error message rather than errno. + 2013-08-19 Nicolas François * src/su.c: Avoid multiple statements per line. diff --git a/src/su.c b/src/su.c index 3e9ac3913..b71f3a569 100644 --- a/src/su.c +++ b/src/su.c @@ -364,8 +364,8 @@ static void handle_session (void) if ( winsz_set && (ioctl (fd_pts, TIOCSWINSZ, &winsz) == -1)) { fprintf (stderr, - _("%s: Cannot set window size of session %d\n"), - Prog, errno); + _("%s: Cannot set window size of session: %s\n"), + Prog, strerror (errno)); } if ( (dup2 (fd_pts, STDIN_FILENO) == -1) @@ -538,8 +538,8 @@ static void handle_session (void) continue; } fprintf (stderr, - _("%s: Failure in reading from session %d %ld\r\n"), - Prog, errno, bytes_r); + _("%s: Failure in reading from session: %s\r\n"), + Prog, strerror (errno)); stop = true; }