Changeset 5502

Show
Ignore:
Timestamp:
12/02/08 21:56:45 (5 years ago)
Author:
khali
Message:

Add an option to skip ISA probes except IPMI. The idea is that only
old systems have ISA hardware monitoring chips, while IPMI can be
present on recent systems. Additionally, IPMI probing is read-only,
so it's safer than other ISA probes.

Location:
lm-sensors/branches/lm-sensors-3.0.0
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • lm-sensors/branches/lm-sensors-3.0.0/CHANGES

    r5498 r5502  
    3535                  Move alias detection after all chip detections 
    3636                  Probe chip types from safest to more risky (#2322) 
     37                  Add an option to skip ISA probes except IPMI 
    3738 
    38393.0.3 (2008-09-28) 
  • lm-sensors/branches/lm-sensors-3.0.0/prog/detect/sensors-detect

    r5501 r5502  
    27782778sub scan_isa_bus 
    27792779{ 
     2780        my $ipmi_only = shift; 
    27802781        my ($chip, $addr, $conf); 
    27812782 
     
    27832784        foreach $chip (@chip_ids) { 
    27842785                next if not exists $chip->{isa_addrs} or not exists $chip->{isa_detect}; 
     2786                next if $ipmi_only && $chip->{name} !~ m/\bIPMI\b/; 
    27852787                foreach $addr (@{$chip->{isa_addrs}}) { 
    27862788                        printf("\%-60s", sprintf("Probing for `\%s'\ at 0x\%x... ", 
     
    48684870sub main 
    48694871{ 
     4872        my ($input); 
     4873 
    48704874        # We won't go very far if not root 
    48714875        unless ($> == 0) { 
     
    49234927                      "We have to write to arbitrary I/O ports to probe them. This is usually\n". 
    49244928                      "safe though. Yes, you do have ISA I/O ports even if you do not have any\n". 
    4925                       "ISA slots! Do you want to scan the ISA I/O ports? (YES/no): "; 
    4926                 unless (<STDIN> =~ /^\s*n/i) { 
     4929                      "ISA slots! Do you want to scan the ISA I/O ports? (YES/no/ipmi only): "; 
     4930                $input = <STDIN>; 
     4931                unless ($input =~ /^\s*n/i) { 
    49274932                        initialize_ioports(); 
    4928                         scan_isa_bus(); 
     4933                        scan_isa_bus($input =~ /^\s*i/i); 
    49294934                        close_ioports(); 
    49304935                }