[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <68e897fec0e6258b2a964908af650d8608189454.camel@perches.com>
Date: Fri, 14 May 2021 21:26:05 -0700
From: Joe Perches <joe@...ches.com>
To: Tiezhu Yang <yangtiezhu@...ngson.cn>,
Andy Whitcroft <apw@...onical.com>,
Dwaipayan Ray <dwaipayanray1@...il.com>,
Lukas Bulwahn <lukas.bulwahn@...il.com>
Cc: linux-kernel@...r.kernel.org
Subject: Re: [PATCH] checkpatch: Print some info if no filenames are given
On Sat, 2021-05-15 at 12:15 +0800, Tiezhu Yang wrote:
> After commit 45107ff6d526 ("checkpatch: if no filenames then read stdin"),
> if no filenames are given, it will read patch from stdin rather than exit
> directly, it is better to print some info about what to do next, otherwise
> it is a bit confusing whether the script hangs.
I think this is unnecessary.
It's like trying to make cat without command line arguments emit something.
> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
[]
> @@ -361,6 +361,8 @@ if ($^V && $^V lt $minimum_perl_version) {
>
>
> #if no filenames are given, push '-' to read patch from stdin
> if ($#ARGV < 0) {
> + print "$P: missing patchfile or -f file\n";
> + print "Use --help if necessary or read patch from stdin\n";
> push(@ARGV, '-');
> }
>
>
Powered by blists - more mailing lists