diff options
author | Lennart Poettering <lennart@poettering.net> | 2010-10-22 16:11:50 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2010-10-22 16:11:50 +0200 |
commit | 8a0867d6c5b47c8697d1ddd815116a548433c718 (patch) | |
tree | 56c81885c60e6b23f543d82c91a901d2fde14791 /src/execute.c | |
parent | 95e501f8ab28e1645453219523c0263754db3f68 (diff) |
systemctl: introduce systemctl kill
Diffstat (limited to 'src/execute.c')
-rw-r--r-- | src/execute.c | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/src/execute.c b/src/execute.c index b5afa68108..48e55ea4c2 100644 --- a/src/execute.c +++ b/src/execute.c @@ -1797,6 +1797,8 @@ static const char* const exec_input_table[_EXEC_INPUT_MAX] = { [EXEC_INPUT_SOCKET] = "socket" }; +DEFINE_STRING_TABLE_LOOKUP(exec_input, ExecInput); + static const char* const exec_output_table[_EXEC_OUTPUT_MAX] = { [EXEC_OUTPUT_INHERIT] = "inherit", [EXEC_OUTPUT_NULL] = "null", @@ -1808,4 +1810,19 @@ static const char* const exec_output_table[_EXEC_OUTPUT_MAX] = { DEFINE_STRING_TABLE_LOOKUP(exec_output, ExecOutput); -DEFINE_STRING_TABLE_LOOKUP(exec_input, ExecInput); +static const char* const kill_mode_table[_KILL_MODE_MAX] = { + [KILL_CONTROL_GROUP] = "control-group", + [KILL_PROCESS_GROUP] = "process-group", + [KILL_PROCESS] = "process", + [KILL_NONE] = "none" +}; + +DEFINE_STRING_TABLE_LOOKUP(kill_mode, KillMode); + +static const char* const kill_who_table[_KILL_WHO_MAX] = { + [KILL_MAIN] = "main", + [KILL_CONTROL] = "control", + [KILL_ALL] = "all" +}; + +DEFINE_STRING_TABLE_LOOKUP(kill_who, KillWho); |