SCSI inquiry to get storage device serial number
Hi,
I'm trying to get the serial number of a storage device. I've tried sg3_utils and sg_inq does this. I tried calling the functions within the sg3 source files, but I can't seem to build it even after including the relevant header files.
I've also tried forming my own SCSI inquiry CDB and sending it to the device, but I only seem to get the vendor ID and product ID, no serial number and other information.
Does anyone know how to use the functions within sg3_utils, or how to obtain the serial number?
Thanks!
|