summaryrefslogtreecommitdiffstats
path: root/tools/i386/netboot/3c529
stat options
Period:
Authors:

Commits per author per week (path 'tools/i386/netboot/3c529')

AuthorW07 2025W08 2025W09 2025W10 2025Total
Total00000
n22' href='#n22'>22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104
use diagnostics;
use strict;

my $scsiDeviceAvailable;
my $CSADeviceAvailable;

1;

sub scsiDeviceAvailable {
    defined $scsiDeviceAvailable and return $scsiDeviceAvailable;
    local *F;
    open F, "/proc/scsi/scsi" or log::l("failed to open /proc/scsi/scsi: $!"), return 0;
    foreach (<F>) {
	/devices: none/ and log::l("no scsi devices are available"), return $scsiDeviceAvailable = 0;
    }
    log::l("scsi devices are available");
    $scsiDeviceAvailable = 1;
}

sub CompaqSmartArrayDeviceAvailable {
    defined $CSADeviceAvailable and return $CSADeviceAvailable;
    -r "/proc/array/ida0" or log::l("failed to open /proc/array/ida0: $!"), return $CSADeviceAvailable = 0;
    log::l("Compaq Smart Array controllers available");
    $CSADeviceAvailable = 1;
}

sub scsiGetDevices {
    my @drives;
    my ($driveNum, $cdromNum, $tapeNum) = qw(0 0 0);