1 /* SPDX-License-Identifier: LGPL-2.1-or-later */
10 typedef enum UnitFileState UnitFileState
;
11 typedef enum UnitFileScope UnitFileScope
;
12 typedef struct LookupPaths LookupPaths
;
16 UNIT_FILE_ENABLED_RUNTIME
,
18 UNIT_FILE_LINKED_RUNTIME
,
21 UNIT_FILE_MASKED_RUNTIME
,
29 _UNIT_FILE_STATE_INVALID
= -EINVAL
,
37 _UNIT_FILE_SCOPE_INVALID
= -EINVAL
,
40 bool unit_type_may_alias(UnitType type
) _const_
;
41 bool unit_type_may_template(UnitType type
) _const_
;
43 int unit_symlink_name_compatible(const char *symlink
, const char *target
, bool instance_propagation
);
44 int unit_validate_alias_symlink_and_warn(const char *filename
, const char *target
);
46 bool lookup_paths_timestamp_hash_same(const LookupPaths
*lp
, uint64_t timestamp_hash
, uint64_t *ret_new
);
47 int unit_file_build_name_map(
48 const LookupPaths
*lp
,
49 uint64_t *cache_timestamp_hash
,
50 Hashmap
**unit_ids_map
,
51 Hashmap
**unit_names_map
,
54 int unit_file_find_fragment(
55 Hashmap
*unit_ids_map
,
56 Hashmap
*unit_name_map
,
57 const char *unit_name
,
58 const char **ret_fragment_path
,
61 const char* runlevel_to_target(const char *rl
);