aboutsummaryrefslogtreecommitdiffstats
path: root/sway/commands/exit.c
diff options
context:
space:
mode:
authorLibravatar emersion <contact@emersion.fr>2017-12-05 10:40:55 +0100
committerLibravatar emersion <contact@emersion.fr>2017-12-05 10:40:55 +0100
commit90f7f1a0e61fa20ed1b74b9df057aa70abc791ed (patch)
treee201e4fb9fef471dd2fcf9581e26addfe3550502 /sway/commands/exit.c
parentMerge pull request #1497 from emersion/cmd-exec (diff)
downloadsway-90f7f1a0e61fa20ed1b74b9df057aa70abc791ed.tar.gz
sway-90f7f1a0e61fa20ed1b74b9df057aa70abc791ed.tar.zst
sway-90f7f1a0e61fa20ed1b74b9df057aa70abc791ed.zip
Add minimal config subsystem
Diffstat (limited to 'sway/commands/exit.c')
-rw-r--r--sway/commands/exit.c4
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
4void sway_terminate(int exit_code); 5void sway_terminate(int exit_code);
5 6
6struct cmd_results *cmd_exit(int argc, char **argv) { 7struct 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