diff options
author | Lennart Poettering <lennart@poettering.net> | 2017-11-14 23:25:13 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2017-11-20 16:43:15 +0100 |
commit | c7664c071ec935f67fed7aceebc296513d17ea15 (patch) | |
tree | 27a9f3d781c28290c5cd74d1e25042be2e40a8e3 /src/shared/machine-image.h | |
parent | dissect: update dissect tool to show image metadata (diff) | |
download | systemd-c7664c071ec935f67fed7aceebc296513d17ea15.tar.xz systemd-c7664c071ec935f67fed7aceebc296513d17ea15.zip |
machine-image: add a generic API to determine metadata of any image
This adds an internal API that permits querying metadata from any type
of image, including both subvol/dir images, and raw/block images. In the
latter case we use the new dissection API we just added.
Diffstat (limited to 'src/shared/machine-image.h')
-rw-r--r-- | src/shared/machine-image.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/shared/machine-image.h b/src/shared/machine-image.h index 1b1194e442..9573000a5a 100644 --- a/src/shared/machine-image.h +++ b/src/shared/machine-image.h @@ -53,6 +53,13 @@ typedef struct Image { uint64_t limit; uint64_t limit_exclusive; + char *hostname; + sd_id128_t machine_id; + char **machine_info; + char **os_release; + + bool metadata_valid; + void *userdata; } Image; @@ -80,6 +87,8 @@ int image_name_lock(const char *name, int operation, LockFile *ret); int image_set_limit(Image *i, uint64_t referenced_max); +int image_read_metadata(Image *i); + static inline bool IMAGE_IS_HIDDEN(const struct Image *i) { assert(i); |