settings: fix prefering newer keyfile/ifcfg-rh files with duplicate UUIDs

This commit is contained in:
Thomas Haller 2019-07-17 11:19:13 +02:00
parent bc29389e8e
commit e1867d917b
2 changed files with 4 additions and 4 deletions

View file

@ -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));

View file

@ -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));