Hi,
Nits, dito ;)
Since perhaps last week, I'm getting this:
# ./powertop -d
sh: /sbin/lspci: not found
sh: /sbin/lspci: not found
sh: /sbin/lspci: not found
sh: /sbin/lspci: not found
sh: /sbin/lspci: not found
sh: /sbin/lspci: not found
sh: /sbin/lspci: not found
sh: /sbin/lspci: not found
sh: /sbin/lspci: not found
sh: /sbin/lspci: not found
sh: /sbin/lspci: not found
sh: /sbin/lspci: not found
PowerTOP 1.12 (C) 2007 - 2010 Intel Corporation
Collecting data for 15 seconds
Cn Avg residency
Debian unstable:
# which lspci
/usr/bin/lspci
# /usr/bin/env lspci
00:00.0 Host bridge: Intel Corporation 82815 815 Chipset Host Bridge and Memory
Controller Hub (rev 02)
00:01.0 PCI bridge: Intel Corporation 82815 815 Chipset AGP Bridge (rev 02)
00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev 02)
00:1f.0 ISA bridge: Intel Corporation 82801BAM ISA Bridge (LPC) (rev 02)
00:1f.1 IDE interface: Intel Corporation 82801BAM IDE U100 Controller (rev 02)
00:1f.2 USB Controller: Intel Corporation 82801BA/BAM USB Controller #1 (rev 02)
01:00.0 VGA compatible controller: ATI Technologies Inc Rage Mobility M4 AGP
02:03.0 Multimedia audio controller: ESS Technology ES1983S Maestro-3i PCI
Audio Accelerator (rev 10)
02:06.0 Network controller: Texas Instruments ACX 100 22Mbps Wireless Interface
02:0f.0 CardBus bridge: Texas Instruments PCI4451 PC card Cardbus Controller
02:0f.1 CardBus bridge: Texas Instruments PCI4451 PC card Cardbus Controller
02:0f.2 FireWire (IEEE 1394): Texas Instruments PCI4451 IEEE-1394 Controller
--> env might be a much better idea here.
(and using library APIs instead of doing raw lspci command output parsing may
be even better)
sprintf(fullpath, "/sbin/lspci -s %s", shortname);
file = popen(fullpath, "r");
if (!file)
return;
Thanks,
Andreas Mohr
_______________________________________________
Power mailing list
[email protected]
http://www.bughost.org/mailman/listinfo/power