diff options
Diffstat (limited to 'v4l/scripts')
-rwxr-xr-x | v4l/scripts/cardlist | 3 | ||||
-rwxr-xr-x | v4l/scripts/prep_commit_msg.pl | 6 | ||||
-rwxr-xr-x | v4l/scripts/usbvision.pl | 37 |
3 files changed, 46 insertions, 0 deletions
diff --git a/v4l/scripts/cardlist b/v4l/scripts/cardlist index 901d3fb18..91c32c483 100755 --- a/v4l/scripts/cardlist +++ b/v4l/scripts/cardlist @@ -15,3 +15,6 @@ scripts/tuner.pl ../linux/include/media/tuner.h ../linux/drivers/media/video/tun scripts/saa7134.pl ../linux/drivers/media/video/saa7134/saa7134.h ../linux/drivers/media/video/saa7134/saa7134-cards.c \ | perl -ne 's/[ \t]+$//; print' > ../linux/Documentation/video4linux/CARDLIST.saa7134 +scripts/usbvision.pl ../linux/drivers/media/video/usbvision/usbvision-cards.c \ + | perl -ne 's/[ \t]+$//; print' > ../linux/Documentation/video4linux/CARDLIST.usbvision + diff --git a/v4l/scripts/prep_commit_msg.pl b/v4l/scripts/prep_commit_msg.pl index 819009c57..cb0740a5d 100755 --- a/v4l/scripts/prep_commit_msg.pl +++ b/v4l/scripts/prep_commit_msg.pl @@ -62,12 +62,18 @@ if ($diff eq 'qdiff') { open IN, "hg qheader |"; my @header = <IN>; close IN; + if ($#header > 0) { # Use existing header print @header; exit; } # No header, use pre-made log message below + + # Hg will strip lines that start with "From: " from mq patch headers! + # In order to stop it, we insert this extra From line at the top, + # Hg will strip it and then leave the real from line alone. + print "From: $user\n\n"; } print <<"EOF"; # diff --git a/v4l/scripts/usbvision.pl b/v4l/scripts/usbvision.pl new file mode 100755 index 000000000..5aae512c5 --- /dev/null +++ b/v4l/scripts/usbvision.pl @@ -0,0 +1,37 @@ +#!/usr/bin/perl -w +use strict; + +my $new_entry = -1; +my $nr = 0; +my ($id,$subvendor,$subdevice); +my %data; + +my $cap=0; + +while (<>) { + if (m/usbvision_device_data/) { + $cap=1; + next; + } + if (m/usbvision_table/) { + $cap=0; + next; + } + if ($cap==0) { + next; + } + + if (m/\{0x([0-9a-z]...)\s*\,\s*0x([0-9a-z]...).*\"(.*)\"/) { + $data{$nr}->{nr} = $nr; + $data{$nr}->{name} = $3; + push @{$data{$nr}->{subid}}, "$1:$2"; + $nr++; + } +} + +foreach my $item (sort { $data{$a}->{nr} <=> $data{$b}->{nr} } keys %data) { + printf("%3d -> %-56s", $data{$item}->{nr}, $data{$item}->{name}); + printf(" [%s]",join(",",@{$data{$item}->{subid}})) + if defined($data{$item}->{subid}); + print "\n"; +} |