Lines Matching refs:suffix
218 int unit_name_change_suffix(const char *n, const char *suffix, char **ret) { in unit_name_change_suffix() argument
224 assert(suffix); in unit_name_change_suffix()
230 if (!unit_suffix_is_valid(suffix)) in unit_name_change_suffix()
236 b = strlen(suffix); in unit_name_change_suffix()
242 strcpy(mempcpy(s, n, a), suffix); in unit_name_change_suffix()
252 int unit_name_build(const char *prefix, const char *instance, const char *suffix, char **ret) { in unit_name_build() argument
256 assert(suffix); in unit_name_build()
259 if (suffix[0] != '.') in unit_name_build()
262 type = unit_type_from_string(suffix + 1); in unit_name_build()
542 char *suffix; in unit_name_hash_long() local
549 suffix = strrchr(name, '.'); in unit_name_hash_long()
550 if (!suffix) in unit_name_hash_long()
553 if (unit_type_from_string(suffix+1) < 0) in unit_name_hash_long()
564 len = UNIT_NAME_MAX - 1 - strlen(suffix+1) - UNIT_NAME_HASH_LENGTH_CHARS - 2; in unit_name_hash_long()
571 if (!strextend(&n, "_", hash, suffix)) in unit_name_hash_long()
580 int unit_name_from_path(const char *path, const char *suffix, char **ret) { in unit_name_from_path() argument
585 assert(suffix); in unit_name_from_path()
588 if (!unit_suffix_is_valid(suffix)) in unit_name_from_path()
595 s = strjoin(p, suffix); in unit_name_from_path()
619 int unit_name_from_path_instance(const char *prefix, const char *path, const char *suffix, char **r… in unit_name_from_path_instance() argument
625 assert(suffix); in unit_name_from_path_instance()
631 if (!unit_suffix_is_valid(suffix)) in unit_name_from_path_instance()
638 s = strjoin(prefix, "@", p, suffix); in unit_name_from_path_instance()
704 …ix(const char *name, const char *operation, UnitNameMangle flags, const char *suffix, char **ret) { in unit_name_mangle_with_suffix() argument
710 assert(suffix); in unit_name_mangle_with_suffix()
716 if (!unit_suffix_is_valid(suffix)) in unit_name_mangle_with_suffix()
749 s = new(char, strlen(name) * 4 + strlen(suffix) + 1); in unit_name_mangle_with_suffix()
763 strcat(s, suffix); in unit_name_mangle_with_suffix()