Date: Mon, 5 Jan 2015 16:09:52 +0000 (UTC) From: "Pedro F. Giffuni" <pfg@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r276706 - stable/10/usr.bin/patch Message-ID: <201501051609.t05G9qXq093269@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: pfg Date: Mon Jan 5 16:09:51 2015 New Revision: 276706 URL: https://svnweb.freebsd.org/changeset/base/276706 Log: 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 Modified: stable/10/usr.bin/patch/patch.c stable/10/usr.bin/patch/util.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/patch/patch.c ============================================================================== --- stable/10/usr.bin/patch/patch.c Mon Jan 5 16:05:15 2015 (r276705) +++ stable/10/usr.bin/patch/patch.c Mon Jan 5 16:09:51 2015 (r276706) @@ -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); } /* Modified: stable/10/usr.bin/patch/util.c ============================================================================== --- stable/10/usr.bin/patch/util.c Mon Jan 5 16:05:15 2015 (r276705) +++ stable/10/usr.bin/patch/util.c Mon Jan 5 16:09:51 2015 (r276706) @@ -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); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201501051609.t05G9qXq093269>