diff options
Diffstat (limited to 'sway/commands/exit.c')
-rw-r--r-- | sway/commands/exit.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/sway/commands/exit.c b/sway/commands/exit.c index d294e344..4bb6a97b 100644 --- a/sway/commands/exit.c +++ b/sway/commands/exit.c | |||
@@ -1,19 +1,17 @@ | |||
1 | #include <stddef.h> | 1 | #include <stddef.h> |
2 | #include "sway/commands.h" | 2 | #include "sway/commands.h" |
3 | #include "sway/config.h" | ||
3 | 4 | ||
4 | void sway_terminate(int exit_code); | 5 | void sway_terminate(int exit_code); |
5 | 6 | ||
6 | struct cmd_results *cmd_exit(int argc, char **argv) { | 7 | struct cmd_results *cmd_exit(int argc, char **argv) { |
7 | struct cmd_results *error = NULL; | 8 | struct cmd_results *error = NULL; |
8 | /* TODO | ||
9 | if (config->reading) { | 9 | if (config->reading) { |
10 | return cmd_results_new(CMD_FAILURE, "exit", "Can't be used in config file."); | 10 | return cmd_results_new(CMD_FAILURE, "exit", "Can't be used in config file."); |
11 | } | 11 | } |
12 | */ | ||
13 | if ((error = checkarg(argc, "exit", EXPECTED_EQUAL_TO, 0))) { | 12 | if ((error = checkarg(argc, "exit", EXPECTED_EQUAL_TO, 0))) { |
14 | return error; | 13 | return error; |
15 | } | 14 | } |
16 | sway_terminate(0); | 15 | sway_terminate(0); |
17 | return cmd_results_new(CMD_SUCCESS, NULL, NULL); | 16 | return cmd_results_new(CMD_SUCCESS, NULL, NULL); |
18 | } | 17 | } |
19 | |||