+8
-28
@@ -1,30 +1,15 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
#pragma once
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include "sd-bus.h"
|
||||
#include "sd-device.h"
|
||||
#include "sd-event.h"
|
||||
#include "sd-varlink.h"
|
||||
|
||||
#include "cgroup.h"
|
||||
#include "cgroup-util.h"
|
||||
#include "common-signal.h"
|
||||
#include "emergency-action.h"
|
||||
#include "execute.h"
|
||||
#include "fdset.h"
|
||||
#include "hashmap.h"
|
||||
#include "job.h"
|
||||
#include "list.h"
|
||||
#include "path-lookup.h"
|
||||
#include "prioq.h"
|
||||
#include "ratelimit.h"
|
||||
#include "forward.h"
|
||||
#include "log.h"
|
||||
#include "show-status.h"
|
||||
#include "transaction.h"
|
||||
#include "unit.h"
|
||||
#include "unit-name.h"
|
||||
|
||||
struct libmnt_monitor;
|
||||
|
||||
@@ -39,8 +24,6 @@ enum {
|
||||
|
||||
assert_cc((int) _MANAGER_SIGNAL_COMMAND_MAX <= (int) _COMMON_SIGNAL_COMMAND_PRIVATE_END);
|
||||
|
||||
typedef struct Manager Manager;
|
||||
|
||||
/* An externally visible state. We don't actually maintain this as state variable, but derive it from various fields
|
||||
* when requested */
|
||||
typedef enum ManagerState {
|
||||
@@ -169,7 +152,7 @@ typedef struct UnitDefaults {
|
||||
struct rlimit *rlimit[_RLIMIT_MAX];
|
||||
} UnitDefaults;
|
||||
|
||||
struct Manager {
|
||||
typedef struct Manager {
|
||||
/* Note that the set of units we know of is allowed to be
|
||||
* inconsistent. However the subset of it that is loaded may
|
||||
* not, and the list of jobs may neither. */
|
||||
@@ -495,7 +478,7 @@ struct Manager {
|
||||
|
||||
/* Original ambient capabilities when we were initialized */
|
||||
uint64_t saved_ambient_set;
|
||||
};
|
||||
} Manager;
|
||||
|
||||
static inline usec_t manager_default_timeout_abort_usec(Manager *m) {
|
||||
assert(m);
|
||||
@@ -516,9 +499,7 @@ static inline usec_t manager_default_timeout_abort_usec(Manager *m) {
|
||||
|
||||
#define MANAGER_IS_TEST_RUN(m) ((m)->test_run_flags != 0)
|
||||
|
||||
static inline usec_t manager_default_timeout(RuntimeScope scope) {
|
||||
return scope == RUNTIME_SCOPE_SYSTEM ? DEFAULT_TIMEOUT_USEC : DEFAULT_USER_TIMEOUT_USEC;
|
||||
}
|
||||
usec_t manager_default_timeout(RuntimeScope scope);
|
||||
|
||||
int manager_new(RuntimeScope scope, ManagerTestRunFlags test_run_flags, Manager **m);
|
||||
Manager* manager_free(Manager *m);
|
||||
@@ -546,15 +527,14 @@ int manager_add_job_full(
|
||||
Set *affected_jobs,
|
||||
sd_bus_error *error,
|
||||
Job **ret);
|
||||
static inline int manager_add_job(
|
||||
int manager_add_job(
|
||||
Manager *m,
|
||||
JobType type,
|
||||
Unit *unit,
|
||||
JobMode mode,
|
||||
sd_bus_error *error,
|
||||
Job **ret) {
|
||||
return manager_add_job_full(m, type, unit, mode, 0, NULL, error, ret);
|
||||
}
|
||||
Job **ret);
|
||||
|
||||
int manager_add_job_by_name(Manager *m, JobType type, const char *name, JobMode mode, Set *affected_jobs, sd_bus_error *e, Job **ret);
|
||||
int manager_add_job_by_name_and_warn(Manager *m, JobType type, const char *name, JobMode mode, Set *affected_jobs, Job **ret);
|
||||
int manager_propagate_reload(Manager *m, Unit *unit, JobMode mode, sd_bus_error *e);
|
||||
|
||||
Reference in New Issue
Block a user