mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [ANNOUNCE] pcihpview 0.2
@ 2001-11-20  1:13 Greg KH
  0 siblings, 0 replies; only message in thread
From: Greg KH @ 2001-11-20  1:13 UTC (permalink / raw)
  To: linux-kernel

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

	

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2001-11-20  0:15 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-11-20  1:13 [ANNOUNCE] pcihpview 0.2 Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®