public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Sakari Ailus <sakari.ailus@linux.intel.com>
Cc: linux-media@vger.kernel.org,
	Jacopo Mondi <jacopo.mondi@ideasonboard.com>,
	Mehdi Djait <mehdi.djait@linux.intel.com>,
	Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Subject: Re: [raw2rgbpnm PATCH v4 05/11] Add "help" for listing formats and de-Bayering algos, document it
Date: Mon, 16 Mar 2026 16:44:57 +0200	[thread overview]
Message-ID: <20260316144457.GG31604@killaraus.ideasonboard.com> (raw)
In-Reply-To: <20260310084615.1183141-6-sakari.ailus@linux.intel.com>

On Tue, Mar 10, 2026 at 10:46:11AM +0200, Sakari Ailus wrote:
> '?' is a problematic character for shells.
> 
> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
> ---
>  raw2rgbpnm.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/raw2rgbpnm.c b/raw2rgbpnm.c
> index 16ef64e984b9..b0151789b0c1 100644
> --- a/raw2rgbpnm.c
> +++ b/raw2rgbpnm.c
> @@ -865,7 +865,7 @@ int main(int argc, char *argv[])
>  		if (c==-1) break;
>  		switch (c) {
>  		case 'a':
> -			if (optarg[0]=='?') {
> +			if (optarg[0]=='?' || !strcmp(optarg, "help")) {
>  				printf("Available bayer-to-rgb conversion algorithms:\n");
>  				qc_print_algorithms();
>  				exit(0);
> @@ -876,7 +876,7 @@ int main(int argc, char *argv[])
>  			brightness = (int)(atof(optarg) * 256.0 + 0.5);
>  			break;
>  		case 'f':
> -			if (optarg[0]=='?' && optarg[1]==0) {
> +			if ((optarg[0]=='?' && optarg[1]==0) || !strcmp(optarg, "help")) {
>  				unsigned int i,j;
>  				printf("Supported formats:\n");
>  				for (i=0; i<SIZE(v4l2_pix_fmt_str); i++) {
> @@ -904,11 +904,11 @@ int main(int argc, char *argv[])
>  			       "Usage: %s [--algo|-a <algo>] [--brightness|-b <brightness>]\n"
>  			       "       [--format|-f <format>] [--help|-h] [--high-bits|-g] [--size|-s XxY]\n"
>  			       "       [--swap-rb|-w] <inputfile> <outputfile>\n\n"
> -			       "--algo, -a <algo>         Select algorithm, use \"-a ?\" for a list\n"
> +			       "--algo, -a <algo>         Select algorithm, use \"-a help\" for a list\n"
>  			       "--brightness, -b <bright> Set brightness (multiplier) to output image\n"
>  			       "                          (float, default 1.0)\n"
>  			       "--format, -f <format>     Specify input file format format\n"
> -			       "                          (-f ? for list, default UYVY)\n"
> +			       "                          (-f help for list, default UYVY)\n"

While at it, quote "-f help" like done above for -a.

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

>  			       "--help, -h                Show this help\n"
>  			       "--high-bits, -g           Use high bits for Bayer RAW 10 data\n"
>  			       "--size, -s <XxY>          Specify image size\n"

-- 
Regards,

Laurent Pinchart

  reply	other threads:[~2026-03-16 14:45 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-10  8:46 [raw2rgbpnm PATCH v4 00/11] 10-bit packed raw support, other fixes and improvements Sakari Ailus
2026-03-10  8:46 ` [raw2rgbpnm PATCH v4 01/11] Add explicit switch fallthrough notation Sakari Ailus
2026-03-10  8:46 ` [raw2rgbpnm PATCH v4 02/11] Add compiler options to avoid warnings Sakari Ailus
2026-03-16 14:28   ` Laurent Pinchart
2026-03-10  8:46 ` [raw2rgbpnm PATCH v4 03/11] Add 10-bit CSI-2 packed format support Sakari Ailus
2026-03-16 14:38   ` Laurent Pinchart
2026-03-16 19:00     ` Sakari Ailus
2026-03-10  8:46 ` [raw2rgbpnm PATCH v4 04/11] Support long options and improve help text Sakari Ailus
2026-03-16 14:41   ` Laurent Pinchart
2026-03-17  9:49     ` Sakari Ailus
2026-03-17 10:49       ` Laurent Pinchart
2026-03-17 13:17         ` Sakari Ailus
2026-03-10  8:46 ` [raw2rgbpnm PATCH v4 05/11] Add "help" for listing formats and de-Bayering algos, document it Sakari Ailus
2026-03-16 14:44   ` Laurent Pinchart [this message]
2026-03-10  8:46 ` [raw2rgbpnm PATCH v4 06/11] The program has been called raw2rgbpnm, not yuv_to_rgbpnm awhile now Sakari Ailus
2026-03-16 14:46   ` Laurent Pinchart
2026-03-10  8:46 ` [raw2rgbpnm PATCH v4 07/11] Arrange headers alphabetically Sakari Ailus
2026-03-16 14:47   ` Laurent Pinchart
2026-03-10  8:46 ` [raw2rgbpnm PATCH v4 08/11] Add --stride (-S) option for setting stride Sakari Ailus
2026-03-16 14:50   ` Laurent Pinchart
2026-03-10  8:46 ` [raw2rgbpnm PATCH v4 09/11] Improve input validation Sakari Ailus
2026-03-16 14:54   ` Laurent Pinchart

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260316144457.GG31604@killaraus.ideasonboard.com \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=jacopo.mondi@ideasonboard.com \
    --cc=linux-media@vger.kernel.org \
    --cc=mehdi.djait@linux.intel.com \
    --cc=sakari.ailus@linux.intel.com \
    --cc=tomi.valkeinen@ideasonboard.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox