mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-08 23:30:18 +01:00
nmtst: add nmtst_uuid_generate()
This commit is contained in:
parent
c2bafa6153
commit
9a11577e63
1 changed files with 11 additions and 0 deletions
|
|
@ -868,6 +868,17 @@ __define_nmtst_static(02, 1024)
|
|||
__define_nmtst_static(03, 1024)
|
||||
#undef __define_nmtst_static
|
||||
|
||||
inline static const char *
|
||||
nmtst_uuid_generate (void)
|
||||
{
|
||||
static char u[37];
|
||||
gs_free char *m = NULL;
|
||||
|
||||
m = nm_utils_uuid_generate ();
|
||||
g_assert (m && strlen (m) == sizeof (u) - 1);
|
||||
memcpy (u, m, sizeof (u));
|
||||
return u;
|
||||
}
|
||||
|
||||
#define NMTST_SWAP(x,y) \
|
||||
G_STMT_START { \
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue