summaryrefslogtreecommitdiffstats
path: root/src/json.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/json.h')
-rw-r--r--src/json.h16
1 files changed, 14 insertions, 2 deletions
diff --git a/src/json.h b/src/json.h
index e43531e..ff5c8ad 100644
--- a/src/json.h
+++ b/src/json.h
@@ -22,6 +22,7 @@ int og_json_parse_bool(const json_t *element, bool *value);
#define OG_PARAM_PART_OS (1UL << 6)
#define OG_PARAM_PART_USED_SIZE (1UL << 7)
#define OG_PARAM_PART_DISK_TYPE (1UL << 8)
+#define OG_PARAM_PART_FREE_SIZE (1UL << 9)
struct og_partition {
const char *disk;
@@ -32,7 +33,9 @@ struct og_partition {
const char *filesystem;
const char *format;
const char *os;
- const char *used_size;
+ uint64_t used_size;
+ uint64_t free_size;
+
};
#define OG_DISK_MAX 4
@@ -128,8 +131,17 @@ struct og_cache_image {
struct list_head list;
};
+#define OG_PARAM_CACHE_USED_SIZE (1UL << 0)
+#define OG_PARAM_CACHE_FREE_SIZE (1UL << 1)
+#define OG_PARAM_CACHE_IMAGES (1UL << 2)
+
+struct og_cache_data {
+ uint64_t used_size;
+ uint64_t free_size;
+};
+
void og_cache_image_free(struct list_head *cache_list);
-int og_json_parse_cache(json_t *element, struct list_head *cache_list);
+int og_json_parse_cache(json_t *element, struct og_cache_data *cache_data, struct list_head *cache_list);
#define OG_PARAM_EFI_ENTRIES (1UL << 0)