summaryrefslogtreecommitdiffstats
path: root/src/shared/discover-image.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/shared/discover-image.h')
-rw-r--r--src/shared/discover-image.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/shared/discover-image.h b/src/shared/discover-image.h
index edfb1412a4..bb046fae1e 100644
--- a/src/shared/discover-image.h
+++ b/src/shared/discover-image.h
@@ -45,7 +45,8 @@ typedef struct Image {
sd_id128_t machine_id;
char **machine_info;
char **os_release;
- char **extension_release;
+ char **sysext_release;
+ char **confext_release;
bool metadata_valid:1;
bool discoverable:1; /* true if we know for sure that image_find() would find the image given just the short name */
@@ -80,6 +81,17 @@ int image_read_metadata(Image *i, const ImagePolicy *image_policy);
bool image_in_search_path(ImageClass class, const char *root, const char *image);
+static inline char **image_extension_release(Image *image, ImageClass class) {
+ assert(image);
+
+ if (class == IMAGE_SYSEXT)
+ return image->sysext_release;
+ if (class == IMAGE_CONFEXT)
+ return image->confext_release;
+
+ return NULL;
+}
+
static inline bool IMAGE_IS_HIDDEN(const struct Image *i) {
assert(i);