]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - src/shared/machine-image.h
machine-image: introduce image_hash_ops and use it
[thirdparty/systemd.git] / src / shared / machine-image.h
index de06147e7bf3e2b56499995dc29db3bee6af5666..9fd45899c80d3a5e160ca4a2a4ee04481ba3900b 100644 (file)
@@ -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;