diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2018-02-06 12:17:50 +0900 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2018-02-06 16:00:50 +0900 |
commit | 34cf6c43406d580648ee79503cba560b25940bf4 (patch) | |
tree | 457204229dd75b7ca8240526e7dd576f48c5b757 /src/core/execute.h | |
parent | e8a565cb660a7a11f76180fe441ba8e4f9383771 (diff) | |
download | systemd-34cf6c43406d580648ee79503cba560b25940bf4.tar.gz |
core/execute: make arguments constant if possible
Also make functions static if possible.
Diffstat (limited to 'src/core/execute.h')
-rw-r--r-- | src/core/execute.h | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/src/core/execute.h b/src/core/execute.h index 90d0fc64e3..4023b30164 100644 --- a/src/core/execute.h +++ b/src/core/execute.h @@ -345,15 +345,11 @@ int exec_spawn(Unit *unit, DynamicCreds *dynamic_creds, pid_t *ret); -void exec_command_done(ExecCommand *c); void exec_command_done_array(ExecCommand *c, unsigned n); ExecCommand* exec_command_free_list(ExecCommand *c); void exec_command_free_array(ExecCommand **c, unsigned n); -char *exec_command_line(char **argv); - -void exec_command_dump(ExecCommand *c, FILE *f, const char *prefix); void exec_command_dump_list(ExecCommand *c, FILE *f, const char *prefix); void exec_command_append_list(ExecCommand **l, ExecCommand *e); int exec_command_set(ExecCommand *c, const char *path, ...); @@ -361,24 +357,22 @@ int exec_command_append(ExecCommand *c, const char *path, ...); void exec_context_init(ExecContext *c); void exec_context_done(ExecContext *c); -void exec_context_dump(ExecContext *c, FILE* f, const char *prefix); +void exec_context_dump(const ExecContext *c, FILE* f, const char *prefix); -int exec_context_destroy_runtime_directory(ExecContext *c, const char *runtime_root); +int exec_context_destroy_runtime_directory(const ExecContext *c, const char *runtime_root); -int exec_context_load_environment(Unit *unit, const ExecContext *c, char ***l); -int exec_context_named_iofds(Unit *unit, const ExecContext *c, const ExecParameters *p, int named_iofds[3]); const char* exec_context_fdname(const ExecContext *c, int fd_index); -bool exec_context_may_touch_console(ExecContext *c); -bool exec_context_maintains_privileges(ExecContext *c); +bool exec_context_may_touch_console(const ExecContext *c); +bool exec_context_maintains_privileges(const ExecContext *c); -int exec_context_get_effective_ioprio(ExecContext *c); +int exec_context_get_effective_ioprio(const ExecContext *c); void exec_context_free_log_extra_fields(ExecContext *c); void exec_status_start(ExecStatus *s, pid_t pid); -void exec_status_exit(ExecStatus *s, ExecContext *context, pid_t pid, int code, int status); -void exec_status_dump(ExecStatus *s, FILE *f, const char *prefix); +void exec_status_exit(ExecStatus *s, const ExecContext *context, pid_t pid, int code, int status); +void exec_status_dump(const ExecStatus *s, FILE *f, const char *prefix); int exec_runtime_acquire(Manager *m, const ExecContext *c, const char *name, bool create, ExecRuntime **ret); ExecRuntime *exec_runtime_unref(ExecRuntime *r, bool destroy); |