chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
readahead-collect: typo, free the correct pointer
[elogind.git]
/
src
/
manager.h
diff --git
a/src/manager.h
b/src/manager.h
index 32fbacc4615e1a1094b27a29b63e9c1b2f8e4cc2..df87ed6b62d8eac7b9b8e2fa62902f0db7bea676 100644
(file)
--- a/
src/manager.h
+++ b/
src/manager.h
@@
-1,4
+1,4
@@
-/*-*- Mode: C; c-basic-offset: 8 -*-*/
+/*-*- Mode: C; c-basic-offset: 8
; indent-tabs-mode: nil
-*-*/
#ifndef foomanagerhfoo
#define foomanagerhfoo
#ifndef foomanagerhfoo
#define foomanagerhfoo
@@
-57,7
+57,8
@@
enum WatchType {
WATCH_SIGNAL,
WATCH_NOTIFY,
WATCH_FD,
WATCH_SIGNAL,
WATCH_NOTIFY,
WATCH_FD,
- WATCH_TIMER,
+ WATCH_UNIT_TIMER,
+ WATCH_JOB_TIMER,
WATCH_MOUNT,
WATCH_UDEV,
WATCH_DBUS_WATCH,
WATCH_MOUNT,
WATCH_UDEV,
WATCH_DBUS_WATCH,
@@
-69,6
+70,7
@@
struct Watch {
WatchType type;
union {
union Unit *unit;
WatchType type;
union {
union Unit *unit;
+ struct Job *job;
DBusWatch *bus_watch;
DBusTimeout *bus_timeout;
} data;
DBusWatch *bus_watch;
DBusTimeout *bus_timeout;
} data;
@@
-85,8
+87,6
@@
struct Watch {
#include "path-lookup.h"
struct Manager {
#include "path-lookup.h"
struct Manager {
- uint32_t current_job_id;
-
/* Note that the set of units we know of is allowed to be
* incosistent. However the subset of it that is loaded may
* not, and the list of jobs may neither. */
/* Note that the set of units we know of is allowed to be
* incosistent. However the subset of it that is loaded may
* not, and the list of jobs may neither. */
@@
-139,11
+139,15
@@
struct Manager {
char **environment;
dual_timestamp startup_timestamp;
char **environment;
dual_timestamp startup_timestamp;
+ dual_timestamp finish_timestamp;
+
+ char *console;
/* Data specific to the device subsystem */
struct udev* udev;
struct udev_monitor* udev_monitor;
Watch udev_watch;
/* Data specific to the device subsystem */
struct udev* udev;
struct udev_monitor* udev_monitor;
Watch udev_watch;
+ Hashmap *devices_by_sysfs;
/* Data specific to the mount subsystem */
FILE *proc_self_mountinfo;
/* Data specific to the mount subsystem */
FILE *proc_self_mountinfo;
@@
-167,6
+171,8
@@
struct Manager {
int32_t name_data_slot;
int32_t subscribed_data_slot;
int32_t name_data_slot;
int32_t subscribed_data_slot;
+ uint32_t current_job_id;
+
/* Data specific to the Automount subsystem */
int dev_autofs_fd;
/* Data specific to the Automount subsystem */
int dev_autofs_fd;
@@
-182,6
+188,11
@@
struct Manager {
* file system */
int pin_cgroupfs_fd;
* file system */
int pin_cgroupfs_fd;
+ /* Audit fd */
+#ifdef HAVE_AUDIT
+ int audit_fd;
+#endif
+
/* Flags */
ManagerRunningAs running_as;
ManagerExitCode exit_code:4;
/* Flags */
ManagerRunningAs running_as;
ManagerExitCode exit_code:4;
@@
-190,12
+201,16
@@
struct Manager {
bool dispatching_run_queue:1;
bool dispatching_dbus_queue:1;
bool dispatching_run_queue:1;
bool dispatching_dbus_queue:1;
- bool utmp_reboot_written:1;
+ bool show_status;
+ bool confirm_spawn;
+ bool sysv_console;
+ bool mount_auto;
+ bool swap_auto;
int n_deserializing;
int n_deserializing;
-
bool show_statu
s;
-
bool confirm_spawn
;
+
unsigned n_installed_job
s;
+
unsigned n_failed_jobs
;
};
int manager_new(ManagerRunningAs running_as, Manager **m);
};
int manager_new(ManagerRunningAs running_as, Manager **m);
@@
-228,15
+243,14
@@
unsigned manager_dispatch_load_queue(Manager *m);
unsigned manager_dispatch_run_queue(Manager *m);
unsigned manager_dispatch_dbus_queue(Manager *m);
unsigned manager_dispatch_run_queue(Manager *m);
unsigned manager_dispatch_dbus_queue(Manager *m);
-int manager_
loop(Manager *m
);
+int manager_
set_console(Manager *m, const char *console
);
-void manager_write_utmp_reboot(Manager *m);
-void manager_write_utmp_runlevel(Manager *m, Unit *t);
+int manager_loop(Manager *m);
void manager_dispatch_bus_name_owner_changed(Manager *m, const char *name, const char* old_owner, const char *new_owner);
void manager_dispatch_bus_query_pid_done(Manager *m, const char *name, pid_t pid);
void manager_dispatch_bus_name_owner_changed(Manager *m, const char *name, const char* old_owner, const char *new_owner);
void manager_dispatch_bus_query_pid_done(Manager *m, const char *name, pid_t pid);
-int manager_open_serialization(FILE **_f);
+int manager_open_serialization(
Manager *m,
FILE **_f);
int manager_serialize(Manager *m, FILE *f, FDSet *fds);
int manager_deserialize(Manager *m, FILE *f, FDSet *fds);
int manager_serialize(Manager *m, FILE *f, FDSet *fds);
int manager_deserialize(Manager *m, FILE *f, FDSet *fds);
@@
-245,6
+259,14
@@
int manager_reload(Manager *m);
bool manager_is_booting_or_shutting_down(Manager *m);
bool manager_is_booting_or_shutting_down(Manager *m);
+void manager_reset_failed(Manager *m);
+
+void manager_send_unit_audit(Manager *m, Unit *u, int type, bool success);
+
+bool manager_unit_pending_inactive(Manager *m, const char *name);
+
+void manager_check_finished(Manager *m);
+
const char *manager_running_as_to_string(ManagerRunningAs i);
ManagerRunningAs manager_running_as_from_string(const char *s);
const char *manager_running_as_to_string(ManagerRunningAs i);
ManagerRunningAs manager_running_as_from_string(const char *s);