linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] keytable: Add source information in generated keymaps
@ 2019-07-01 16:38 Bastien Nocera
  2019-07-01 16:38 ` [PATCH 2/2] keytable: Remove comments before processing keymaps Bastien Nocera
  2019-07-03 15:33 ` [PATCH 1/2] keytable: Add source information in generated keymaps Sean Young
  0 siblings, 2 replies; 9+ messages in thread
From: Bastien Nocera @ 2019-07-01 16:38 UTC (permalink / raw)
  To: linux-media

Add comments to mention that keymap files are generated, and that
they shouldn't be modified by hand. Also list which tool was used
to generate them and the kernel source filename.

Signed-off-by: Bastien Nocera <hadess@hadess.net>
---
 utils/keytable/gen_keytables.pl | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/utils/keytable/gen_keytables.pl b/utils/keytable/gen_keytables.pl
index 4124e366..3dc74ba6 100755
--- a/utils/keytable/gen_keytables.pl
+++ b/utils/keytable/gen_keytables.pl
@@ -36,10 +36,17 @@ sub flush($$)
 	my $filename = shift;
 	my $legacy = shift;
 	my $defined;
+	my $relative_filename = $filename;
 
 	return if (!$keyname || !$out);
-	print "Creating $dir/$keyname.toml\n";
+	$relative_filename =~ s/^$kernel_dir//;
+	$relative_filename =~ s/^\///;
+	print "Creating $dir/$keyname.toml from $relative_filename\n";
 	open OUT, ">$dir/$keyname.toml";
+	print OUT "# This file is a generated data file, do not modify manually\n";
+	print OUT "#\n";
+	print OUT "# Generated with gen_keytables.pl in v4l-utils\n";
+	print OUT "# using $relative_filename as a source file\n";
 	print OUT "[[protocols]]\n";
 	print OUT "name = \"$keyname\"\n";
 	print OUT "protocol = \"$type\"\n";
-- 
2.21.0


^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2019-07-04 13:22 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-01 16:38 [PATCH 1/2] keytable: Add source information in generated keymaps Bastien Nocera
2019-07-01 16:38 ` [PATCH 2/2] keytable: Remove comments before processing keymaps Bastien Nocera
2019-07-02  9:08   ` Sean Young
2019-07-02  9:29     ` Bastien Nocera
2019-07-02  9:43     ` Bastien Nocera
2019-07-02 11:44       ` Sean Young
2019-07-02 13:20         ` Bastien Nocera
2019-07-03 15:33 ` [PATCH 1/2] keytable: Add source information in generated keymaps Sean Young
2019-07-04 13:22   ` Bastien Nocera

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).