title: Get SCSI hard drive serial on Linux from a C++ program
body: <p>I want to retrieve SCSI hard drive serial on Linux (Ubuntu) from a C++ program without root priveleges. I tried ioctl(fd, HDIO_GET_IDENTITY, &amp;id) but it seems to work only for ATA devices. Does anyone have a solution for SCSI HDDs? The solution I am looking for should not require the user to have root priveleges. Any source code will be much appreciated</p>