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: <1446124009-26947-1-git-send-email-christian.gromm@microchip.com>
Date:	Thu, 29 Oct 2015 14:06:49 +0100
From:	Christian Gromm <christian.gromm@...rochip.com>
To:	<joe@...ches.com>
CC:	Christian Gromm <christian.gromm@...rochip.com>,
	Andy Whitcroft <apw@...onical.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	<linux-kernel@...r.kernel.org>
Subject: [PATCH] scripts: checkpatch: remove preceding dot-slash from path name

In case checkpatch is called with a path name that starts with ./ for
the current directory not all issues are being reported since internal
path checks don't succeed. This patch removes the leading './' from
$filename. This is needed to have checkpatch report all issues found
during execution.

Signed-off-by: Christian Gromm <christian.gromm@...rochip.com>
---
 scripts/checkpatch.pl |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index f2a1131..44435fd 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -730,6 +730,9 @@ my $fixlinenr = -1;
 my $vname;
 for my $filename (@ARGV) {
 	my $FILE;
+	if ($filename =~ /^(\.\/)/) {
+		substr($filename, 0, 2) = "";
+	}
 	if ($file) {
 		open($FILE, '-|', "diff -u /dev/null $filename") ||
 			die "$P: $filename: diff failed - $!\n";
-- 
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ