Mount *mount;
int pipe_fd;
+ mode_t directory_mode;
Watch pipe_watch;
dev_t dev_id;
- mode_t directory_mode;
Set *tokens;
struct Device {
Meta meta;
- DeviceState state;
-
char *sysfs;
/* In order to be able to distuingish dependencies on
devices for the same sysfs path. We chain them up here. */
LIST_FIELDS(struct Device, same_sysfs);
+
+ DeviceState state;
};
extern const UnitVTable device_vtable;
char *path;
char **argv;
ExecStatus exec_status;
- bool ignore;
LIST_FIELDS(ExecCommand, command); /* useful for chaining commands */
+ bool ignore;
};
struct ExecContext {
cpu_set_t *cpuset;
unsigned cpuset_ncpus;
- unsigned long timer_slack_nsec;
ExecInput std_input;
ExecOutput std_output;
ExecOutput std_error;
- int syslog_priority;
- char *syslog_identifier;
- bool syslog_level_prefix;
+ unsigned long timer_slack_nsec;
char *tcpwrap_name;
uint64_t capability_bounding_set_drop;
+ /* Not relevant for spawning processes, just for killing */
+ KillMode kill_mode;
+ int kill_signal;
+
cap_t capabilities;
int secure_bits;
+ int syslog_priority;
+ char *syslog_identifier;
+ bool syslog_level_prefix;
+
bool cpu_sched_reset_on_fork;
bool non_blocking;
bool private_tmp;
- bool oom_adjust_set:1;
- bool nice_set:1;
- bool ioprio_set:1;
- bool cpu_sched_set:1;
- bool timer_slack_nsec_set:1;
-
/* This is not exposed to the user but available
* internally. We need it to make sure that whenever we spawn
* /bin/mount it is run in the same process group as us so
* don't enter a trigger loop. */
bool same_pgrp;
- /* Not relevant for spawning processes, just for killing */
- KillMode kill_mode;
- int kill_signal;
+ bool oom_adjust_set:1;
+ bool nice_set:1;
+ bool ioprio_set:1;
+ bool cpu_sched_set:1;
+ bool timer_slack_nsec_set:1;
};
typedef enum ExitStatus {
#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. */
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;
bool dispatching_run_queue:1;
bool dispatching_dbus_queue:1;
- int n_deserializing;
-
bool show_status;
bool confirm_spawn;
bool sysv_console;
+
+ int n_deserializing;
};
int manager_new(ManagerRunningAs running_as, Manager **m);
bool failure:1;
- usec_t timeout_usec;
-
mode_t directory_mode;
+ usec_t timeout_usec;
+
ExecCommand exec_command[_MOUNT_EXEC_COMMAND_MAX];
ExecContext exec_context;
LIST_HEAD(SocketPort, ports);
+ unsigned n_accepted;
+ unsigned n_connections;
+ unsigned max_connections;
+
unsigned backlog;
usec_t timeout_usec;
SocketState state, deserialized_state;
+ Watch timer_watch;
+
ExecCommand* control_command;
SocketExecCommand control_command_id;
pid_t control_pid;
- bool accept;
- unsigned n_accepted;
- unsigned n_connections;
- unsigned max_connections;
+ /* Only for INET6 sockets: issue IPV6_V6ONLY sockopt */
+ SocketAddressBindIPv6Only bind_ipv6_only;
+
+ mode_t directory_mode;
+ mode_t socket_mode;
bool failure;
- Watch timer_watch;
+
+ bool accept;
/* Socket options */
bool keep_alive;
+ bool free_bind;
int priority;
+ int mark;
size_t receive_buffer;
size_t send_buffer;
int ip_tos;
int ip_ttl;
size_t pipe_size;
- int mark;
- bool free_bind;
char *bind_to_device;
char *tcp_congestion;
-
- /* Only for INET6 sockets: issue IPV6_V6ONLY sockopt */
- SocketAddressBindIPv6Only bind_ipv6_only;
-
- mode_t directory_mode;
- mode_t socket_mode;
};
/* Called from the service code when collecting fds */
char *what;
+ SwapState state, deserialized_state;
+
bool from_etc_fstab:1;
bool from_proc_swaps:1;
bool from_fragment:1;
-
- SwapState state, deserialized_state;
};
extern const UnitVTable swap_vtable;
} TimerBase;
typedef struct TimerValue {
- TimerBase base;
usec_t value;
-
usec_t next_elapse;
- bool disabled;
-
LIST_FIELDS(struct TimerValue, value);
+
+ TimerBase base;
+ bool disabled;
} TimerValue;
struct Timer {
/* Used during GC sweeps */
unsigned gc_marker;
+ /* When deserializing, temporarily store the job type for this
+ * unit here, if there was a job scheduled */
+ int deserialized_job; /* This is actually of type JobType */
+
/* If we go down, pull down everything that depends on us, too */
bool recursive_stop;
/* Don't allow the user to stop this unit manually, allow stopping only indirectly via dependency. */
bool refuse_manual_stop;
- /* When deserializing, temporarily store the job type for this
- * unit here, if there was a job scheduled */
- int deserialized_job; /* This is actually of type JobType */
-
bool in_load_queue:1;
bool in_dbus_queue:1;
bool in_cleanup_queue:1;