On 24 Jul 2002 18:17:37 +0200
Pixel <[EMAIL PROTECTED]> wrote:

> (i don't see any difference between load_ide() and the load_category,
> both should modprobe ide-cd...)

well, here's what I found with load_category('disk/cdrom')
I'm no expert with perl (me Watson, you Holmes ;)

modules.pm line 73:

sub load_category {
    my ($category, $wait_message, $probe_type) = @_;
             ### only $category, and this has disk/cdrom


    read_already_loaded();

    my @try_modules = (
      if_($category =~ /scsi/,
          if_(arch() !~ /ppc/, 'imm', 'ppa'),
          if_(detect_devices::usbStorage(), 'usb-storage'),
      ),
      if_(arch() =~ /ppc/,
          if_($category =~ /scsi/, 'mesh', 'mac53c94'),
          if_($category =~ /net/, 'bmac', 'gmac', 'mace'),
          if_($category =~ /sound/, 'dmasound_awacs'),
      ),
    );        ### none matches, @try_modules empty

    grep {
        $wait_message->($_->{description}, $_->{driver}) if $wait_message;
        eval { load([ $_->{driver}, $_->{options} ]) };
        $_->{error} = $@;

        !($@ && $_->{try});
    } probe_category($category, $probe_type),
              ### this is empty, see sub probe_category 
      map {;{driver => $_, description => $_, try => 1}} @try_modules;
              ### empty (I guess)
}

sub probe_category {
    my ($category, $probe_type) = @_;

    my @modules = category2modules($category);
              ### @modules has ide-cd sr_mod cdrom

    grep {
        if ($category eq 'isdn') {
            my $b = $_->{driver} =~ /ISDN:([^,]*),?([^,]*),?(.*)/;
            if ($b) {
                $_->{driver} = $1;
                $_->{options} = $2;
                $_->{firmware} = $3;
                $_->{firmware} =~ s/firmware=//;
                $_->{driver} eq "hisax" and $_->{options} .= " id=HiSax";
            }
            $b;
        } else {
            member($_->{driver}, @modules);
              ### none in @modules is with the stuff below
        }
    } detect_devices::probeall($probe_type);
              ### this has five times "unknown" presumably my
              ### VIA chipset stuff,
              ### ne2k, es1938, nvidia
}

sub load_ide {
    eval { load("ide-cd"); }
}



So, we take disk/cdrom,
that resolves to the three modules ide-cd sr_mod cdrom,
try_modules is empty so we skip that,
detect_devices::proball on my box only returns stuff found on pci,
none of the pci stuff matches our three modules in @modules,
which leads to probe_category returning nothing,
which in turn gives the grep in load_category nothing to work on

is that about correct?


- Mark

Reply via email to