Date: Tue, 03 Oct 2000 01:02:09 -0700 From: Lee Ann Goldstein <lgoldste@leeann.snedmail.com> To: Stijn Hoop <stijn@win.tue.nl> Cc: stable@FreeBSD.org, lgoldste@leeann.snedmail.com Subject: Re: A new file for the base system? Message-ID: <200010030802.BAA16969@leeann.snedmail.com> In-Reply-To: Your message of Tue, 03 Oct 2000 09:41:26 %2B0200. <20001003094126.B91234@pcwin002.win.tue.nl>
next in thread | previous in thread | raw e-mail | index | archive | help
--Your message was: (from Stijn Hoop)
> Hi,
>
> I've tried out your script on my
>
> FreeBSD 4.1.1-STABLE #0: Wed Sep 27 13:37:31 CEST 2000
>
> system, and I like it! I noticed one small error however: my integrated
> graphics adapter isn't printed in the same way as your examples.
> This is my dmesg:
[snipped]
> And this is the output of ./find_irq.sh:
>
> -----------------------------------------------------------------------------
> pci1 <ATI Mach64-GB graphics accelerator> at 0.0 irq 9
> atkbd0 irq 1
> pcm0 irq 5
> fdc0 irq 6
> uhci0 irq 11 pci0.7.2
> xl0 irq 11 pci0.7.0
> psm0 irq 12
> ata0 irq 14
> ata1 irq 15
> -----------------------------------------------------------------------------
Hrrm. I get:
lgoldste@leeann 479% cat irqpci.txt | ./find_irq.awk | sort -n +2 -3
atkbd0 irq 1
pcm0 irq 5
fdc0 irq 6
pci1 irq 9 pci1.0.0 <ATI Mach64-GB graphics accelerator>
uhci0 irq 11 pci0.7.2
xl0 irq 11 pci0.7.0
psm0 irq 12
ata0 irq 14
ata1 irq 15
Might be a typo somewhere (which is why I cc:ed this to the list),
so here's the awk script again:
(because of the tabs, linewraps, etc., I recommend saving this whole
message to a file and then editing all but the awk script away :)
find_irq.awk
------------
#!/usr/bin/awk -f
! /irq\>/ {next}
/at device/ && /on pci/ {irqinfo = gensub(/(^[a-z0-9]+[: ]).*(irq [0-9]+).*([0-9]+\.[0-9]+).*(pci[0-9]+)/, "\\1 \\2 \\4.\\3", 1)
sub(/:/, "", irqinfo)
sub(/ [0-9] /, " &", irqinfo)
print irqinfo
next
}
/on pci/ {irqinfo = gensub(/(^[a-z0-9]+[: ]).*(irq [0-9]+).*(pci[0-9]+\.[0-9]+\.[0-9]+)/, "\\1 \\2 \\3", 1)
sub(/:/, "", irqinfo)
sub(/ [0-9] /, " &", irqinfo)
print irqinfo
next
}
/^pci[0-9]+/ {irqinfo = gensub(/(^[a-z0-9]+[: ]).*(<[[:print:]]+>).*([0-9]+\.[0-9]+) (irq [0-9]+$)/,"\\1 \\4 \\1.\\3 \\2", 1)
gsub(/:/, "", irqinfo)
sub(/ [0-9] /, " &", irqinfo)
print irqinfo
next
}
{irqinfo = gensub(/(^[a-z0-9]+[: ]).*(irq [0-9]+).*/, "\\1 \\2", 1)
sub(/:/, "", irqinfo)
sub(/ [0-9]$/, " &", irqinfo)
print irqinfo
next
}
-----end awk script-----
> Thanks for the script!
You're welcome :)
Lee Ann
--
Lee Ann Goldstein
Caffeine is *not* a substitute for sleep.
lgoldste@leeann.snedmail.com lgoldste@lafn.org leeann@rand.org
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-stable" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200010030802.BAA16969>
