yavta: Fix usage documentation for --field option
diff mbox series

Message ID 20191209212222.9857-1-niklas.soderlund@ragnatech.se
State New
Delegated to: Kieran Bingham
Headers show
Series
  • yavta: Fix usage documentation for --field option
Related show

Commit Message

Niklas Dec. 9, 2019, 9:22 p.m. UTC
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@ragnatech.se>
---
 yavta.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Geert Uytterhoeven Dec. 10, 2019, 8:18 a.m. UTC | #1
Hi Niklas,

On Mon, Dec 9, 2019 at 10:23 PM Niklas Söderlund
<niklas.soderlund@ragnatech.se> 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@ragnatech.se>
> ---
>  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 ..."?

>         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");

Gr{oetje,eeting}s,

                        Geert
Laurent Pinchart Dec. 12, 2019, 11:45 p.m. UTC | #2
Hi Niklas,

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@ragnatech.se>
> > ---
> >  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.

> >         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");
Niklas Dec. 13, 2019, 1:02 a.m. UTC | #3
Hi Laurent,

Thanks for your feedback.

On 2019-12-13 01:45:35 +0200, Laurent Pinchart wrote:
> Hi Niklas,
> 
> 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@ragnatech.se>
> > > ---
> > >  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'.

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

Patch
diff mbox series

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");
 	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");