Hi,

Take a look at the source code for cfgadm.
You can get SN using:
cfgadm -al -s "select=type(disk),cols=ap_id:info"


On Mon, May 23, 2011 at 10:42 AM, Tejinder <tssai...@gmail.com> wrote:
> Hi,
>
> I want to get the Hard Disk serial number of SCSI HDD on Solaris. On linux 
> this is done using following structs and API:
> struct hd_driveid hd;
> int ide;
> ide=open("/dev/hda",O_RDONLY);
> (void)ioctl(ide,HDIO_GET_IDENTITY,&hd);
> (void)printf("Serial number - %s\n",hd.serial_no);
>
> Is there any similar method exists in Solaris to get HDD serial number.
>
> Thanks


-- 
Regards,
Piotr Jasiukajtis | estibi | SCA OS0072
http://estseg.blogspot.com
_______________________________________________
opensolaris-code mailing list
opensolaris-code@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/opensolaris-code

Reply via email to