From 3c395ecea2bb538cf5182a64df503329a0a1cbcc Mon Sep 17 00:00:00 2001 From: OpenGnSys Support Team Date: Wed, 25 Sep 2024 14:47:06 +0200 Subject: client: move image list to cache data to consolidate it Move list of images in the cache to cache_data. Add new functions to initialize cache data (image list) and release it. --- src/json.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/json.h') diff --git a/src/json.h b/src/json.h index cc08d9d..1d711dd 100644 --- a/src/json.h +++ b/src/json.h @@ -138,11 +138,12 @@ struct og_cache_image { struct og_cache_data { uint64_t used_size; uint64_t free_size; + struct list_head image_list; }; -void og_cache_image_free(struct list_head *cache_list); -int og_json_parse_cache(json_t *element, struct og_cache_data *cache_data, struct list_head *cache_list); - +void og_cache_data_init(struct og_cache_data *cache_data); +void og_cache_data_free(struct og_cache_data *cache_data); +int og_json_parse_cache(json_t *element, struct og_cache_data *cache_data); #define OG_PARAM_EFI_ENTRIES (1UL << 0) #define OG_PARAM_EFI_ORDER (1UL << 1) -- cgit v1.2.3-18-g5258