Searched refs:slice (Results 1 - 25 of 31) sorted by relevance

12

/systemd/src/nspawn/
H A Dnspawn-register.h28 int register_machine(const char *machine_name, pid_t pid, const char *directory, sd_id128_t uuid, int local_ifindex, const char *slice, CustomMount *mounts, unsigned n_mounts, int kill_signal, char **properties, bool keep_unit, const char *service);
H A Dnspawn-register.c35 const char *slice,
100 if (!isempty(slice)) {
101 r = sd_bus_message_append(m, "(sv)", "Slice", "s", slice);
29 register_machine( const char *machine_name, pid_t pid, const char *directory, sd_id128_t uuid, int local_ifindex, const char *slice, CustomMount *mounts, unsigned n_mounts, int kill_signal, char **properties, bool keep_unit, const char *service) argument
/systemd/src/systemd/
H A Dsd-login.h63 /* Get systemd non-slice unit (i.e. service) name from PID, for system
67 /* Get systemd non-slice unit (i.e. service) name from PID, for user
72 /* Get slice name from PID. */
73 int sd_pid_get_slice(pid_t pid, char **slice);
75 /* Get user slice name from PID. */
76 int sd_pid_get_user_slice(pid_t pid, char **slice);
104 int sd_peer_get_slice(int fd, char **slice);
108 int sd_peer_get_user_slice(int fd, char **slice);
/systemd/src/test/
H A Dtest-cgroup-mask.c56 assert_se(manager_load_unit(m, "parent.slice", NULL, NULL, &parent) >= 0);
60 assert_se(manager_load_unit(m, "parent-deep.slice", NULL, NULL, &parent_deep) >= 0);
66 assert_se(UNIT_DEREF(son->slice) == parent);
67 assert_se(UNIT_DEREF(daughter->slice) == parent);
68 assert_se(UNIT_DEREF(parent_deep->slice) == parent);
69 assert_se(UNIT_DEREF(grandchild->slice) == parent_deep);
70 root = UNIT_DEREF(parent->slice);
H A Dtest-cgroup-util.c65 check_p_g_u("/system.slice/foobar.service/sdfdsaf", 0, "foobar.service");
66 check_p_g_u("/system.slice/getty@tty5.service", 0, "getty@tty5.service");
67 check_p_g_u("/system.slice/getty@tty5.service/aaa/bbb", 0, "getty@tty5.service");
68 check_p_g_u("/system.slice/getty@tty5.service/", 0, "getty@tty5.service");
69 check_p_g_u("/system.slice/getty@tty6.service/tty5", 0, "getty@tty6.service");
71 check_p_g_u("/system.slice/getty####@tty6.service/xxx", -ENXIO, NULL);
72 check_p_g_u("/system.slice/system-waldo.slice/foobar.service/sdfdsaf", 0, "foobar.service");
73 check_p_g_u("/system.slice/system-waldo.slice/_cp
188 _cleanup_free_ char *path = NULL, *path_shifted = NULL, *session = NULL, *unit = NULL, *user_unit = NULL, *machine = NULL, *slice = NULL; local
[all...]
/systemd/src/core/
H A Dunit-printf.c118 if (UNIT_ISSET(u->slice)) {
119 Unit *slice; local
121 slice = UNIT_DEREF(u->slice);
123 if (slice->cgroup_path)
124 n = strdup(slice->cgroup_path);
126 n = unit_default_cgroup_path(slice);
233 * %r where units in this slice are placed in the cgroup tree
H A Dcgroup.c581 if (UNIT_DEREF(member->slice) != u)
598 * require, i.e. the members mask of the unit's parent slice
601 if (UNIT_ISSET(u->slice))
602 return unit_get_members_mask(UNIT_DEREF(u->slice));
669 if (UNIT_ISSET(u->slice)) {
670 Unit *s = UNIT_DEREF(u->slice);
706 u = UNIT_DEREF(u->slice);
713 _cleanup_free_ char *escaped = NULL, *slice = NULL; local
721 if (UNIT_ISSET(u->slice) && !unit_has_name(UNIT_DEREF(u->slice), SPECIAL_ROOT_SLIC
966 Unit *slice; local
[all...]
H A Dslice.c23 #include "dbus-slice.h"
25 #include "slice.h"
60 if (UNIT_ISSET(UNIT(s)->slice))
69 strcpy(dash, ".slice");
77 unit_ref_set(&UNIT(s)->slice, parent);
116 return log_unit_error_errno(UNIT(s), r, "Failed to determine parent slice: %m");
118 if (parent ? !unit_has_name(UNIT_DEREF(UNIT(s)->slice), parent) : UNIT_ISSET(UNIT(s)->slice)) {
119 log_unit_error(UNIT(s), "Located outside of parent slice. Refusing.");
273 log_error_errno(r, "Failed to add -.slice nam
[all...]
H A Dunit.c558 unit_ref_unset(&u->slice);
1133 if (UNIT_ISSET(u->slice))
1134 return unit_add_two_dependencies(u, UNIT_AFTER, UNIT_REQUIRES, UNIT_DEREF(u->slice), true);
2352 int unit_set_slice(Unit *u, Unit *slice) { argument
2354 assert(slice);
2356 /* Sets the unit slice if it has not been set before. Is extra
2359 * (since the parent slice is derived from the name). Make
2360 * sure the unit we set is actually a slice. */
2371 if (slice->type != UNIT_SLICE)
2375 !unit_has_name(slice, SPECIAL_ROOT_SLIC
2391 Unit *slice; local
[all...]
H A Dunit.h131 UnitRef slice; member in struct:Unit
259 #include "slice.h"
487 int unit_set_slice(Unit *u, Unit *slice);
H A Ddbus-unit.c1085 Unit *slice; local
1089 return sd_bus_error_setf(error, SD_BUS_ERROR_INVALID_ARGS, "The slice property is only available for units with control groups.");
1091 return sd_bus_error_setf(error, SD_BUS_ERROR_INVALID_ARGS, "Slice may not be set for slice units.");
1093 return sd_bus_error_setf(error, SD_BUS_ERROR_INVALID_ARGS, "Cannot set slice for init.scope");
1102 r = manager_load_unit(u->manager, s, NULL, error, &slice);
1106 if (slice->type != UNIT_SLICE)
1107 return sd_bus_error_setf(error, SD_BUS_ERROR_INVALID_ARGS, "Unit name '%s' is not a slice", s);
1110 r = unit_set_slice(u, slice);
/systemd/src/basic/
H A Dunit-name.c736 int slice_build_parent_slice(const char *slice, char **ret) { argument
740 assert(slice);
743 if (!slice_name_is_valid(slice))
746 if (streq(slice, "-.slice")) {
751 s = strdup(slice);
757 strcpy(dash, ".slice");
759 r = free_and_strdup(&s, "-.slice");
770 int slice_build_subslice(const char *slice, const char*name, char **ret) { argument
773 assert(slice);
[all...]
H A Dcgroup-util.h146 int cg_path_get_slice(const char *path, char **slice);
147 int cg_path_get_user_slice(const char *path, char **slice);
157 int cg_pid_get_slice(pid_t pid, char **slice);
158 int cg_pid_get_user_slice(pid_t pid, char **slice);
H A Dcgroup-util.c1281 if (n < strlen("x.slice"))
1284 if (memcmp(p + n - 6, ".slice", 6) == 0) {
1301 /* Skips over all slice assignments */
1331 if (endswith(unit, ".slice")) {
1547 _cleanup_free_ char *slice = NULL; local
1553 r = cg_path_get_slice(path, &slice);
1557 start = startswith(slice, "user-");
1560 end = endswith(start, ".slice");
1582 int cg_path_get_slice(const char *p, char **slice) { argument
1586 assert(slice);
1618 cg_pid_get_slice(pid_t pid, char **slice) argument
1631 cg_path_get_user_slice(const char *p, char **slice) argument
1645 cg_pid_get_user_slice(pid_t pid, char **slice) argument
[all...]
H A Dunit-name.h318 int slice_build_parent_slice(const char *slice, char **ret);
319 int slice_build_subslice(const char *slice, const char*name, char **subslice);
/systemd/src/libsystemd/sd-bus/
H A Dbus-creds.h61 char *slice; member in struct:sd_bus_creds
H A Dbus-creds.c59 free(c->slice);
458 if (!c->slice) {
465 r = cg_path_get_slice(shifted, (char**) &c->slice);
470 *ret = c->slice;
/systemd/src/machine/
H A Dmachined.h74 int manager_start_scope(Manager *manager, const char *scope, pid_t pid, const char *slice, const char *description, sd_bus_message *more_properties, sd_bus_error *error, char **job);
/systemd/src/login/
H A Dlogind-user.c80 r = slice_build_subslice(SPECIAL_USER_SLICE, lu, &u->slice);
92 r = hashmap_put(m->user_units, u->slice, u);
118 if (u->slice)
119 hashmap_remove_value(u->manager->user_units, u->slice, u);
127 u->slice = mfree(u->slice);
406 u->slice,
417 log_error_errno(r, "Failed to start user slice %s, ignoring: %s (%s)",
418 u->slice, bus_error_message(&error, r), error.name);
456 * If u->stopping is set, the user is marked for removal and the slice
[all...]
H A Dlogind-user.h45 char *slice; member in struct:User
H A Dlogind.h173 int manager_start_slice(Manager *manager, const char *slice, const char *description, const char *after, const char *after2, uint64_t tasks_max, sd_bus_error *error, char **job);
174 int manager_start_scope(Manager *manager, const char *scope, pid_t pid, const char *slice, const char *description, const char *after, const char *after2, uint64_t tasks_max, sd_bus_error *error, char **job);
H A Dloginctl.c308 char *slice; member in struct:UserStatusInfo
342 free(info->slice);
561 { "Slice", "s", NULL, offsetof(UserStatusInfo, slice) },
615 if (i.slice) {
616 printf("\t Unit: %s\n", i.slice);
617 show_unit_cgroup(bus, "org.freedesktop.systemd1.Slice", i.slice, 0);
621 i.slice,
H A Dlogind-user-dbus.c244 SD_BUS_PROPERTY("Slice", "s", NULL, offsetof(User, slice), SD_BUS_VTABLE_PROPERTY_CONST),
/systemd/src/libsystemd/sd-login/
H A Dsd-login.c90 _public_ int sd_pid_get_slice(pid_t pid, char **slice) { argument
93 assert_return(slice, -EINVAL);
95 return cg_pid_get_slice(pid, slice);
98 _public_ int sd_pid_get_user_slice(pid_t pid, char **slice) { argument
101 assert_return(slice, -EINVAL);
103 return cg_pid_get_user_slice(pid, slice);
210 _public_ int sd_peer_get_slice(int fd, char **slice) { argument
215 assert_return(slice, -EINVAL);
221 return cg_pid_get_slice(ucred.pid, slice);
224 _public_ int sd_peer_get_user_slice(int fd, char **slice) { argument
[all...]
/systemd/src/coredump/
H A Dcoredumpctl.c368 *slice = NULL, *cgroup = NULL, *owner_uid = NULL, local
389 retrieve(d, l, "COREDUMP_SLICE", &slice);
480 if (slice)
481 fprintf(file, " Slice: %s\n", slice);

Completed in 68 milliseconds

12