]> granicus.if.org Git - file/commitdiff
add a description for file_descriptor
authorChristos Zoulas <christos@zoulas.com>
Tue, 1 Jun 2010 12:31:31 +0000 (12:31 +0000)
committerChristos Zoulas <christos@zoulas.com>
Tue, 1 Jun 2010 12:31:31 +0000 (12:31 +0000)
doc/libmagic.man

index a9e592157716a3c31548b620d55a4260f83ae841..9af2c0bc4c09b136a232147ebdb3374b9ba9c114 100644 (file)
@@ -1,4 +1,4 @@
-.\" $File: libmagic.man,v 1.21 2009/11/24 21:16:14 christos Exp $
+.\" $File: libmagic.man,v 1.22 2010/06/01 12:31:31 christos Exp $
 .\"
 .\" Copyright (c) Christos Zoulas 2003.
 .\" All Rights Reserved.
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
 .\"
-.Dd November 24, 2009
+.Dd July 1, 2010
 .Dt LIBMAGIC 3
 .Os
 .Sh NAME
 .Nm magic_open ,
 .Nm magic_close ,
 .Nm magic_error ,
-.Nm magic_file ,
+.Nm magic_descriptor ,
 .Nm magic_buffer ,
 .Nm magic_setflags ,
 .Nm magic_check ,
@@ -52,6 +52,8 @@
 .Ft int
 .Fn magic_errno "magic_t cookie"
 .Ft const char *
+.Fn magic_descriptor "magic_t cookie, "int fd"
+.Ft const char *
 .Fn magic_file "magic_t cookie, const char *filename"
 .Ft const char *
 .Fn magic_buffer "magic_t cookie, const void *buffer, size_t length"
@@ -156,6 +158,12 @@ If the
 is NULL, then stdin is used.
 .Pp
 The
+.Fn magic_descriptor
+function returns a textual description of the contents of the
+.Ar fd
+argument, or NULL if an error occurred.
+.Pp
+The
 .Fn magic_buffer
 function returns a textual description of the contents of the
 .Ar buffer