From 243305d3fdcc29ff8d8cf33ae8770700e18cdd0b Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Sat, 4 Dec 2004 11:02:10 +0000 Subject: simplify --- mdk-stage1/pcmcia_/merge_from_pcitable | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'mdk-stage1') 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; } } -- cgit v1.2.1