1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-01-18 12:52:44 +01:00

suit: Group the HAVE_COMPONENTS flag with the others

This commit is contained in:
Koen Zandberg 2020-09-29 11:23:20 +02:00
parent d9cf10c109
commit 72ef2086b5
No known key found for this signature in database
GPG Key ID: 0895A893E6D2985B
2 changed files with 10 additions and 9 deletions

View File

@ -70,6 +70,11 @@ extern "C" {
* These flags apply to the full manifest.
* @{
*/
/**
* @brief Bit flags used to determine if SUIT manifest contains components
*/
#define SUIT_STATE_HAVE_COMPONENTS (1 << 0)
/**
* @brief COSE signature OK
*/
@ -178,10 +183,10 @@ typedef struct {
* These state flags apply to individual components inside a manifest.
* @{
*/
#define SUIT_COMPONENT_STATE_FETCHED 0x01 /**< Component is fetched */
#define SUIT_COMPONENT_STATE_FETCH_FAILED 0x02 /**< Component fetched but failed */
#define SUIT_COMPONENT_STATE_VERIFIED 0x04 /**< Component is verified */
#define SUIT_COMPONENT_STATE_FINALIZED 0x08 /**< Component successfully installed */
#define SUIT_COMPONENT_STATE_FETCHED (1 << 0) /**< Component is fetched */
#define SUIT_COMPONENT_STATE_FETCH_FAILED (1 << 1) /**< Component fetched but failed */
#define SUIT_COMPONENT_STATE_VERIFIED (1 << 2) /**< Component is verified */
#define SUIT_COMPONENT_STATE_FINALIZED (1 << 3) /**< Component successfully installed */
/** @} */
/**
@ -225,10 +230,6 @@ typedef struct {
size_t urlbuf_len; /**< Length of the manifest url */
} suit_manifest_t;
/**
* @brief Bit flags used to determine if SUIT manifest contains components
*/
#define SUIT_MANIFEST_HAVE_COMPONENTS (0x1)
/**
* @brief Component index representing all components

View File

@ -76,7 +76,7 @@ static int _component_handler(suit_manifest_t *manifest, int key,
}
manifest->components_len = n;
if (n) {
manifest->state |= SUIT_MANIFEST_HAVE_COMPONENTS;
manifest->state |= SUIT_STATE_HAVE_COMPONENTS;
}
return 0;
}