diff options
Diffstat (limited to '')
-rw-r--r-- | src/basic/os-util.c | 10 | ||||
-rw-r--r-- | src/basic/os-util.h | 1 | ||||
-rw-r--r-- | src/shared/discover-image.c | 9 |
3 files changed, 11 insertions, 9 deletions
diff --git a/src/basic/os-util.c b/src/basic/os-util.c index 8cb8d9302b..686d5e1382 100644 --- a/src/basic/os-util.c +++ b/src/basic/os-util.c @@ -14,11 +14,21 @@ #include "parse-util.h" #include "path-util.h" #include "stat-util.h" +#include "string-table.h" #include "string-util.h" #include "strv.h" #include "utf8.h" #include "xattr-util.h" +static const char* const image_class_table[_IMAGE_CLASS_MAX] = { + [IMAGE_MACHINE] = "machine", + [IMAGE_PORTABLE] = "portable", + [IMAGE_SYSEXT] = "extension", + [IMAGE_CONFEXT] = "confext", +}; + +DEFINE_STRING_TABLE_LOOKUP(image_class, ImageClass); + /* Helper struct for naming simplicity and reusability */ static const struct { const char *release_file_directory; diff --git a/src/basic/os-util.h b/src/basic/os-util.h index 2f641ba9cd..6121674361 100644 --- a/src/basic/os-util.h +++ b/src/basic/os-util.h @@ -5,6 +5,7 @@ #include <stdio.h> #include "time-util.h" + typedef enum ImageClass { IMAGE_MACHINE, IMAGE_PORTABLE, diff --git a/src/shared/discover-image.c b/src/shared/discover-image.c index 0343d2e20b..d0b3245a27 100644 --- a/src/shared/discover-image.c +++ b/src/shared/discover-image.c @@ -1326,12 +1326,3 @@ static const char* const image_type_table[_IMAGE_TYPE_MAX] = { }; DEFINE_STRING_TABLE_LOOKUP(image_type, ImageType); - -static const char* const image_class_table[_IMAGE_CLASS_MAX] = { - [IMAGE_MACHINE] = "machine", - [IMAGE_PORTABLE] = "portable", - [IMAGE_SYSEXT] = "extension", - [IMAGE_CONFEXT] = "confext" -}; - -DEFINE_STRING_TABLE_LOOKUP(image_class, ImageClass); |