linux-man.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michael Kerrisk <mtk.manpages-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org>
To: Pierre Habouzit <madcoder-zi3NMfd+bKEdnm+yROfE0A@public.gmane.org>
Cc: linux-man-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Ulrich Drepper <drepper-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Subject: Re: [Bug libc/11459] New: ftw doesn't work like documented (may be a documentation bug)
Date: Mon, 24 May 2010 19:41:49 +0200	[thread overview]
Message-ID: <AANLkTim05fJpMXD1owEON-70WwxDUkxIvYIgkn7EfBEf@mail.gmail.com> (raw)
In-Reply-To: <20100406090358.GP11893-FHnHQIk6zPswS4c7l5MyDw@public.gmane.org>

Hello Pierre,

On Tue, Apr 6, 2010 at 11:03 AM, Pierre Habouzit <madcoder-zi3NMfd+bKEdnm+yROfE0A@public.gmane.org> 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-8fiUuRrzOP0dnm+yROfE0A@public.gmane.org
> 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-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2010-05-24 17:41 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20100403201146.28880.qmail@sourceware.org>
     [not found] ` <20100403201146.28880.qmail-9JcytcrH/bA+uJoB2kUjGw@public.gmane.org>
     [not found]   ` <20100331172608.11459.madcoder-8fiUuRrzOP0dnm+yROfE0A@public.gmane.org>
2010-04-06  9:03     ` [Bug libc/11459] New: ftw doesn't work like documented (may be a documentation bug) Pierre Habouzit
     [not found]       ` <20100406090358.GP11893-FHnHQIk6zPswS4c7l5MyDw@public.gmane.org>
2010-05-24 17:41         ` Michael Kerrisk [this message]
     [not found]           ` <AANLkTim05fJpMXD1owEON-70WwxDUkxIvYIgkn7EfBEf-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-06-02 21:42             ` Pierre Habouzit
     [not found]               ` <20100602214257.GB21506-zi3NMfd+bKEdnm+yROfE0A@public.gmane.org>
2010-06-03  7:18                 ` Michael Kerrisk
     [not found]                   ` <AANLkTinhGzNB_dabQcan3c1nQuGwkaTIBAVZuRO2dJty-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-06-09 10:46                     ` Pierre Habouzit
     [not found]                       ` <20100609104629.GA2340-zi3NMfd+bKEdnm+yROfE0A@public.gmane.org>
2010-06-10  5:04                         ` Michael Kerrisk
     [not found]                           ` <AANLkTikWG4U2wWS6ccM98Mg32WNrVCu5QCmz46hQ7lCC-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-06-24 20:12                             ` Pierre Habouzit
     [not found]                               ` <20100624201216.GB5357-zi3NMfd+bKEdnm+yROfE0A@public.gmane.org>
2010-06-25  4:53                                 ` Michael Kerrisk

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=AANLkTim05fJpMXD1owEON-70WwxDUkxIvYIgkn7EfBEf@mail.gmail.com \
    --to=mtk.manpages-gm/ye1e23mwn+bqq9rbeug@public.gmane.org \
    --cc=drepper-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=linux-man-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=madcoder-zi3NMfd+bKEdnm+yROfE0A@public.gmane.org \
    --cc=mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).