Re: [PATCH] yavta: Fix usage documentation for --field option

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

 



Hi Niklas,

On Fri, Dec 13, 2019 at 02:02:07AM +0100, Niklas Söderlund wrote:
> On 2019-12-13 01:45:35 +0200, Laurent Pinchart wrote:
> > On Tue, Dec 10, 2019 at 09:18:37AM +0100, Geert Uytterhoeven wrote:
> > > On Mon, Dec 9, 2019 at 10:23 PM Niklas Söderlund wrote:
> > > > The --field option takes an argument selecting the field order. Update
> > > > the usage text to reflect this.
> > > >
> > > > Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@xxxxxxxxxxxx>
> > > > ---
> > > >  yavta.c | 2 +-
> > > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > > >
> > > > diff --git a/yavta.c b/yavta.c
> > > > index f83e143c051396c4..196345c323c662d3 100644
> > > > --- a/yavta.c
> > > > +++ b/yavta.c
> > > > @@ -2286,7 +2286,7 @@ static void usage(const char *argv0)
> > > >         printf("    --enum-formats              Enumerate formats\n");
> > > >         printf("    --enum-inputs               Enumerate inputs\n");
> > > >         printf("    --fd                        Use a numeric file descriptor insted of a device\n");
> > > > -       printf("    --field                     Interlaced format field order\n");
> > > > +       printf("    --field field               Set the format field order\n");
> > > 
> > > "Valid values for field are ..."?
> > 
> > Please let me know if you want to send a v2. yavta is a low-level tool
> > so I don't think this is critical, users are expected to know that the
> > value comes from the V4L2 API, but stating hit wouldn't hurt either.
> 
> I'm open to send a v2 based out your feedback.
> 
> I was prompted to write this patch when writing a test for vin-tests for 
> TB/BT and I had to look in the yavta sources to find which strings yavta 
> used for the different field options and misinterpreting the help for 
> --field to only concern interlaced field formats.
> 
> As you state yavta is a low-level tool so I'm fine with the patch as is 
> just to demonstrate that the --field argument takes a value and is not 
> exclusive to interlaced formats or extend it similar to '--format help'.

Listing the supported values in the help text would be helpful I think.
As the number of possible values for the field is limited, I don't think
we need '--field help'. "Valid values for field are TB, BT, ..." should
be short enough.

> > > >         printf("    --log-status                Log device status\n");
> > > >         printf("    --no-query                  Don't query capabilities on open\n");
> > > >         printf("    --offset                    User pointer buffer offset from page start\n");

-- 
Regards,

Laurent Pinchart



[Index of Archives]     [Linux Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux