X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=src%2Flogin%2Flogind.h;h=9be29ab280e183f57ed67da3b4083bc27b98cc82;hp=56dd515f66b253f79660416378a900884347645b;hb=6f2f5118f1ba06b7fd93a0ce6661530ea1f7e7ee;hpb=b4f4684f3a95c915491cd7845911ecdf2622b2c2 diff --git a/src/login/logind.h b/src/login/logind.h index 56dd515f6..9be29ab28 100644 --- a/src/login/logind.h +++ b/src/login/logind.h @@ -29,7 +29,6 @@ #include "sd-bus.h" #include "sd-event.h" -#include "cgroup-util.h" #include "hashmap.h" #include "list.h" #include "set.h" @@ -40,7 +39,14 @@ typedef struct Manager Manager; #include "logind-button.h" #include "logind-device.h" #include "logind-inhibit.h" -#include "logind-sleep.h" + +/// Additional includes needed by elogind +#include "cgroup-util.h" + +#if 1 /// elogind has to ident itself +#define MANAGER_IS_SYSTEM(m) ((m)->is_system) +#define MANAGER_IS_USER(m) (!((m)->is_system)) +#endif // 1 struct Manager { sd_event *event; @@ -78,8 +84,13 @@ struct Manager { * file system */ int pin_cgroupfs_fd; + /* fd for handling cgroup socket if elogind is its own cgroups manager */ + int cgroups_agent_fd; + sd_event_source *cgroups_agent_event_source; + /* Flags */ bool test_run:1; + bool is_system:1; /* true if elogind is its own cgroups manager */ /* Data specific to the cgroup subsystem */ CGroupMask cgroup_supported; @@ -229,6 +240,7 @@ const struct ConfigPerfItem* logind_gperf_lookup(const char *key, GPERF_LEN_TYPE int manager_set_lid_switch_ignore(Manager *m, usec_t until); int config_parse_tmpfs_size(const char *unit, const char *filename, unsigned line, const char *section, unsigned section_line, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata); +int config_parse_user_tasks_max(const char *unit, const char *filename, unsigned line, const char *section, unsigned section_line, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata); int manager_get_session_from_creds(Manager *m, sd_bus_message *message, const char *name, sd_bus_error *error, Session **ret); int manager_get_user_from_creds(Manager *m, sd_bus_message *message, uid_t uid, sd_bus_error *error, User **ret);