lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1621052131-16309-1-git-send-email-yangtiezhu@loongson.cn>
Date:   Sat, 15 May 2021 12:15:31 +0800
From:   Tiezhu Yang <yangtiezhu@...ngson.cn>
To:     Andy Whitcroft <apw@...onical.com>, Joe Perches <joe@...ches.com>,
        Dwaipayan Ray <dwaipayanray1@...il.com>,
        Lukas Bulwahn <lukas.bulwahn@...il.com>
Cc:     linux-kernel@...r.kernel.org
Subject: [PATCH] checkpatch: Print some info if no filenames are given

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.

Signed-off-by: Tiezhu Yang <yangtiezhu@...ngson.cn>
---
 scripts/checkpatch.pl | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 23697a6..d84d4fb 100755
--- 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, '-');
 }
 
-- 
2.1.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ