summaryrefslogtreecommitdiffstats
path: root/usr.bin/patch/util.c
diff options
context:
space:
mode:
authormillert <millert@openbsd.org>2003-07-28 16:13:53 +0000
committermillert <millert@openbsd.org>2003-07-28 16:13:53 +0000
commitea13368aef8a5016385daaeab11142fd28040f0b (patch)
tree0217d02bb907dfdb9205c83277f8ead65e92a619 /usr.bin/patch/util.c
parentallow gif(4) over ipsec: mark mbuf for transport mode SA, (diff)
downloadwireguard-openbsd-ea13368aef8a5016385daaeab11142fd28040f0b.tar.xz
wireguard-openbsd-ea13368aef8a5016385daaeab11142fd28040f0b.zip
Make patch(1) exit value match POSIX and be consistent with diff.
Comments and OK from otto@
Diffstat (limited to 'usr.bin/patch/util.c')
-rw-r--r--usr.bin/patch/util.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/usr.bin/patch/util.c b/usr.bin/patch/util.c
index 0874dac002f..885ac4109fe 100644
--- a/usr.bin/patch/util.c
+++ b/usr.bin/patch/util.c
@@ -1,7 +1,7 @@
-/* $OpenBSD: util.c,v 1.18 2003/07/25 02:12:45 millert Exp $ */
+/* $OpenBSD: util.c,v 1.19 2003/07/28 16:13:53 millert Exp $ */
#ifndef lint
-static const char rcsid[] = "$OpenBSD: util.c,v 1.18 2003/07/25 02:12:45 millert Exp $";
+static const char rcsid[] = "$OpenBSD: util.c,v 1.19 2003/07/28 16:13:53 millert Exp $";
#endif /* not lint */
#include <sys/param.h>
@@ -199,7 +199,7 @@ fatal(char *fmt, ...)
fprintf(stderr, "patch: **** ");
vfprintf(stderr, fmt, ap);
va_end(ap);
- my_exit(1);
+ my_exit(2);
}
/*
@@ -216,7 +216,7 @@ pfatal(char *fmt, ...)
vfprintf(stderr, fmt, ap);
va_end(ap);
fprintf(stderr, ": %s\n", strerror(errnum));
- my_exit(1);
+ my_exit(2);
}
/*
@@ -385,7 +385,7 @@ void
version(void)
{
fprintf(stderr, "Patch version 2.0-12u8-OpenBSD\n");
- my_exit(0);
+ my_exit(EXIT_SUCCESS);
}
/*