mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2025-01-11 17:04:19 +01:00
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.
This commit is contained in:
parent
86e7756c4f
commit
c46d792d58
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=61755
@ -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") {
|
||||
|
@ -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") {
|
||||
|
@ -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;
|
||||
@ -71,6 +72,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") {
|
||||
|
Loading…
Reference in New Issue
Block a user