From: Greg KH <greg@kroah.com> To: linux-kernel@vger.kernel.org Subject: [ANNOUNCE] pcihpview 0.2 Date: Mon, 19 Nov 2001 17:13:20 -0800 Hi all, Now that a number of people are actually using the PCI Hotplug driver in the kernel, I've received quite a few requests to enable the old GUI tools to work with the new file system interface. Since my statements of "it's a filesystem, use the shell" fell on deaf ears, I hacked up a small gtk+ program called pcihpview. It can be found at: http://www.kroah.com/linux/hotplug/pcihpview-0.2.tar.gz More info on the program (but not much), and the obligatory screenshot can be found at: http://www.kroah.com/linux/hotplug/ For those who just want to use a shell script, I've attached an example of one below (it's read only, pcihpview allows you to change values.) thanks, greg k-h ------------------cut here------------------------ #!/bin/sh if [ $# != "1" ] ; then echo echo "Program to display the PCI Hotplug slot information" echo "usage: $0 <directory>" echo exit 1 fi DIR=$1 cd $DIR echo "Slot Adapter Attention Latch Power" for SLOT in * ; do cd $SLOT TEMP=`cat adapter` if [ $TEMP == 0 ]; then ADAPTER="not present" else ADAPTER="present " fi TEMP=`cat attention` if [ $TEMP == 0 ]; then ATTENTION="off" else ATTENTION="on" fi TEMP=`cat latch` if [ $TEMP == 0 ]; then LATCH="off" else LATCH="on" fi TEMP=`cat power` if [ $TEMP == 0 ]; then POWER="off" else POWER="on" fi echo "$SLOT $ADAPTER $ATTENTION $LATCH $POWER" cd .. done - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/