Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 9 Dec 2004 12:13:59 GMT
From:      Alden <aspiess@software.plasmon.com>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   docs/74889: S_ISREG etc marcos missing from stat man page
Message-ID:  <200412091213.iB9CDwTS046697@www.freebsd.org>
Resent-Message-ID: <200412091220.iB9CKKWJ053693@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         74889
>Category:       docs
>Synopsis:       S_ISREG etc marcos missing from stat man page
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-doc
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          doc-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Dec 09 12:20:20 GMT 2004
>Closed-Date:
>Last-Modified:
>Originator:     Alden
>Release:        Man pages on freebsd.org website
>Organization:
Plasmon
>Environment:
NA
>Description:
      The section 2 man page for stat, lstat, etc does not define the POSIX macros to define file mode - i.e. S_ISLNK, S_ISREG, etc. The macros do not appear to have their own man page.

As the macros exist only for testing the st_mode field in the stat buffer the stat man page is the obvious place to define them.

I know the macros exist because I'm using them.
>How-To-Repeat:
      Using the man page interface on www.freebsd.org, search for lstat. Look in all sections. I've tried FreeBSD 6.0-current and FreeBSD 4.8-RELEASE (which is the BSD version I'm using).

The S_IFLNK flag is defined, but not the macro to test it. Same for the other file modes.
>Fix:
      Include the standard definition for the macros. Text from the linux man page for stat below, as an example:

   The following POSIX macros are defined to check the file type:

              S_ISREG(m)  is it a regular file?

              S_ISDIR(m)  directory?

              S_ISCHR(m)  character device?

              S_ISBLK(m)  block device?

              S_ISFIFO(m) fifo?

              S_ISLNK(m)  symbolic link? (Not in POSIX.1-1996.)

              S_ISSOCK(m) socket? (Not in POSIX.1-1996.)

>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200412091213.iB9CDwTS046697>