diff options
Diffstat (limited to 'v4l/scripts')
-rwxr-xr-x | v4l/scripts/do_merge.pl | 6 | ||||
-rwxr-xr-x | v4l/scripts/make_config_compat.pl | 67 |
2 files changed, 67 insertions, 6 deletions
diff --git a/v4l/scripts/do_merge.pl b/v4l/scripts/do_merge.pl index 1a6bbb1ee..6eccd77e7 100755 --- a/v4l/scripts/do_merge.pl +++ b/v4l/scripts/do_merge.pl @@ -64,7 +64,7 @@ sub check_status() sub rollback() { - print "Rolling back hg pull $merge_tree\n"; + print "*** ERROR *** Rolling back hg pull $merge_tree\n"; system("hg rollback"); system("hg update -C"); exit -1; @@ -96,7 +96,7 @@ if ($user eq "") { # Last try to come up with something if ($user eq "") { - print "User not known. Can't procceed\n"; + print "*** ERROR *** User not known. Can't procceed\n"; exit -1; } @@ -158,7 +158,7 @@ if (!ret) { $ret = system ('make mismatch|egrep -v "^\s*CC"|egrep -v "^\s*LD"'); } if ($ret) { - print "Build failed. Can't procceed.\n"; + print "*** ERROR *** Build failed. Can't procceed.\n"; # To avoid the risk of doing something really bad, let's ask the user to run hg strip print "Your tree is dirty. Since hg has only one rollback level, you'll need to use, instead:"; diff --git a/v4l/scripts/make_config_compat.pl b/v4l/scripts/make_config_compat.pl index 3c2b623ca..1f5b8bae6 100755 --- a/v4l/scripts/make_config_compat.pl +++ b/v4l/scripts/make_config_compat.pl @@ -280,9 +280,7 @@ sub check_snd_card_create() sub check_poll_schedule() { - - - my @files = ( "$kdir//include/linux/poll.h" ); + my @files = ( "$kdir/include/linux/poll.h" ); foreach my $file ( @files ) { open IN, "<$file" or die "File not found: $file"; @@ -300,6 +298,66 @@ sub check_poll_schedule() $out.= "\n#define NEED_POLL_SCHEDULE 1\n"; } +sub check_snd_BUG_ON() +{ + my @files = ( "$kdir/include/sound/core.h" ); + + foreach my $file ( @files ) { + open IN, "<$file" or die "File not found: $file"; + while (<IN>) { + if (m/snd_BUG_ON/) { + close IN; + # definition found. No need for compat + return; + } + } + close IN; + } + + # definition not found. This means that we need compat + $out.= "\n#define NEED_SND_BUG_ON 1\n"; +} + +sub check_bitops() +{ + my @files = ( "$kdir/include/linux/bitops.h" ); + + foreach my $file ( @files ) { + open IN, "<$file" or next; + while (<IN>) { + if (m/#define\s+BIT\(/) { + close IN; + # definition found. No need for compat + return; + } + } + close IN; + } + + # definition not found. This means that we need compat + $out.= "\n#define NEED_BITOPS 1\n"; +} + +sub check_delayed_work() +{ + my @files = ( "$kdir//include/linux/workqueue.h" ); + + foreach my $file ( @files ) { + open IN, "<$file" or die "File not found: $file"; + while (<IN>) { + if (m/struct\s+delayed_work/) { + close IN; + # definition found. No need for compat + return; + } + } + close IN; + } + + # definition not found. This means that we need compat + $out.= "\n#define NEED_DELAYED_WORK 1\n"; +} + sub check_other_dependencies() { check_spin_lock(); @@ -317,6 +375,9 @@ sub check_other_dependencies() check_pci_ioremap_bar(); check_snd_card_create(); check_poll_schedule(); + check_snd_BUG_ON(); + check_bitops(); + check_delayed_work(); } # Do the basic rules |