dataman: use correct size for dataman compat key

This commit is contained in:
Konrad 2023-12-04 14:35:29 +01:00 committed by Daniel Agar
parent 9c02e384e6
commit cac858cb24
1 changed files with 5 additions and 5 deletions

View File

@ -93,11 +93,15 @@ static const unsigned g_per_item_max_index[DM_KEY_NUM_KEYS] = {
DM_KEY_COMPAT_MAX DM_KEY_COMPAT_MAX
}; };
struct dataman_compat_s {
uint64_t key;
};
constexpr uint32_t MISSION_SAFE_POINT_SIZE = sizeof(struct mission_item_s); constexpr uint32_t MISSION_SAFE_POINT_SIZE = sizeof(struct mission_item_s);
constexpr uint32_t MISSION_FENCE_POINT_SIZE = sizeof(struct mission_fence_point_s); constexpr uint32_t MISSION_FENCE_POINT_SIZE = sizeof(struct mission_fence_point_s);
constexpr uint32_t MISSION_ITEM_SIZE = sizeof(struct mission_item_s); constexpr uint32_t MISSION_ITEM_SIZE = sizeof(struct mission_item_s);
constexpr uint32_t MISSION_SIZE = sizeof(struct mission_s); constexpr uint32_t MISSION_SIZE = sizeof(struct mission_s);
constexpr uint32_t DATAMAN_COMPAT_SIZE = sizeof(struct mission_s); constexpr uint32_t DATAMAN_COMPAT_SIZE = sizeof(struct dataman_compat_s);
/** The table of the size of each item type */ /** The table of the size of each item type */
static constexpr size_t g_per_item_size[DM_KEY_NUM_KEYS] = { static constexpr size_t g_per_item_size[DM_KEY_NUM_KEYS] = {
@ -109,10 +113,6 @@ static constexpr size_t g_per_item_size[DM_KEY_NUM_KEYS] = {
DATAMAN_COMPAT_SIZE DATAMAN_COMPAT_SIZE
}; };
struct dataman_compat_s {
uint64_t key;
};
/* increment this define whenever a binary incompatible change is performed */ /* increment this define whenever a binary incompatible change is performed */
#define DM_COMPAT_VERSION 4ULL #define DM_COMPAT_VERSION 4ULL