Hello, 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) HTH, -dnh -- Now the world has gone to bed, | Now I lay me down to sleep, Darkness won't engulf my head, | Try to count electric sheep, I can see by infrared, | Sweet dream wishes you can keep, How I hate the night. | How I hate the night. -- Marvin -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org