File: 03-Show-perror.patch

package info (click to toggle)
super 3.30.3-2.1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,860 kB
  • sloc: ansic: 23,608; makefile: 424; sh: 297
file content (22 lines) | stat: -rw-r--r-- 495 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
From: Robert Luberda <robert@debian.org>
Date: Fri, 30 Apr 2004 19:28:00 +0200
Subject: 03 Show perror.

Make error messages more verbose.
---
 error.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/error.c b/error.c
index df4041f..4a32346 100644
--- a/error.c
+++ b/error.c
@@ -348,6 +348,8 @@ Error(
 	va_start(ap, fmt);
 	(void) vsprintf(buf, newfmt, ap);
 	va_end(ap);
+	if (show_perror)
+	    StrLCat(buf, Strerror(error), sizeof(buf));
 	SysLog(error_priority, buf);
     }
 #endif