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:
+6
-2
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user