diff options
author | Thomas Haller <thaller@redhat.com> | 2019-07-17 11:19:13 +0200 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2019-07-17 12:22:25 +0200 |
commit | e1867d917bf1a767f831b9a0b9b720625d4f8d0e (patch) | |
tree | 3e767701c9962feb0daf20c407f2f45dc57beee7 | |
parent | bc29389e8e356bd5c5612d5ec57b4b67dae6b74c (diff) | |
download | NetworkManager-e1867d917bf1a767f831b9a0b9b720625d4f8d0e.tar.gz |
settings: fix prefering newer keyfile/ifcfg-rh files with duplicate UUIDs
-rw-r--r-- | src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-storage.c | 4 | ||||
-rw-r--r-- | src/settings/plugins/keyfile/nms-keyfile-storage.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-storage.c b/src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-storage.c index 760d924d4a..2841bedb20 100644 --- a/src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-storage.c +++ b/src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-storage.c @@ -89,8 +89,8 @@ cmp_fcn (const NMSIfcfgRHStorage *a, nm_assert (a != b); /* newer files are more important. */ - NM_CMP_FIELD (b, a, stat_mtime.tv_sec); - NM_CMP_FIELD (b, a, stat_mtime.tv_nsec); + NM_CMP_FIELD (a, b, stat_mtime.tv_sec); + NM_CMP_FIELD (a, b, stat_mtime.tv_nsec); NM_CMP_DIRECT_STRCMP (nms_ifcfg_rh_storage_get_filename (a), nms_ifcfg_rh_storage_get_filename (b)); diff --git a/src/settings/plugins/keyfile/nms-keyfile-storage.c b/src/settings/plugins/keyfile/nms-keyfile-storage.c index 993aeb9a4f..d38e187d22 100644 --- a/src/settings/plugins/keyfile/nms-keyfile-storage.c +++ b/src/settings/plugins/keyfile/nms-keyfile-storage.c @@ -81,8 +81,8 @@ cmp_fcn (const NMSKeyfileStorage *a, NM_CMP_FIELD_UNSAFE (a, b, is_tombstone); /* newer files are more important. */ - NM_CMP_FIELD (b, a, stat_mtime.tv_sec); - NM_CMP_FIELD (b, a, stat_mtime.tv_nsec); + NM_CMP_FIELD (a, b, stat_mtime.tv_sec); + NM_CMP_FIELD (a, b, stat_mtime.tv_nsec); NM_CMP_DIRECT_STRCMP (nms_keyfile_storage_get_filename (a), nms_keyfile_storage_get_filename (b)); |