From 9c495f2a5d6b4f40862c939fe58cc80905532331 Mon Sep 17 00:00:00 2001 From: Christos Zoulas Date: Mon, 25 Dec 2017 15:08:44 +0000 Subject: [PATCH] - remove magic.mime mention, it was only kept for compatibility and the code will eventually be removed - add a section explaining the exit values --- doc/file.man | 28 +++++++++++++++++++++------- 1 file changed, 21 insertions(+), 7 deletions(-) diff --git a/doc/file.man b/doc/file.man index 88ed7d4d..6f284226 100644 --- a/doc/file.man +++ b/doc/file.man @@ -1,5 +1,5 @@ -.\" $File: file.man,v 1.126 2017/10/13 15:37:03 christos Exp $ -.Dd October 13, 2017 +.\" $File: file.man,v 1.127 2017/12/25 15:08:44 christos Exp $ +.Dd December 25, 2017 .Dt FILE __CSECTION__ .Os .Sh NAME @@ -375,6 +375,25 @@ prints just the filename followed by a NUL followed by the description .It Fl -help Print a help message and exit. .El +.Sh EXIT STATUS +.Nm +will exit with +.Dv 0 +if the operation was successful or +.Dv >0 +if an error was encountered. +The following errors cause diagnostic messages, but don't affect the program +exit code (as POSIX requires), unless +.Fl E +is specified: +.Bl -bullet -compact -offset indent +.It +A file cannot be found +.It +There is no permission to read a file +.It +The file type cannot be determined +.El .Sh FILES .Bl -tag -width __MAGIC__.mgc -compact .It Pa __MAGIC__.mgc @@ -394,11 +413,6 @@ will not attempt to open adds .Dq Pa .mgc to the value of this variable as appropriate. -However, -.Pa file -has to exist in order for -.Pa file.mime -to be considered. The environment variable .Ev POSIXLY_CORRECT controls (on systems that support symbolic links), whether -- 2.40.0