From 61ad2eac9353a287b30eeb88e3267a7180ce7b8c Mon Sep 17 00:00:00 2001 From: peter Date: Sat, 17 Jun 2000 20:10:55 +0000 Subject: Deal with quoted arguments. This hack parser uses whitespace to delimit fields, not lex/yacc grammar so it is not an exact match but should be close enough for most cases. Deal with 'port?', 'irq?' style specifications. These are parsed as seperate values in lex/yacc in config(8) but tripped up this helper tool. --- sys/alpha/conf/gethints.pl | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'sys/alpha') diff --git a/sys/alpha/conf/gethints.pl b/sys/alpha/conf/gethints.pl index 80586e3..7496399 100644 --- a/sys/alpha/conf/gethints.pl +++ b/sys/alpha/conf/gethints.pl @@ -12,6 +12,7 @@ while (<>) { chop; s/#.*//; next unless /^device/; + s/"//g; ($dev, $nameunit, $at, $where, @rest) = split; next unless $at eq "at" && $where ne ""; $name = $nameunit; @@ -78,6 +79,10 @@ while (<>) { } next; } + if ($key eq "port?" || $key eq "drq?" || $key eq "irq?" || + $key eq "iomem?" || $key eq "iosiz?") { + next; + } if ($key eq "irq" || $key eq "drq" || $key eq "drive" || $key eq "iomem" || $key eq "iosiz" || $key eq "flags"|| $key eq "bus" || $key eq "target" || $key eq "unit") { -- cgit v1.1