Re: [v4l-utils] [PATCH v9 1/7] utils: Allow choosing v4l2-tracer-gen.pl output

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

 



Hi Hans,

On Tue, Feb 21, 2023 at 04:00:34PM +0100, Hans Verkuil wrote:
> On 2/21/23 15:31, Laurent Pinchart wrote:
> > From: Sakari Ailus <sakari.ailus@xxxxxxxxxxxxxxx>
> > 
> > In v4l2-tracer-gen.pl, add support for setting the output directory for
> > the generated files and choosing which ones to generate (common, trace or
> > retrace). The default is to generate them all in the current directory,
> > i.e. what the script used to do.
> > 
> > Signed-off-by: Sakari Ailus <sakari.ailus@xxxxxxxxxxxxxxx>
> > [Append a '/' automatically between $outdir and $fname]
> > Tested-by: Laurent Pinchart <laurent.pinchart@xxxxxxxxxxxxxxxx>
> > Signed-off-by: Laurent Pinchart <laurent.pinchart@xxxxxxxxxxxxxxxx>
> > Tested-by: Niklas Söderlund <niklas.soderlund@xxxxxxxxxxxx>
> > ---
> >  utils/v4l2-tracer/v4l2-tracer-gen.pl | 36 ++++++++++++++++++++++++----
> >  1 file changed, 31 insertions(+), 5 deletions(-)
> > 
> > diff --git a/utils/v4l2-tracer/v4l2-tracer-gen.pl b/utils/v4l2-tracer/v4l2-tracer-gen.pl
> > index fe648182ac34..f7454e7f0bab 100755
> > --- a/utils/v4l2-tracer/v4l2-tracer-gen.pl
> > +++ b/utils/v4l2-tracer/v4l2-tracer-gen.pl
> > @@ -2,6 +2,16 @@
> >  # SPDX-License-Identifier: GPL-2.0-only */
> >  # Copyright 2022 Collabora Ltd.
> >  
> > +my $outdir = ".";
> > +my %outtype = ( "common" => 1, "trace" => 1, "retrace" => 1 );
> > +
> > +while ($ARGV[0] =~ /^-/) {
> > +	my $arg = shift @ARGV;
> > +
> > +	$outdir = shift @ARGV if $arg eq "-o";
> > +	%outtype = (shift @ARGV => 1) if $arg eq '-t';
> > +}
> 
> Can you add a help message as well? At minimum as a comment, even better
> by adding a -h option.
> 
> It's currently only documented in the commit log, which nobody will read :-)

I'll add a patch for that, Laurent can then squash it into this one.

-- 
Regards,

Sakari Ailus



[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux