mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-02-07 16:50:35 +01:00
core: pass boot-id to nm_utils_stable_id_parse()
For testing purpose, it's bad to let nm_utils_stable_id_parse() directly access nm_utils_get_boot_id_str(). Instead, the function should have no side-effects. Since the boot-id is anyway cached, accessing it is cheap. Even if it likely won't be needed.
This commit is contained in:
parent
581e1c3269
commit
c51e63feb6
2 changed files with 2 additions and 2 deletions
|
|
@ -1286,7 +1286,7 @@ _get_stable_id (NMDevice *self,
|
|||
|
||||
stable_type = nm_utils_stable_id_parse (stable_id,
|
||||
nm_device_get_ip_iface (self),
|
||||
NULL,
|
||||
nm_utils_get_boot_id_str (),
|
||||
uuid,
|
||||
&generated);
|
||||
|
||||
|
|
|
|||
|
|
@ -2963,7 +2963,7 @@ nm_utils_stable_id_parse (const char *stable_id,
|
|||
if (CHECK_PREFIX ("${CONNECTION}"))
|
||||
_stable_id_append (str, uuid);
|
||||
else if (CHECK_PREFIX ("${BOOT}"))
|
||||
_stable_id_append (str, bootid ?: nm_utils_get_boot_id_str ());
|
||||
_stable_id_append (str, bootid);
|
||||
else if (CHECK_PREFIX ("${DEVICE}"))
|
||||
_stable_id_append (str, deviceid);
|
||||
else if (g_str_has_prefix (&stable_id[i], "${RANDOM}")) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue