]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
fadvise: always exit with EXIT_FAILURE on error
authorThomas Weißschuh <thomas@t-8ch.de>
Sun, 16 Apr 2023 16:36:29 +0000 (18:36 +0200)
committerThomas Weißschuh <thomas@t-8ch.de>
Mon, 17 Apr 2023 09:24:06 +0000 (11:24 +0200)
Also document it.

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
misc-utils/fadvise.1.adoc
misc-utils/fadvise.c

index b44059518e986402e9104120918e9ae43dfe6fc5..dffbeaa5cff939e800255c04eda7d3517f755dea 100644 (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]
index b16d036c0368b48f8266f55092a77436b6a3ab4f..9606fb44ec965c958a8bf211c53c30f68b8fd40f 100644 (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;
 }