fadvise: always exit with EXIT_FAILURE on error

Also document it.

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
This commit is contained in:
Thomas Weißschuh 2023-04-16 18:36:29 +02:00
parent 10333c1742
commit 3179b40c69
2 changed files with 10 additions and 1 deletions

View file

@ -41,6 +41,15 @@ If this option is omitted, 0 is used as default advice.
include::man-common/help-version.adoc[]
== EXIT STATUS
*fadvise* has the following exit status values:
*0*::
success
*1*::
unspecified failure
== AUTHORS
mailto:yamato@redhat.com[Masatake YAMATO]

View file

@ -158,5 +158,5 @@ int main(int argc, char ** argv)
if (do_close)
close(fd);
return rc;
return rc == 0 ? EXIT_SUCCESS : EXIT_FAILURE;
}