diff options
author | Ian Fan <ianfan0@gmail.com> | 2019-01-24 11:32:49 +0000 |
---|---|---|
committer | Ian Fan <ianfan0@gmail.com> | 2019-01-24 11:33:54 +0000 |
commit | 5d6f906bd789f40fb0c58398909cfb39d44d4456 (patch) | |
tree | ba85cc3d475bd57cfe310c5783ebe4e417a17164 /sway/commands | |
parent | Update for swaywm/wlroots#1402 (diff) | |
download | sway-5d6f906bd789f40fb0c58398909cfb39d44d4456.tar.gz sway-5d6f906bd789f40fb0c58398909cfb39d44d4456.tar.zst sway-5d6f906bd789f40fb0c58398909cfb39d44d4456.zip |
Use sway_log_errno instead of strerror
Diffstat (limited to 'sway/commands')
-rw-r--r-- | sway/commands/output/background.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sway/commands/output/background.c b/sway/commands/output/background.c index affa04ea..f65904bb 100644 --- a/sway/commands/output/background.c +++ b/sway/commands/output/background.c | |||
@@ -1,5 +1,7 @@ | |||
1 | #define _POSIX_C_SOURCE 200809 | 1 | #define _POSIX_C_SOURCE 200809L |
2 | #include <libgen.h> | 2 | #include <libgen.h> |
3 | #include <stdio.h> | ||
4 | #include <string.h> | ||
3 | #include <strings.h> | 5 | #include <strings.h> |
4 | #include <unistd.h> | 6 | #include <unistd.h> |
5 | #include <wordexp.h> | 7 | #include <wordexp.h> |
@@ -112,8 +114,8 @@ struct cmd_results *output_cmd_background(int argc, char **argv) { | |||
112 | 114 | ||
113 | bool can_access = access(src, F_OK) != -1; | 115 | bool can_access = access(src, F_OK) != -1; |
114 | if (!can_access) { | 116 | if (!can_access) { |
115 | sway_log(SWAY_ERROR, "Unable to access background file '%s': %s", | 117 | sway_log_errno(SWAY_ERROR, "Unable to access background file '%s'", |
116 | src, strerror(errno)); | 118 | src); |
117 | config_add_swaynag_warning("Unable to access background file '%s'", | 119 | config_add_swaynag_warning("Unable to access background file '%s'", |
118 | src); | 120 | src); |
119 | free(src); | 121 | free(src); |