From d8b78bb9221866a544066b551c6d31188adf4035 Mon Sep 17 00:00:00 2001 From: Roberto Hueso Gómez Date: Wed, 14 Oct 2020 14:43:15 +0200 Subject: #942 Extend GET /images function This extension removes replaces the field 'filename' for 'name' and adds new fields (software_id, type and id). These new fields are useful when restoring an image. Request: GET /images Response: 200 OK { "disk": { "free": 37091418112, "total": 52573995008 }, "images": [ { "datasize": 5939200000, "id": 25, "modified": "Wed Oct 14 11:49:00 2020", "name": "archlinux", "permissions": "744", "size": 1844222333, "software_id": 19, "type": 1 } ] } --- src/dbi.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/dbi.h') diff --git a/src/dbi.h b/src/dbi.h index 8cd6fe6..1daaeb8 100644 --- a/src/dbi.h +++ b/src/dbi.h @@ -51,10 +51,12 @@ struct og_image_legacy { struct og_image { char name[OG_DB_IMAGE_NAME_MAXLEN + 1]; char description[OG_DB_IMAGE_DESCRIPTION_MAXLEN + 1]; - const char *filename; + uint64_t software_id; uint64_t center_id; uint64_t datasize; uint64_t group_id; + uint64_t type; + uint64_t id; struct stat image_stats; }; -- cgit v1.2.3-18-g5258