summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2004-12-04 11:02:10 +0000
committerPascal Rigaux <pixel@mandriva.com>2004-12-04 11:02:10 +0000
commit243305d3fdcc29ff8d8cf33ae8770700e18cdd0b (patch)
treee8f4c665e141aaea7b0fc0f64a619669b0bc8c0e
parentdde477e686bf313473dff962fd6d6581f6c61eba (diff)
downloaddrakx-243305d3fdcc29ff8d8cf33ae8770700e18cdd0b.tar
drakx-243305d3fdcc29ff8d8cf33ae8770700e18cdd0b.tar.gz
drakx-243305d3fdcc29ff8d8cf33ae8770700e18cdd0b.tar.bz2
drakx-243305d3fdcc29ff8d8cf33ae8770700e18cdd0b.tar.xz
drakx-243305d3fdcc29ff8d8cf33ae8770700e18cdd0b.zip
simplify
-rwxr-xr-xmdk-stage1/pcmcia_/merge_from_pcitable9
1 files changed, 2 insertions, 7 deletions
diff --git a/mdk-stage1/pcmcia_/merge_from_pcitable b/mdk-stage1/pcmcia_/merge_from_pcitable
index 27cda239b..b48fb6e2a 100755
--- a/mdk-stage1/pcmcia_/merge_from_pcitable
+++ b/mdk-stage1/pcmcia_/merge_from_pcitable
@@ -5,15 +5,10 @@
use MDK::Common;
-my @probelines = cat_('probe.c');
-my $status = 0;
-foreach (@probelines) {
- if ($status == 0) {
- /^pci_id_t pci_id\[\] = {/ and $status = 1;
- } elsif ($status == 1) {
+foreach (cat_('probe.c')) {
+ if (/^pci_id_t pci_id\[\] = {/ ... /^};/) {
/^\s*{\s*0x([\da-f]+),\s*0x([\da-f]+),\s*"([^"]*)",\s*"([^"]*)"\s*}/
and push @probes, { vendor => $1, device => $2, tag => $3, name => $4, vd => "$1$2" };
- /^};/ and last;
}
}