[Bugs] [Bug 1206587] New: Replace contrib/uuid by a libglusterfs wrapper that uses the uuid implementation from the OS

bugzilla at redhat.com bugzilla at redhat.com
Fri Mar 27 13:23:38 UTC 2015


https://bugzilla.redhat.com/show_bug.cgi?id=1206587

            Bug ID: 1206587
           Summary: Replace contrib/uuid by a libglusterfs wrapper that
                    uses the uuid implementation from the OS
           Product: GlusterFS
           Version: mainline
         Component: build
          Keywords: FutureFeature, Triaged
          Severity: low
          Priority: low
          Assignee: bugs at gluster.org
          Reporter: ndevos at redhat.com
                CC: bugs at gluster.org, gluster-bugs at redhat.com



Different OS's have different APIs for using UUID's. At the moment the Gluster
sources contain contrib/uuid which provide the Linux API for OS's that provide
an other interface.

It is much cleaner to use the API provided by the OS and drop (or at least
reduce) the usage of contrib/uuid. This would affect
libglusterfs/src/common-utils.{c,h}.

>From Manu:

Here is OpenGroup flavor (NetBSD, MacOS X, etc...):
int32_t uuid_compare(const uuid_t *, const uuid_t *, uint32_t *);
void    uuid_create(uuid_t *, uint32_t *);
void    uuid_create_nil(uuid_t *, uint32_t *);
int32_t uuid_equal(const uuid_t *, const uuid_t *, uint32_t *);
void    uuid_from_string(const char *, uuid_t *, uint32_t *);
uint16_t uuid_hash(const uuid_t *, uint32_t *);
int32_t uuid_is_nil(const uuid_t *, uint32_t *);
void    uuid_to_string(const uuid_t *, char **, uint32_t *);
void    uuid_enc_le(void *, const uuid_t *);
void    uuid_dec_le(const void *, uuid_t *);
void    uuid_enc_be(void *, const uuid_t *);
void    uuid_dec_be(const void *, uuid_t *);

Here is Linux API, used by glusterfs, and available in contrib/uuid:
void uuid_clear(uuid_t uu);
int uuid_compare(const uuid_t uu1, const uuid_t uu2);
void uuid_copy(uuid_t dst, const uuid_t src);
void uuid_generate(uuid_t out);
void uuid_generate_random(uuid_t out);
void uuid_generate_time(uuid_t out);
int uuid_is_null(const uuid_t uu);
int uuid_parse(const char *in, uuid_t uu);
void uuid_unparse(const uuid_t uu, char *out);
void uuid_unparse_lower(const uuid_t uu, char *out);
void uuid_unparse_upper(const uuid_t uu, char *out);
time_t uuid_time(const uuid_t uu, struct timeval *ret_tv);
int uuid_type(const uuid_t uu);
int uuid_variant(const uuid_t uu);

-- 
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.


More information about the Bugs mailing list