summaryrefslogtreecommitdiff
path: root/doc/libmagic.man
diff options
context:
space:
mode:
authorChristos Zoulas <christos@zoulas.com>2003-07-10 17:54:24 +0000
committerChristos Zoulas <christos@zoulas.com>2003-07-10 17:54:24 +0000
commit4a326fac210d5f743f597a2cdcee9d7f9f0057a4 (patch)
treed02692acf9c4ace17ab3bb34d4a6fe0c71064c7e /doc/libmagic.man
parent7f3a7c64fe62adc9f2058a8a2069af8d5427bcc2 (diff)
downloadfile-git-4a326fac210d5f743f597a2cdcee9d7f9f0057a4.tar.gz
document preserve atime
Diffstat (limited to 'doc/libmagic.man')
-rw-r--r--doc/libmagic.man20
1 files changed, 18 insertions, 2 deletions
diff --git a/doc/libmagic.man b/doc/libmagic.man
index 90876390..78eb1679 100644
--- a/doc/libmagic.man
+++ b/doc/libmagic.man
@@ -54,7 +54,7 @@
.Fn magic_file "magic_t cookie, const char *filename"
.Ft const char *
.Fn magic_buffer "magic_t cookie, const void *buffer, size_t length"
-.Ft void
+.Ft int
.Fn magic_setflags "magic_t cookie, int flags"
.Ft int
.Fn magic_check "magic_t cookie, const char *filename"
@@ -93,6 +93,12 @@ Return a mime string, instead of a textual description.
Return all matches, not just the first.
.It Dv MAGIC_CHECK
Check the magic database for consistency and print warnings to stderr.
+.It Dv MAGIC_PRESERVE_ATIME
+On systems that support
+.Xr utime 2
+or
+.Xr utimes 2 ,
+attempt to preserve the access time of files analyzed.
.El
.Pp
The
@@ -158,7 +164,8 @@ before any magic queries can performed.
The function
.Fn magic_open
returns a magic cookie on success and NULL on failure setting errno to
-an appropriate value.
+an appropriate value. It will set errno to EINVAL if an unsupported
+value for flags was given.
The
.Fn magic_load ,
.Fn magic_compile ,
@@ -173,6 +180,15 @@ functions return a string on success and NULL on failure. The
.Fn magic_error
function returns a textual description of the errors of the above
functions, or NULL if there was no error.
+Finally,
+.Fn magic_setflags
+returns -1 on systems that don't support
+.Xr utime 2 ,
+or
+.Xr utimes 2
+when
+.Dv MAGIC_PRESERVE_ATIME
+is set.
.Sh FILES
.Bl -tag -width __MAGIC__.mime.mgc -compact
.It Pa __MAGIC__.mime