Hi,
In my program I hv two uuid_t type pointers.
I want to compare these two.
How can i do that?
eg code
Code:int comuuid( uuid_t *uuid1 , uuid_t *uuid2 ) { // how can i compare the uuid1 and uuid2 (not the pointer value.) } thanks.
Hi,
In my program I hv two uuid_t type pointers.
I want to compare these two.
How can i do that?
eg code
Code:int comuuid( uuid_t *uuid1 , uuid_t *uuid2 ) { // how can i compare the uuid1 and uuid2 (not the pointer value.) } thanks.
Depends on what is the typedef of uuid?
The obvious way would be to use memcmp.
My homepage
Advice: Take only as directed - If symptoms persist, please see your debugger
Linus Torvalds: "But it clearly is the only right way. The fact that everybody else does it some other way only means that they are wrong"
If it's the libuuid from e2fsprogs then uuid_compare() is the way to do it. To the OP: check "man 3 uuid" to see the functions available to you.