mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-05 12:40:16 +01:00
cli: sort nmcli device output by active-connection first
Previously, we first sort by the device's state, then by the active connection's state. Contrast to `nmcli connection`, which first sorts by the active connection's state. It means, the sort order is somewhat different. Fix that. In most cases, that shouldn't make a difference, because the device's state and the active-connection's state should correspond. However, it matters as we now treat external activations different, and that is tied to the active connection.
This commit is contained in:
parent
a5f9f2fbfc
commit
38ad9e5211
1 changed files with 1 additions and 1 deletions
|
|
@ -1082,8 +1082,8 @@ compare_devices(const void *a, const void *b)
|
|||
NMActiveConnection *da_ac = nm_device_get_active_connection(da);
|
||||
NMActiveConnection *db_ac = nm_device_get_active_connection(db);
|
||||
|
||||
NM_CMP_DIRECT(nm_device_get_state(db), nm_device_get_state(da));
|
||||
NM_CMP_RETURN(nmc_active_connection_cmp(db_ac, da_ac));
|
||||
NM_CMP_DIRECT(nm_device_get_state(db), nm_device_get_state(da));
|
||||
NM_CMP_DIRECT_STRCMP0(nm_device_get_type_description(da), nm_device_get_type_description(db));
|
||||
NM_CMP_DIRECT_STRCMP0(nm_device_get_iface(da), nm_device_get_iface(db));
|
||||
NM_CMP_DIRECT_STRCMP0(nm_object_get_path(NM_OBJECT(da)), nm_object_get_path(NM_OBJECT(db)));
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue