shared/install: modernize unit_file_get_list, use key destructor

The rest of the basename()s are easy to drop.
This commit is contained in:
Mike Yuan
2024-06-11 23:17:21 +01:00
committed by Luca Boccassi
parent 0bb4614adc
commit ca3c95c1c5
7 changed files with 55 additions and 69 deletions
+1 -3
View File
@@ -199,9 +199,7 @@ static inline int unit_file_exists(RuntimeScope scope, const LookupPaths *paths,
return unit_file_exists_full(scope, paths, name, NULL);
}
int unit_file_get_list(RuntimeScope scope, const char *root_dir, Hashmap *h, char **states, char **patterns);
extern const struct hash_ops unit_file_list_hash_ops_free;
int unit_file_get_list(RuntimeScope scope, const char *root_dir, char * const *states, char * const *patterns, Hashmap **ret);
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);