From: Christos Zoulas Date: Tue, 14 Oct 2003 19:33:31 +0000 (+0000) Subject: Explain magic_errno and magic_error. X-Git-Tag: FILE4_06~7 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e62e52da4fbcad6d2a790dee34aaed08aca73158;p=file Explain magic_errno and magic_error. --- diff --git a/doc/libmagic.man b/doc/libmagic.man index 2c6a0798..11d4163f 100644 --- a/doc/libmagic.man +++ b/doc/libmagic.man @@ -50,6 +50,8 @@ .Fn magic_close "magic_t cookie" .Ft const char * .Fn magic_error "magic_t cookie" +.Ft int +.Fn magic_errno "magic_t cookie" .Ft const char * .Fn magic_file "magic_t cookie, const char *filename" .Ft const char * @@ -101,6 +103,9 @@ or attempt to preserve the access time of files analyzed. .It Dv MAGIC_RAW Don't translate unprintable characters to a \eooo octal representation. +.It Dv MAGIC_ERROR +Treat operating system errors while trying to open files and follow symlinks +as real errors, instead of printing them in the magic buffer. .El .Pp The @@ -115,6 +120,12 @@ function returns a textual explanation of the last error, or NULL if there was no error. .Pp The +.Fn magic_errno +function returns the last operating system error number ( +.Xr errno 3 ) +that was encountered by a system call. +.Pp +The .Fn magic_file function returns a textual description of the contents of the .Ar filename