diff options
author | Christos Zoulas <christos@zoulas.com> | 2014-08-04 06:19:44 +0000 |
---|---|---|
committer | Christos Zoulas <christos@zoulas.com> | 2014-08-04 06:19:44 +0000 |
commit | b27ef93a9ef90a4edee2562ca698748e997436d0 (patch) | |
tree | cfc026582fac49f000002b4c9dbfe64c9606f534 /doc | |
parent | d23e3b4ee46d46dc56df8e62159288b3ef48b66d (diff) | |
download | file-git-b27ef93a9ef90a4edee2562ca698748e997436d0.tar.gz |
PR/367: Brooks Davis: Add magic_load_buffers to provide a means to load the
magic database on environments that have no direct access to the filesystem.
Diffstat (limited to 'doc')
-rw-r--r-- | doc/libmagic.man | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/doc/libmagic.man b/doc/libmagic.man index 6ab6d71e..6aa374f4 100644 --- a/doc/libmagic.man +++ b/doc/libmagic.man @@ -1,4 +1,4 @@ -.\" $File: libmagic.man,v 1.27 2013/01/06 20:56:52 christos Exp $ +.\" $File: libmagic.man,v 1.28 2014/03/02 14:47:16 christos Exp $ .\" .\" Copyright (c) Christos Zoulas 2003. .\" All Rights Reserved. @@ -25,7 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd January 6, 2012 +.Dd August 4, 2014 .Dt LIBMAGIC 3 .Os .Sh NAME @@ -71,6 +71,8 @@ .Ft int .Fn magic_load "magic_t cookie" "const char *filename" .Ft int +.Fn magic_load_buffers "magic_t cookie" "void **buffers" "size_t *sizes" "size_t nbuffers" +.Ft int .Fn magic_version "void" .Sh DESCRIPTION These functions @@ -253,6 +255,19 @@ adds to the database filename as appropriate. .Pp The +.Fn magic_load_buffers +function takes an array of size +.Fa nbuffers +of +.Fa buffers +with a respective size for each in the array of +.Fa sizes +loaded with the contents of the magic databases from the filesystem. +This function can be used in environment where the magic library does +not have direct access to the filesystem, but can access the magic +database via shared memory or other IPC means. +.Pp +The .Fn magic_version command returns the version number of this library which is compiled into the shared library using the constant |