X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fcommon%2Fcompat%2Fuuid.h;h=dcc4ed5609b2785945f54f00dd7d575e0c8ad82f;hp=4a71f16c8af1cbb6a5d3d8dd46e470f5f861329d;hb=bef4c7a13491d04ab6ffd0ca270eed90efc9d56c;hpb=0a821fdec261e93d1d1987dcc26b31b11a28f125 diff --git a/src/common/compat/uuid.h b/src/common/compat/uuid.h index 4a71f16c8..dcc4ed560 100644 --- a/src/common/compat/uuid.h +++ b/src/common/compat/uuid.h @@ -23,6 +23,8 @@ #ifndef LTTNG_UUID_H #define LTTNG_UUID_H +#include + /* * Includes final \0. */ @@ -65,4 +67,13 @@ int lttng_uuid_generate(unsigned char *uuid_out) #error "LTTng-Tools needs to have a UUID generator configured." #endif +/* + * Convert a UUID to a human-readable, NULL-terminated, string of the form + * xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx. + * + * Assumes uuid_str is at least UUID_STR_LEN byte long. + */ +LTTNG_HIDDEN +void lttng_uuid_to_str(const unsigned char *uuid, char *uuid_str); + #endif /* LTTNG_UUID_H */