hello,
if i run command
Code:
mybox:~> cat /proc/scsi/scsi
Attached devices:
Host: scsi0 Channel: 00 Id: 00 Lun: 00
Vendor: MATSHITA Model: DVD-RAM UJ-860H Rev: 1.02
Type: CD-ROM ANSI SCSI revision: 05
Host: scsi2 Channel: 00 Id: 00 Lun: 00
Vendor: ATA Model: FUJITSU MHY2120B Rev: 890B
Type: Direct-Access ANSI SCSI revision: 05
i'm using php to iterate all scsi devices in my system, how to format the output of cat /proc/scsi/scsi to return scsi host and vendor in the following format (similar to 'lsscsi' command);
Code:
0 0 0 0 MATSHITA DVD-RAM UJ-860H
2 0 0 0 ATA FUJITSU MHY2120B
it is easy if i'm on linux 2.6 as i have 'lsscsi' which output;
Code:
khairil@box4:~/drivers> lsscsi
[0:0:0:0] cd/dvd MATSHITA DVD-RAM UJ-860H 1.02 /dev/sr0
[2:0:0:0] disk ATA FUJITSU MHY2120B 890B /dev/sda
thx.