1 Star 0 Fork 9

王歌/procinfo

forked from src-openEuler/procinfo 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
procinfo-17-lsdev.patch 1.25 KB
一键复制 编辑 原始数据 按行查看 历史
Grooooot 提交于 2020-02-19 10:01 . init the package
--- 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 ####################################################################
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/wang--ge/procinfo.git
git@gitee.com:wang--ge/procinfo.git
wang--ge
procinfo
procinfo
master

搜索帮助