summaryrefslogtreecommitdiffstats
path: root/src/shared/machine-image.h
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2018-11-28 14:54:44 +0100
committerYu Watanabe <watanabe.yu+github@gmail.com>2018-12-02 12:18:54 +0100
commitb07ec5a173f285c35661150764562fb78bb6fadd (patch)
tree28fe94c8ff17b893ea5ddd7b0addb4e9b82ae471 /src/shared/machine-image.h
parenttmpfiles: define main through macro (diff)
downloadsystemd-b07ec5a173f285c35661150764562fb78bb6fadd.tar.xz
systemd-b07ec5a173f285c35661150764562fb78bb6fadd.zip
machine-image: introduce image_hash_ops and use it
Diffstat (limited to '')
-rw-r--r--src/shared/machine-image.h7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/shared/machine-image.h b/src/shared/machine-image.h
index de06147e7b..9fd45899c8 100644
--- a/src/shared/machine-image.h
+++ b/src/shared/machine-image.h
@@ -59,12 +59,7 @@ typedef struct Image {
Image *image_unref(Image *i);
Image *image_ref(Image *i);
-static inline Hashmap* image_hashmap_free(Hashmap *map) {
- return hashmap_free_with_destructor(map, image_unref);
-}
-
DEFINE_TRIVIAL_CLEANUP_FUNC(Image*, image_unref);
-DEFINE_TRIVIAL_CLEANUP_FUNC(Hashmap*, image_hashmap_free);
int image_find(ImageClass class, const char *name, Image **ret);
int image_from_path(const char *path, Image **ret);
@@ -113,3 +108,5 @@ static inline bool IMAGE_IS_HOST(const struct Image *i) {
return false;
}
+
+extern const struct hash_ops image_hash_ops;