Re: stat(1) manpage displays non-existant (?) option

Rares Aioanei <[email protected]> Sun, 3 Jan 2016 22:31:04 +0200
Newsgroups gmane.os.netbsd.bugs,gmane.os.netbsd.documentation
Message-ID <CABasXZWBD1FcfzYJ17ykMzLQGw46qo0pQQaheSTzTVFjT7O3Rg@mail.gmail.com>
Thanks Dieter, yes, I took a look at the code where it's clear that -v is
available only if stat is called as readlink. However, the manpage not only
isn't as clear, but doesn't specify clearly _how_ to invoke stat as
readlink. Matter of perception, perhaps.

On Sun, Jan 3, 2016 at 9:37 PM, dieter roelants <[email protected]>
wrote:

> On Sun, 3 Jan 2016 18:34:36 +0200
> Rares Aioanei <[email protected]> wrote:
>
> > Environment is NetBSD 7.0/i386. The manpage displays -v as an option :
> >
> > "-v            Turn off quiet mode."
> >
> > However, that option is not recognized by stat(1) :
> >
> > $ stat -v
> > stat: unknown option -- v
> >
> > However (again), the stat(1) code seems to indicate otherwise :
> >
> > while ((ch = getopt(argc, argv, options)) != -1)
>
> If you look at the synopsis in the man page, you'll see that it's only
> an option when stat is called as readlink. It makes it print a warning
> for nonexisting files, which stat does by default unless called with
> -q, which turns on quiet mode. (I guess the man page could be more
> verbose about this, and also describe the option as turning on
> verbosity.)
>
> kind regards
> dieter
>



-- 
Rares Aioanei