Lines Matching refs:slice
782 int slice_build_parent_slice(const char *slice, char **ret) { in slice_build_parent_slice() argument
787 assert(slice); in slice_build_parent_slice()
790 if (!slice_name_is_valid(slice)) in slice_build_parent_slice()
793 if (streq(slice, SPECIAL_ROOT_SLICE)) { in slice_build_parent_slice()
798 s = strdup(slice); in slice_build_parent_slice()
815 int slice_build_subslice(const char *slice, const char *name, char **ret) { in slice_build_subslice() argument
818 assert(slice); in slice_build_subslice()
822 if (!slice_name_is_valid(slice)) in slice_build_subslice()
828 if (streq(slice, SPECIAL_ROOT_SLICE)) in slice_build_subslice()
833 assert_se(e = endswith(slice, ".slice")); in slice_build_subslice()
835 subslice = new(char, (e - slice) + 1 + strlen(name) + 6 + 1); in slice_build_subslice()
839 stpcpy(stpcpy(stpcpy(mempcpy(subslice, slice, e - slice), "-"), name), ".slice"); in slice_build_subslice()