Re: [Bug libc/11459] New: ftw doesn't work like documented (may be a documentation bug)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello Pierre,

On Tue, Apr 6, 2010 at 11:03 AM, Pierre Habouzit <madcoder@xxxxxxxxxx> wrote:
> See below a bug reported against the glibc.  Since the glibc maintainer
> dodged that one, I assume the bug indeed is in the documentation of
> ftw(3). My manpages are the 3.24-1 Debian package.

Yes. The man page is clearly incorrect. Thanks for reporting this.

> IMHO the patch is:
>
>  -fpath is the pathname of the entry relative to dirpath.
>  +fpath is the pathname of the entry relative to the current working directory.
>
> POSIX is very vague about what "fpath" should be btw.

(Agreed. It could be more precise.)

I believe the correct text should be this:

       fpath   is  the  pathname  of  the  entry,  and  is
       expressed either as  a  pathname  relative  to  the
       calling  process's current working directory at the
       time of the call to ftw(), if dirpath was expressed
       as a relative pathname, or as an absolute pathname,
       if dirpath was expressed as an  absolute  pathname.

I have updated the man page accordingly, but would welcome
review/checking of this text.

Cheers,

Michael



> On Wed, Mar 31, 2010 at 05:26:09PM -0000, madcoder at debian dot org wrote:
>> The man page states:
>>
>>        int ftw(const char *dirpath,
>>                int (*fn) (const char *fpath, const struct stat *sb,
>>                           int typeflag),
>>                int nopenfd);
>>
>>        [...]
>>
>>        fpath is the  pathname  of  the  entry  relative to dirpath.
>>
>> Though it appears that it is the pathname of the entry relative to the current
>> working directory.
>>
>> FWIW this may be a documentation bug since the similar fts interface clearly
>> states that the similar fts_accpath is relative to the current working
>> directory.
>>
>> --
>>            Summary: ftw doesn't work like documented (may be a documentation
>>                     bug)
>>            Product: glibc
>>            Version: unspecified
>>             Status: NEW
>>           Severity: normal
>>           Priority: P2
>>          Component: libc
>>         AssignedTo: drepper at redhat dot com
>>         ReportedBy: madcoder at debian dot org
>>                 CC: glibc-bugs at sources dot redhat dot com
>>
>>
>> http://sourceware.org/bugzilla/show_bug.cgi?id=11459
>>
>> ------- You are receiving this mail because: -------
>> You reported the bug, or are watching the reporter.
>
> On Sat, Apr 03, 2010 at 08:11:46PM -0000, drepper at redhat dot com wrote:
>>
>> ------- Additional Comments From drepper at redhat dot com  2010-04-03 20:11 -------
>> The man pages do not come with glibc and are in no way authoritative.  You have
>> to report this elsewhere.
>>
>> --
>>            What    |Removed                     |Added
>> ----------------------------------------------------------------------------
>>              Status|NEW                         |RESOLVED
>>          Resolution|                            |INVALID
>>
>>
>> http://sourceware.org/bugzilla/show_bug.cgi?id=11459
>>
>> ------- You are receiving this mail because: -------
>> You reported the bug, or are watching the reporter.
>
>
> --
> ·O·  Pierre Habouzit
> ··O                                                madcoder@xxxxxxxxxx
> OOO                                                http://www.madism.org
>



-- 
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Author of "The Linux Programming Interface" http://blog.man7.org/
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Kernel Documentation]     [Netdev]     [Linux Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux