Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Leap:42.1:Staging:A
procinfo
procinfo-lsdev.dif
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File procinfo-lsdev.dif of Package procinfo
--- lsdev.pl +++ lsdev.pl 2007-04-17 17:21:17.114752512 +0200 @@ -16,33 +16,42 @@ open (IRQ, "</proc/interrupts") || die " while (<IRQ>) { next if /^[ \t]*[A-Z]/; chop; - if (/PIC/) { - $n = (@line = split()); + s/^ +//g; + if (/-(PIC|edge|level) /) { + $n = (@line = split(/-(PIC|edge|level) /)); } else { $n = (@line = split(' [ +] ')); } $name = $line[$n-1]; - $device{$name} = $name; - @tmp = split(':', $line[0]); - $tmp0 = int($tmp[0]); - $irq{$name} = "$irq{$name} $tmp0"; + foreach $name (split(/,/, $line[$n-1])) { + $name =~ s/^ +//g; + $device{$name} = $name; + @tmp = split(':', $line[0]); + $tmp0 = int($tmp[0]); + $irq{$name} = "$irq{$name} $tmp0"; + } } close (IRQ); -open (DMA, "</proc/dma") || die "can't open /proc/dma"; -while (<DMA>) { - chop; - @line = split(': '); - @tmp = split (/[ \(]/, $line[1]); - $name = $tmp[0]; - $device{$name} = $name; - $dma{$name} = "$dma{$name}$line[0]"; +# /proc/dma isn't exported for ia64 kernels +if ( -r "/proc/dma" ) { + open (DMA, "</proc/dma") || die "can't open /proc/dma"; + while (<DMA>) { + chop; + s/^ +//g; + @line = split(': '); + @tmp = split (/[ \(]/, $line[1]); + $name = $tmp[0]; + $device{$name} = $name; + $dma{$name} = "$dma{$name}$line[0]"; + } + close (DMA); } -close (DMA); open (IOPORTS, "</proc/ioports") || die "can't open /proc/ioports"; while (<IOPORTS>) { chop; + s/^ +//g; @line = split(' : '); @tmp = split (/[ \(]/, $line[1]); $name = $tmp[0];
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor