install: define hash_ops for UnitFileList

This commit is contained in:
David Tardon
2023-03-28 14:16:47 +02:00
parent 19279652c0
commit c92899fdad
2 changed files with 9 additions and 0 deletions
+8
View File
@@ -3625,6 +3625,14 @@ Hashmap* unit_file_list_free(Hashmap *h) {
DEFINE_TRIVIAL_CLEANUP_FUNC(UnitFileList*, unit_file_list_free_one);
DEFINE_HASH_OPS_WITH_VALUE_DESTRUCTOR(
unit_file_list_hash_ops_free,
char,
string_hash_func,
string_compare_func,
UnitFileList,
unit_file_list_free_one);
int unit_file_get_list(
RuntimeScope scope,
const char *root_dir,
+1
View File
@@ -196,6 +196,7 @@ int unit_file_exists(RuntimeScope scope, const LookupPaths *paths, const char *n
int unit_file_get_list(RuntimeScope scope, const char *root_dir, Hashmap *h, char **states, char **patterns);
Hashmap* unit_file_list_free(Hashmap *h);
extern const struct hash_ops unit_file_list_hash_ops_free;
InstallChangeType install_changes_add(InstallChange **changes, size_t *n_changes, InstallChangeType type, const char *path, const char *source);
void install_changes_free(InstallChange *changes, size_t n_changes);