]> git.ipfire.org Git - thirdparty/shadow.git/commitdiff
Report error message rather than errno.
authorNicolas François <nicolas.francois@centraliens.net>
Mon, 19 Aug 2013 23:37:27 +0000 (01:37 +0200)
committerNicolas François <nicolas.francois@centraliens.net>
Mon, 19 Aug 2013 23:44:50 +0000 (01:44 +0200)
* src/su.c: Report error message rather than errno.

ChangeLog
src/su.c

index 753ebc3578be01690bdcfc55b7ab743369a0a8cb..162f9164e2ab1d2fbf62bd1c366f8b73024a9bc9 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2013-08-19  Nicolas François  <nicolas.francois@centraliens.net>
+
+       * src/su.c: Report error message rather than errno.
+
 2013-08-19  Nicolas François  <nicolas.francois@centraliens.net>
 
        * src/su.c: Avoid multiple statements per line.
index 3e9ac391307507b2a5a843a372d5d642718c72d0..b71f3a56915298502ede05f9c65ca563e0af7277 100644 (file)
--- 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;
                                        }