summaryrefslogtreecommitdiffstats
path: root/src/core/manager.h
diff options
context:
space:
mode:
authorMike Yuan <me@yhndnzj.com>2024-10-14 19:53:28 +0200
committerMike Yuan <me@yhndnzj.com>2024-10-27 20:02:46 +0100
commitd993ad6c6fa0cdb423a4e04697afa3e8dc67ded7 (patch)
tree99df406690370b931558dfe0d364517acab2dd92 /src/core/manager.h
parentcore/job: trivial modernization (diff)
downloadsystemd-d993ad6c6fa0cdb423a4e04697afa3e8dc67ded7.tar.xz
systemd-d993ad6c6fa0cdb423a4e04697afa3e8dc67ded7.zip
core/manager: introduce manager_add_job_full() which takes extra TransactionAddFlags
No functional change. Preparation for later commits.
Diffstat (limited to 'src/core/manager.h')
-rw-r--r--src/core/manager.h24
1 files changed, 21 insertions, 3 deletions
diff --git a/src/core/manager.h b/src/core/manager.h
index abf02bf079..c1f7f8c083 100644
--- a/src/core/manager.h
+++ b/src/core/manager.h
@@ -139,6 +139,7 @@ typedef enum WatchdogType {
#include "job.h"
#include "path-lookup.h"
#include "show-status.h"
+#include "transaction.h"
#include "unit-name.h"
#include "unit.h"
@@ -554,9 +555,26 @@ int manager_load_unit(Manager *m, const char *name, const char *path, sd_bus_err
int manager_load_startable_unit_or_warn(Manager *m, const char *name, const char *path, Unit **ret);
int manager_load_unit_from_dbus_path(Manager *m, const char *s, sd_bus_error *e, Unit **_u);
-int manager_add_job(Manager *m, JobType type, Unit *unit, JobMode mode, Set *affected_jobs, sd_bus_error *e, 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_add_job_full(
+ Manager *m,
+ JobType type,
+ Unit *unit,
+ JobMode mode,
+ TransactionAddFlags extra_flags,
+ Set *affected_jobs,
+ sd_bus_error *error,
+ Job **ret);
+static inline 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);
+}
+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);
void manager_clear_jobs(Manager *m);