execute: replace command flag bools by a flags field

This way, we can extend it later on in an easier way, and can pass it
along nicely.
This commit is contained in:
Lennart Poettering
2017-08-10 14:44:58 +02:00
parent 2935311ca4
commit 3ed0cd26ea
8 changed files with 20 additions and 15 deletions
+6 -2
View File
@@ -88,13 +88,17 @@ struct ExecStatus {
int status; /* as in sigingo_t::si_status */
};
typedef enum ExecCommandFlags {
EXEC_COMMAND_IGNORE_FAILURE = 1,
EXEC_COMMAND_FULLY_PRIVILEGED = 2,
} ExecCommandFlags;
struct ExecCommand {
char *path;
char **argv;
ExecStatus exec_status;
ExecCommandFlags flags;
LIST_FIELDS(ExecCommand, command); /* useful for chaining commands */
bool ignore:1;
bool privileged:1;
};
struct ExecRuntime {