summaryrefslogtreecommitdiffstats
path: root/usr.bin/patch
diff options
context:
space:
mode:
authorpfg <pfg@FreeBSD.org>2015-01-05 16:09:51 +0000
committerpfg <pfg@FreeBSD.org>2015-01-05 16:09:51 +0000
commit1bedd19bafe77441ef3877d91c0d83bb3990b45d (patch)
tree65213028fee51301b668e453a5e1265cfa863b1b /usr.bin/patch
parent5777edec4a4de6b756dc614129b8c3ac1605481d (diff)
downloadFreeBSD-src-1bedd19bafe77441ef3877d91c0d83bb3990b45d.zip
FreeBSD-src-1bedd19bafe77441ef3877d91c0d83bb3990b45d.tar.gz
MFC r276472:
Minor 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
Diffstat (limited to 'usr.bin/patch')
-rw-r--r--usr.bin/patch/patch.c2
-rw-r--r--usr.bin/patch/util.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/patch/patch.c b/usr.bin/patch/patch.c
index 14aca68..9a97e8d 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 6980676..6b9bef8 100644
--- a/usr.bin/patch/util.c
+++ b/usr.bin/patch/util.c
@@ -412,7 +412,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);
}
OpenPOWER on IntegriCloud