On 10/18/10 08:48, Gabriel M. Beddingfield wrote:
On Mon, 18 Oct 2010, Nicolas Dufresne wrote:
Le lundi 18 octobre 2010 à 02:32 +0100, Radi, Rami a écrit :
How can one get a unique device uid in meego which can be easily read
from an application.
This question is a little ambiguous. Do you want to generate a UUID ? in
which case you can read from /proc/sys/kernel/random/uuid or use
libuuid. Maybe you need a UID for specific file in /dev ? for that you
can use libudev. But if you need a system unique identifier, I don't
think that this can be made portable. As an example, on Phones, you want
to use the IMEI (which can be read using oFono), but on Netbooks, you
may want to go with the CPU ID (/dev/cpu/*/cpuid). There is also
gethostid(), but it relies on /etc/hostid, which is not currently
generated on Meego (and any distribution I have tested).
Or perhaps are you looking for an easy way to get
`sudo blkid /dev/sda1` ??
fails on handset - these usually have /dev/mmc* block device nodes.
Auke
_______________________________________________
MeeGo-dev mailing list
[email protected]
http://lists.meego.com/listinfo/meego-dev