Felix Miata wrote:
On 2010/02/22 15:08 (GMT+0100) David Haller composed:
On Mon, 22 Feb 2010, Felix Miata wrote:
Ignoring whatever information can be discovered or inferred from device model numbers or names, how can one determine whether a device is connected to a PATA port or an SATA port?
$ hwinfo --cdrom | awk ' /Device Files/ { pci = gensub(".*/by-path/pci-[0-9]+:([0-9:.]+)-scsi.*", "\\1", 1); cmd = "/sbin/lspci"; while ( cmd | getline ) { if( $1 == pci ) { print; }; }; }'
prints the controller the device "hangs on", e.g. one of:
00:14.1 IDE interface: ATI Technologies Inc SB700/SB800 IDE Controller 00:11.0 SATA controller: ATI Technologies Inc SB700/SB800 SATA Controller [AHCI mode] 03:07.0 RAID bus controller: Silicon Image, Inc. SiI 3114 [SATALink/SATARaid] Serial ATA Controller (rev 02)
Thanks for your reply.
First I put it in a script.
Then I tried it on a fresh M2 install on a system with no attached SATA devices, and got: "00:09.0 IDE interface: nVidia Corporation nForce2 IDE (rev a2)". That seems reasonable.
I also tried it on an 11.0 install on a i965/ICH8 system with no attached PATA devices, and got no output. Any ideas why?
It's difficult to tell without the output from 'hwinfo --cdrom' and 'lspci'.
Any suggestions for something simpler and/or more authoritative?
AFAICT, Davids awk-script does it just fine - it picks the PCI identifier from /dev/disk/by-path and looks up the PCI device. /Per -- Per Jessen, Zürich (6.4°C) -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org