]> git.pld-linux.org Git - packages/cpio.git/blame - cpio-errorcode.patch
- added/restored non-english-man-pages URL
[packages/cpio.git] / cpio-errorcode.patch
CommitLineData
46545a58 1--- cpio-2.4.2/main.c.error Sat Jun 24 10:29:07 2000
2+++ cpio-2.4.2/main.c Sat Jun 24 10:29:07 2000
3@@ -518,5 +518,5 @@ main (argc, argv)
4 if (archive_des >= 0 && rmtclose (archive_des) == -1)
5 error (1, errno, "error closing archive");
6
7- exit (0);
8+ exit (error_count != 0);
9 }
10--- cpio-2.4.2/extern.h.error Wed Nov 30 14:48:28 1994
11+++ cpio-2.4.2/extern.h Sat Jun 24 10:29:07 2000
12@@ -84,6 +84,8 @@ extern int f_force_local;
13 extern char *program_name;
14 extern int (*xstat) ();
15 extern void (*copy_function) ();
16+
17+extern unsigned int error_count;
18 \f
19 #if __STDC__ || defined(__MSDOS__)
20 # define P_(s) s
21--- cpio-2.4.2/error.c.error Tue Dec 5 15:39:52 1995
22+++ cpio-2.4.2/error.c Sat Jun 24 10:26:42 2000
23@@ -46,6 +46,10 @@ void exit ();
24 /* This variable is incremented each time `error' is called. */
25 unsigned int error_message_count;
26
27+/* This variable is incremented each time `error' is called and
28+ errnum is not zero. */
29+unsigned int error_count;
30+
31 /* If NULL, error will flush stdout, then print on stderr the program
32 name, a colon and a space. Otherwise, error will call this
33 function without parameters instead. */
34@@ -122,7 +126,10 @@ error (status, errnum, message, va_alist
35 ++error_message_count;
36
37 if (errnum)
38- fprintf (stderr, ": %s", strerror (errnum));
39+ {
40+ fprintf (stderr, ": %s", strerror (errnum));
41+ error_count++;
42+ }
43 putc ('\n', stderr);
44 fflush (stderr);
45 if (status)
46
47
This page took 0.065868 seconds and 4 git commands to generate.