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
This commit is contained in:
parent
fd15e8de61
commit
58aef892d3
@ -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);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user