linux-lvm.redhat.com archive mirror
 help / color / mirror / Atom feed
* [linux-lvm] pvscan: bugs in manpage and implementation
@ 2017-09-18  7:52 Tom Hale
  2017-09-18 11:49 ` Zdenek Kabelac
  2017-09-18 15:56 ` David Teigland
  0 siblings, 2 replies; 3+ messages in thread
From: Tom Hale @ 2017-09-18  7:52 UTC (permalink / raw)
  To: linux-lvm

Hi,

MAN PAGE

In http://man7.org/linux/man-pages/man8/pvscan.8.html I see the
following issues:

* The string "-a--activate" appears several times. Should be:
  "-a|--activate"

* "-a|--activate y|n|ay" is mentioned, but later on:
"Only ay is applicable." Please remove "y|n|".

PROGRAM

# pvscan --activate ay
  Command does not accept option: --activate ay.

The message is confusing. It would be better to say "--activate requires
--cache"

In fact, why not drop the "ay" argument all together and just allow
"--cache --activate"?

Cheers,
Tom

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [linux-lvm] pvscan: bugs in manpage and implementation
  2017-09-18  7:52 [linux-lvm] pvscan: bugs in manpage and implementation Tom Hale
@ 2017-09-18 11:49 ` Zdenek Kabelac
  2017-09-18 15:56 ` David Teigland
  1 sibling, 0 replies; 3+ messages in thread
From: Zdenek Kabelac @ 2017-09-18 11:49 UTC (permalink / raw)
  To: LVM general discussion and development, Tom Hale

Dne 18.9.2017 v 09:52 Tom Hale napsal(a):
> Hi,
> 
> MAN PAGE
> 
> In http://man7.org/linux/man-pages/man8/pvscan.8.html I see the
> following issues:
> 
> * The string "-a--activate" appears several times. Should be:
>    "-a|--activate"
> 
> * "-a|--activate y|n|ay" is mentioned, but later on:
> "Only ay is applicable." Please remove "y|n|".
> 
> PROGRAM
> 
> # pvscan --activate ay
>    Command does not accept option: --activate ay.
> 
> The message is confusing. It would be better to say "--activate requires
> --cache"
> 
> In fact, why not drop the "ay" argument all together and just allow
> "--cache --activate"?

Hi

In general - we use internal logic for parsing options and its parameters and 
in this case the options 'takes' more parameters then 'pvscan' can accept.

We could possibly add 'extra' special  option  e.i. :
--pvscanautoactivation

but we've considered at given time it's not worth since normally no user is 
ever supposed to use it in regular user space (since noone likes to see more 
and more individal options doing nearly the same thing)

This option is mostly targeted for execution inside  udev rules  - and since 
there was some 'evolution' how to make this working - it's now not really 
worth to make it more complicated - since we would have to keep old option 
present anyway for backward compatibility.

Regards

Zdenek

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [linux-lvm] pvscan: bugs in manpage and implementation
  2017-09-18  7:52 [linux-lvm] pvscan: bugs in manpage and implementation Tom Hale
  2017-09-18 11:49 ` Zdenek Kabelac
@ 2017-09-18 15:56 ` David Teigland
  1 sibling, 0 replies; 3+ messages in thread
From: David Teigland @ 2017-09-18 15:56 UTC (permalink / raw)
  To: Tom Hale; +Cc: linux-lvm

On Mon, Sep 18, 2017 at 02:52:04PM +0700, Tom Hale wrote:
> Hi,
> 
> MAN PAGE
> 
> In http://man7.org/linux/man-pages/man8/pvscan.8.html I see the
> following issues:
> 
> * The string "-a--activate" appears several times. Should be:
>   "-a|--activate"

Yes, that's odd, the | exists in the source, but isn't being printed.
I'll just change to --activate for now.

> * "-a|--activate y|n|ay" is mentioned, but later on:
> "Only ay is applicable." Please remove "y|n|".

Unfortunately --activate is one of those options that was given different
acceptable values depending on the command, and we haven't added a special
case to the code that generates man pages to display it differently.

> PROGRAM
> 
> # pvscan --activate ay
>   Command does not accept option: --activate ay.
> 
> The message is confusing. It would be better to say "--activate requires
> --cache"

Yes, this is a limitation in the new code that matches what you have typed
to a specific command.  All possible commands are now defined here:
https://sourceware.org/git/?p=lvm2.git;a=blob_plain;f=tools/command-lines.in;hb=HEAD

It matches 'pvscan --activate' to the 'pvscan' command (which doesn't
accept -a, thus the error), rather than to the 'pvscan --cache' command
(which does accept -a).

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-09-18 15:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-18  7:52 [linux-lvm] pvscan: bugs in manpage and implementation Tom Hale
2017-09-18 11:49 ` Zdenek Kabelac
2017-09-18 15:56 ` David Teigland

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).