Skip site navigation (1)Skip section navigation (2)
Date:      22 Jun 2003 23:48:57 -0000
From:      Faried Nawaz <fn@hungry.com>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   docs/53621: devname(3)'s man page needs an example
Message-ID:  <20030622234857.1032.qmail@xpf.nilpotent.org>
Resent-Message-ID: <200306230000.h5N00P9I088101@freefall.freebsd.org>

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

>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@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:



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