mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-31 00:50:12 +01:00
glib-aux: use nm_uuid_parse() helper
This commit is contained in:
parent
e7568e29b2
commit
42d67415b4
4 changed files with 3 additions and 15 deletions
|
|
@ -2854,7 +2854,7 @@ again:
|
|||
NULL,
|
||||
NULL,
|
||||
NULL);
|
||||
if (!contents || !_nm_utils_uuid_parse(nm_strstrip(contents), &uuid)) {
|
||||
if (!contents || !nm_uuid_parse(nm_strstrip(contents), &uuid)) {
|
||||
/* generate a random UUID instead. */
|
||||
is_fake = TRUE;
|
||||
_nm_utils_uuid_generate_random(&uuid);
|
||||
|
|
|
|||
|
|
@ -3044,17 +3044,6 @@ _nm_utils_sriov_vf_from_strparts(const char *index,
|
|||
|
||||
/*****************************************************************************/
|
||||
|
||||
NMUuid *
|
||||
_nm_utils_uuid_parse(const char *str, NMUuid *out_uuid)
|
||||
{
|
||||
nm_assert(str);
|
||||
nm_assert(out_uuid);
|
||||
|
||||
if (uuid_parse(str, out_uuid->uuid) != 0)
|
||||
return NULL;
|
||||
return out_uuid;
|
||||
}
|
||||
|
||||
NMUuid *
|
||||
_nm_utils_uuid_generate_random(NMUuid *out_uuid)
|
||||
{
|
||||
|
|
@ -3148,7 +3137,7 @@ nm_utils_uuid_generate_from_string_bin(NMUuid * uuid,
|
|||
|
||||
if (type_args) {
|
||||
/* type_args can be a name space UUID. Interpret it as (char *) */
|
||||
if (!_nm_utils_uuid_parse(type_args, &ns_uuid))
|
||||
if (!nm_uuid_parse(type_args, &ns_uuid))
|
||||
g_return_val_if_reached(NULL);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -7219,7 +7219,7 @@ _uuid(const char *str)
|
|||
static NMUuid u;
|
||||
|
||||
g_assert(str);
|
||||
g_assert(_nm_utils_uuid_parse(str, &u));
|
||||
g_assert(nm_uuid_parse(str, &u));
|
||||
return &u;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -352,7 +352,6 @@ gboolean _nm_utils_check_module_file(const char * name,
|
|||
|
||||
/*****************************************************************************/
|
||||
|
||||
NMUuid *_nm_utils_uuid_parse(const char *str, NMUuid *uuid);
|
||||
NMUuid *_nm_utils_uuid_generate_random(NMUuid *out_uuid);
|
||||
|
||||
gboolean nm_utils_uuid_is_null(const NMUuid *uuid);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue