Skip to content

Commit

Permalink
api: add rootfs-image.version to fix device display
Browse files Browse the repository at this point in the history
  • Loading branch information
joelguittet committed Jul 24, 2024
1 parent 2b06cb8 commit 435da4c
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions core/src/mender-api.c
Original file line number Diff line number Diff line change
Expand Up @@ -647,6 +647,15 @@ mender_api_publish_inventory_data(mender_keystore_t *inventory) {
ret = MENDER_FAIL;
goto END;
}
cJSON_AddStringToObject(item, "name", "rootfs-image.version");
cJSON_AddStringToObject(item, "value", mender_api_config.artifact_name);
cJSON_AddItemToArray(object, item);
item = cJSON_CreateObject();
if (NULL == item) {
mender_log_error("Unable to allocate memory");
ret = MENDER_FAIL;
goto END;
}
cJSON_AddStringToObject(item, "name", "device_type");
cJSON_AddStringToObject(item, "value", mender_api_config.device_type);
cJSON_AddItemToArray(object, item);
Expand Down

0 comments on commit 435da4c

Please sign in to comment.