I call it 'ink'.
I see these devices in dmesg, but they aren't in GENERIC.
$ ink F GENERIC
aoa0 at macobio0 offset 0x1: irq 30,1,2
iic0 at ki2c0
iic1 at pi2c0
iic2 at ki2c1
maxtmp0 at iic1 addr 0xc8: max6642
cardslot? Do I have that?
$ ink dev cardslot
$
no.
$ ink o pci .hci
What all .hci at pci do I have?
ohci0 at pci1 dev 24 function 0 "Apple Intrepid USB" rev 0x00: irq
0, version 1.0, legacy support
ohci1 at pci1 dev 25 function 0 "Apple Intrepid USB" rev 0x00: irq
0, version 1.0, legacy support
ohci2 at pci1 dev 26 function 0 "Apple Intrepid USB" rev 0x00: irq
29, version 1.0, legacy support
ohci3 at pci1 dev 27 function 0 "NEC USB" rev 0x43: irq 63, version 1.0
ohci4 at pci1 dev 27 function 1 "NEC USB" rev 0x43: irq 63, version 1.0
ehci0 at pci1 dev 27 function 2 "NEC USB" rev 0x04: irq 63
So, what isn't being used?
$ ink f GENERIC
...
file begins
#! /usr/bin/env perl
sub usage { die "usage: $0 [dev|o] [ ...]]\n"
. "usage: $0 f # find !dmesg devices\n"
. "usage: $0 F # find !config devices\n"}
usage unless @ARGV >= 2;
usage unless $ARGV[0] =~ /^(dev|o|f|F)$/;
package OpenBSD::Devices;
use warnings;
use strict;
sub new { bless [], shift }
sub load {
my $od = shift;
open my $f, "/var/run/dmesg.boot"
or die "dmesg.boot open failed: $!";
while (readline($f)) {
push @$od, $_ if /^[a-z]{2,}\d\b/
}
$od
}
sub device { grep { $_ =~ /^$_[1]/ } @{$_[0]} }
sub depends_on { grep { $_ =~ /(?new->load;
my $grep = join('|', @ARGV[2..$#ARGV]);
if ($ARGV[0] eq 'dev') {
for ($dmesg->device($ARGV[1])) {
if ($grep) {
print if $_ =~ /$grep/;
} else { print }
}
}
elsif ($ARGV[0] eq 'o') {
for ($dmesg->depends_on($ARGV[1])) {
if ($grep) {
print if $_ =~ /$grep/;
} else { print }
}
}
elsif ($ARGV[0] eq 'f') {
open my $f, '<', $ARGV[1] or die "cannot open: $ARGV[1]: $!";
while (readline($f)) {
next unless /^([a-z]{2,})[0-9?*]/;
next if $dmesg->device($1);
print;
}
close $f;
}
elsif ($ARGV[0] eq 'F') {
open my $f, '<', $ARGV[1] or die "cannot open: $ARGV[1]: $!";
my @d = map { /^([a-z]{2,})\d/; $1 } @$dmesg;
my @c;
while (readline($f)) {
next unless /^([a-z]{2,})[0-9?*]/;
push @c, $1;
}
for (List::Compare->new('-a', [EMAIL PROTECTED], [EMAIL
PROTECTED])->get_Lonly) {
print $dmesg->device($_);
}
}