You need use ioctl HDIO_GET_IDENIFY to get the serial no. like:
int fd = open ("/dev/sda, ....);
ioctl (fd, HDIO_GET_IDENTIFY...)
Anyway, check hdparm's source code for more detailed instructions.
Cheers.
Long
>-----Original Message-----
>From: [email protected] [mailto:[email protected]] On Behalf Of Bu,
>Long
>Sent: 2009年11月20日 15:32
>To: Min, Hongbo; [email protected]
>Subject: Re: [Moblin Dev] Is there any unique ID for each Moblin system?
>
>Sorry, I meant harddrive serial no.
>For example, in Linux, hdparm -I /dev/sda wil display the serial no.
>Check the source code of hdparm for details. :-)
>
>Cheers.
>Long
>
>>-----Original Message-----
>>From: Min, Hongbo
>>Sent: 2009年11月20日 15:28
>>To: Bu, Long; [email protected]
>>Subject: RE: Is there any unique ID for each Moblin system?
>>
>>How to view the hardware serial number?
>>
>>-----Original Message-----
>>From: Bu, Long
>>Sent: Friday, November 20, 2009 3:18 PM
>>To: Min, Hongbo; [email protected]
>>Subject: RE: Is there any unique ID for each Moblin system?
>>
>>I don't think there will be a unique ID in terms of moblin software.
>>You can use MAC address or hardware serial number for unique ID purpose.
>>
>>Cheers.
>>Long
>>
>>>-----Original Message-----
>>>From: [email protected] [mailto:[email protected]] On Behalf Of
>>Min,
>>>Hongbo
>>>Sent: 2009年11月20日 15:01
>>>To: [email protected]
>>>Subject: [Moblin Dev] Is there any unique ID for each Moblin system?
>>>
>>>Is there a unique ID for every Moblin system? Suppose user install Moblin
>>>into
>>>a NetBook and it should have a unique ID corresponding to the NetBook device
>>>at runtime. Is it right and how to retrieve it?
>>>Thanks in advance.
>>>
>>>
>>>Best Regards
>>>Hongbo
>>>
>>>_______________________________________________
>>>Moblin dev Mailing List
>>>[email protected]
>>>
>>>To manage or unsubscribe from this mailing list visit:
>>>http://lists.moblin.org/listinfo/dev or your user account on
>>http://moblin.org
>>>once logged in.
>>>
>>>For more information on the Moblin Developer Mailing lists visit:
>>>http://moblin.org/community/mailing-lists
>_______________________________________________
>Moblin dev Mailing List
>[email protected]
>
>To manage or unsubscribe from this mailing list visit:
>http://lists.moblin.org/listinfo/dev or your user account on http://moblin.org
>once logged in.
>
>For more information on the Moblin Developer Mailing lists visit:
>http://moblin.org/community/mailing-lists
_______________________________________________
Moblin dev Mailing List
[email protected]
To manage or unsubscribe from this mailing list visit:
http://lists.moblin.org/listinfo/dev or your user account on http://moblin.org
once logged in.
For more information on the Moblin Developer Mailing lists visit:
http://moblin.org/community/mailing-lists