summaryrefslogtreecommitdiff
path: root/sway/commands.c
diff options
context:
space:
mode:
authorLuminarys <[email protected]>2015-08-10 14:00:10 -0500
committerLuminarys <[email protected]>2015-08-10 14:00:10 -0500
commit68beabda0382e63d2c0101d78893eb20967dbe43 (patch)
treeee5c0888ac1a638d03943545be12f5c39440d659 /sway/commands.c
parentc0ee2a64065f3a9953e977e517a466361444c144 (diff)
Style fixes and slight reload command alteration
Diffstat (limited to 'sway/commands.c')
-rw-r--r--sway/commands.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sway/commands.c b/sway/commands.c
index df394901..5ed5e070 100644
--- a/sway/commands.c
+++ b/sway/commands.c
@@ -80,7 +80,7 @@ int cmd_exec(struct sway_config *config, int argc, char **argv) {
}
if (config->reloading) {
- sway_log(L_DEBUG, "Ignoring exec %s due to reload", join_args(argv, argc));
+ sway_log(L_DEBUG, "Ignoring exec %s due to reload", join_args(argv, argc));
return 0;
}
@@ -176,7 +176,7 @@ int cmd_layout(struct sway_config *config, int argc, char **argv) {
int cmd_reload(struct sway_config *config, int argc, char **argv) {
if (argc != 0) {
- sway_log(L_ERROR, "Invalid reload command (expected 1 arguments, got %d)", argc);
+ sway_log(L_ERROR, "Invalid reload command (expected 0 arguments, got %d)", argc);
return 1;
}
@@ -188,9 +188,9 @@ int cmd_reload(struct sway_config *config, int argc, char **argv) {
strcat(temp, name);
FILE *f = fopen(temp, "r");
if (!f) {
- fprintf(stderr, "Unable to open %s for reading", temp);
+ sway_log(L_ERROR, "Sway config file not found, aborting reload!");
free(temp);
- exit(1);
+ return 1;
}
free(temp);
config = read_config(f, true);