docs/53621: devname(3)'s man page needs an example

Faried Nawaz fn at hungry.com
Mon Jun 23 00:00:27 UTC 2003


>Number:         53621
>Category:       docs
>Synopsis:       devname(3)'s man page needs an example
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-doc
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          doc-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Jun 22 17:00:25 PDT 2003
>Closed-Date:
>Last-Modified:
>Originator:     Faried Nawaz
>Release:        FreeBSD 5.1-CURRENT i386
>Organization:
Hungry Programmers, Inc
>Environment:
System: FreeBSD semuta.nilpotent.org 5.1-CURRENT FreeBSD 5.1-CURRENT #0: Mon Jun 23 00:16:32 PKST 2003 root at semuta.nilpotent.org:/usr/obj/usr/src/sys/semuta i386
>Description:
	devname(3)'s man page is hard to figure out.  Sure, it includes an
	xref to stat(2), but I think a little bit more info can help.
>How-To-Repeat:
	man 3 devname
>Fix:
	I suggest adding an example.  Something like

EXAMPLE

     int fd;
     struct stat buf;
     char *name;

     fd = open("/dev/tun", O_RDWR);
     fstat(fd, &buf)
     printf("devname is /dev/%s\n", devname(buf.st_rdev, S_IFCHR))

     prints out

     devname is /dev/tun5

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



More information about the freebsd-doc mailing list