procinfo/procinfo-17-lsdev.patch

44 lines
1.3 KiB
Diff

--- procinfo-17/lsdev.pl.broken Thu Nov 16 13:38:17 2000
+++ procinfo-17/lsdev.pl Thu Nov 16 13:48:42 2000
@@ -16,6 +16,7 @@
while (<IRQ>) {
next if /^[ \t]*[A-Z]/;
chop;
+ s/^ +//g;
if (/PIC/) {
$n = (@line = split());
} else {
@@ -32,6 +33,7 @@
open (DMA, "</proc/dma") || die "can't open /proc/dma";
while (<DMA>) {
chop;
+ s/^ +//g;
@line = split(': ');
@tmp = split (/[ \(]/, $line[1]);
$name = $tmp[0];
@@ -43,6 +45,7 @@
open (IOPORTS, "</proc/ioports") || die "can't open /proc/ioports";
while (<IOPORTS>) {
chop;
+ s/^ +//g;
@line = split(' : ');
@tmp = split (/[ \(]/, $line[1]);
$name = $tmp[0];
@@ -51,12 +54,12 @@
}
close (IOPORTS);
-printf ("%-16s %4s%6s %s\n------------------------------------------------\n",
- "Device", "DMA", "IRQ", " I/O Ports");
+printf "%-16s %4s%6s %s\n------------------------------------------------\n",
+ "Device", "DMA", "IRQ", " I/O Ports";
foreach $name (sort { uc($a) cmp uc($b) } keys %device) {
- printf ("%-16s %4s%6s %s\n",
- $name, $dma{$name}, $irq{$name}, $port{$name});
+ printf "%-16s %4s%6s %s\n",
+ $name, $dma{$name}, $irq{$name}, $port{$name};
}
# The End ####################################################################