diff options
author | pfg <pfg@FreeBSD.org> | 2014-12-31 16:30:33 +0000 |
---|---|---|
committer | pfg <pfg@FreeBSD.org> | 2014-12-31 16:30:33 +0000 |
commit | 58aef892d38f74142b5bf4024b3ee17a49e315de (patch) | |
tree | a798636fbcee7d1c9a2031de6922d2fc762033b6 /usr.bin/patch | |
parent | fd15e8de610edfd10188e1dea505216b9dae6930 (diff) | |
download | FreeBSD-src-58aef892d38f74142b5bf4024b3ee17a49e315de.zip FreeBSD-src-58aef892d38f74142b5bf4024b3ee17a49e315de.tar.gz |
Fixes to exit status.
Exit with EXIT_FAILURE for invalid arguments.
Fixes NetBSD-PR 43517.
Print version string to stdout instead of stderr;
it is user-requested and not an error.
Obtained from: NetBSD
MFC after: 5 days
Diffstat (limited to 'usr.bin/patch')
-rw-r--r-- | usr.bin/patch/patch.c | 2 | ||||
-rw-r--r-- | usr.bin/patch/util.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/patch/patch.c b/usr.bin/patch/patch.c index 987bddc..22f3027 100644 --- a/usr.bin/patch/patch.c +++ b/usr.bin/patch/patch.c @@ -634,7 +634,7 @@ usage(void) " [-r rej-name] [-V t | nil | never] [-x number] [-z backup-ext]\n" " [--posix] [origfile [patchfile]]\n" " patch <patchfile\n"); - my_exit(EXIT_SUCCESS); + my_exit(EXIT_FAILURE); } /* diff --git a/usr.bin/patch/util.c b/usr.bin/patch/util.c index 6d696b0..27ee1ae 100644 --- a/usr.bin/patch/util.c +++ b/usr.bin/patch/util.c @@ -428,7 +428,7 @@ checked_in(char *file) void version(void) { - fprintf(stderr, "patch 2.0-12u10 FreeBSD\n"); + printf("patch 2.0-12u10 FreeBSD\n"); my_exit(EXIT_SUCCESS); } |