Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 12 Aug 2000 22:57:19 -0400
From:      Harlan Stenn <Harlan.Stenn@pfcs.com>
To:        Mike Harding <mvh@ix.netcom.com>
Cc:        trond@ramstind.gtf.ol.no, freebsd-stable@FreeBSD.ORG
Subject:   Re: Is it OK to use IRQ 1 in rand_irqs in /etc/rc.conf? 
Message-ID:  <10350.966135439@pcnbs.pfcs.com>
In-Reply-To: Mike Harding's (mvh@ix.netcom.com) message dated Sat, 12 Aug 2000 18:50:46.  <20000813015046.04355E7264@netcom1.netcom.com> 

next in thread | previous in thread | raw e-mail | index | archive | help
I wrote this back in '96.  It might need some updating.

#! /usr/bin/perl
# $Id$
# Author: Harlan Stenn <harlan@pfcs.com>

$debug = 0;
$list = "";
open(DMESG, "dmesg |") || die "Can't read from dmesg: $!";
while(<DMESG>)
{
    chop;
    if (/^([a-z]+).* irq (\d+)/) {
	$_ = $dev = $1;
	$irq = $2;
	print "Device $dev is on IRQ $irq\n" if $debug;
	# Good: Network cards, intelligent hard disk controllers, sound devices
	# Bad: COM ports, IDE disk/cdrom, system clock
	if (/^(aha|ahb|ahc|aic|bt|nca|ncr|sea|uha|wds)$/)
	{
	    $list .= "-s $irq ";
	}
	elsif (/^(cx|de|ed|el|ep|fe|fea|fpa|fxp|ie|ix|le|lnc|vx|ze|zp)$/)
	{
	    $list .= "-s $irq ";
	}
	elsif (/^(gus|gusxvi|mpu|mss|opl|pas|pca|sb|sbmidi|sbxvi|snd|uart)$/)
	{
	    $list .= "-s $irq ";
	}
    }
}
close(DMESG);
($list = $list) =~ s/ $//;
print $list."\n";


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?10350.966135439>