diff options
author | Brian Ashworth <bosrsf04@gmail.com> | 2019-01-14 11:44:18 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-01-14 11:44:18 -0500 |
commit | 15cd8b6a86295a445a1037afd0028b1226a14c82 (patch) | |
tree | 56332b9c150459beb5aef94605372ef179ec8854 /sway/commands/output/background.c | |
parent | 64ef9366733d6d332a24897f72eba90ba2adca1e (diff) | |
parent | 2a684cad5fc8e12a8e47a7fd00e2b7c66b43afb0 (diff) |
Merge pull request #3403 from mstoeckl/ipcleanup
Remove 'input' field of IPC command return json
Diffstat (limited to 'sway/commands/output/background.c')
-rw-r--r-- | sway/commands/output/background.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/sway/commands/output/background.c b/sway/commands/output/background.c index 2cd1b76a..ae2f0640 100644 --- a/sway/commands/output/background.c +++ b/sway/commands/output/background.c @@ -20,14 +20,14 @@ static const char *bg_options[] = { struct cmd_results *output_cmd_background(int argc, char **argv) { if (!config->handler_context.output_config) { - return cmd_results_new(CMD_FAILURE, "output", "Missing output config"); + return cmd_results_new(CMD_FAILURE, "Missing output config"); } if (!argc) { - return cmd_results_new(CMD_INVALID, "output", + return cmd_results_new(CMD_INVALID, "Missing background file or color specification."); } if (argc < 2) { - return cmd_results_new(CMD_INVALID, "output", + return cmd_results_new(CMD_INVALID, "Missing background scaling mode or `solid_color`."); } @@ -57,7 +57,7 @@ struct cmd_results *output_cmd_background(int argc, char **argv) { } } if (!valid) { - return cmd_results_new(CMD_INVALID, "output", + return cmd_results_new(CMD_INVALID, "Missing background scaling mode."); } @@ -70,7 +70,7 @@ struct cmd_results *output_cmd_background(int argc, char **argv) { *ptr = '\\'; } if (wordexp(src, &p, 0) != 0 || p.we_wordv[0] == NULL) { - struct cmd_results *cmd_res = cmd_results_new(CMD_INVALID, "output", + struct cmd_results *cmd_res = cmd_results_new(CMD_INVALID, "Invalid syntax (%s)", src); free(src); wordfree(&p); @@ -81,8 +81,7 @@ struct cmd_results *output_cmd_background(int argc, char **argv) { wordfree(&p); if (!src) { wlr_log(WLR_ERROR, "Failed to duplicate string"); - return cmd_results_new(CMD_FAILURE, "output", - "Unable to allocate resource"); + return cmd_results_new(CMD_FAILURE, "Unable to allocate resource"); } if (config->reading && *src != '/') { @@ -92,7 +91,7 @@ struct cmd_results *output_cmd_background(int argc, char **argv) { if (!conf) { wlr_log(WLR_ERROR, "Failed to duplicate string"); free(src); - return cmd_results_new(CMD_FAILURE, "output", + return cmd_results_new(CMD_FAILURE, "Unable to allocate resources"); } @@ -103,7 +102,7 @@ struct cmd_results *output_cmd_background(int argc, char **argv) { free(rel_path); free(conf); wlr_log(WLR_ERROR, "Unable to allocate memory"); - return cmd_results_new(CMD_FAILURE, "output", + return cmd_results_new(CMD_FAILURE, "Unable to allocate resources"); } |