Index: firmware/lib/cgptlib/cgptlib_internal.c |
diff --git a/firmware/lib/cgptlib/cgptlib_internal.c b/firmware/lib/cgptlib/cgptlib_internal.c |
index 7faf3832a32e8701e7010fc0dd46ddece1c3c83e..85b4906182392189e1c7b192112188f9f54fd424 100644 |
--- a/firmware/lib/cgptlib/cgptlib_internal.c |
+++ b/firmware/lib/cgptlib/cgptlib_internal.c |
@@ -309,40 +309,40 @@ void GptRepair(GptData *gpt) { |
int GetEntrySuccessful(const GptEntry* e) { |
- return (e->attributes & CGPT_ATTRIBUTE_SUCCESSFUL_MASK) >> |
- CGPT_ATTRIBUTE_SUCCESSFUL_OFFSET; |
+ return (e->attrs.fields.gpt_att & CGPT_ATTRIBUTE_SUCCESSFUL_MASK) >> |
+ CGPT_ATTRIBUTE_SUCCESSFUL_OFFSET; |
} |
int GetEntryPriority(const GptEntry* e) { |
- return (e->attributes & CGPT_ATTRIBUTE_PRIORITY_MASK) >> |
- CGPT_ATTRIBUTE_PRIORITY_OFFSET; |
+ return (e->attrs.fields.gpt_att & CGPT_ATTRIBUTE_PRIORITY_MASK) >> |
+ CGPT_ATTRIBUTE_PRIORITY_OFFSET; |
} |
int GetEntryTries(const GptEntry* e) { |
- return (e->attributes & CGPT_ATTRIBUTE_TRIES_MASK) >> |
- CGPT_ATTRIBUTE_TRIES_OFFSET; |
+ return (e->attrs.fields.gpt_att & CGPT_ATTRIBUTE_TRIES_MASK) >> |
+ CGPT_ATTRIBUTE_TRIES_OFFSET; |
} |
void SetEntrySuccessful(GptEntry* e, int successful) { |
if (successful) |
- e->attributes |= CGPT_ATTRIBUTE_SUCCESSFUL_MASK; |
+ e->attrs.fields.gpt_att |= CGPT_ATTRIBUTE_SUCCESSFUL_MASK; |
else |
- e->attributes &= ~CGPT_ATTRIBUTE_SUCCESSFUL_MASK; |
+ e->attrs.fields.gpt_att &= ~CGPT_ATTRIBUTE_SUCCESSFUL_MASK; |
} |
void SetEntryPriority(GptEntry* e, int priority) { |
- e->attributes &= ~CGPT_ATTRIBUTE_PRIORITY_MASK; |
- e->attributes |= ((uint64_t)priority << CGPT_ATTRIBUTE_PRIORITY_OFFSET) & |
+ e->attrs.fields.gpt_att &= ~CGPT_ATTRIBUTE_PRIORITY_MASK; |
+ e->attrs.fields.gpt_att |= (priority << CGPT_ATTRIBUTE_PRIORITY_OFFSET) & |
CGPT_ATTRIBUTE_PRIORITY_MASK; |
} |
void SetEntryTries(GptEntry* e, int tries) { |
- e->attributes &= ~CGPT_ATTRIBUTE_TRIES_MASK; |
- e->attributes |= ((uint64_t)tries << CGPT_ATTRIBUTE_TRIES_OFFSET) & |
+ e->attrs.fields.gpt_att &= ~CGPT_ATTRIBUTE_TRIES_MASK; |
+ e->attrs.fields.gpt_att |= (tries << CGPT_ATTRIBUTE_TRIES_OFFSET) & |
CGPT_ATTRIBUTE_TRIES_MASK; |
} |