chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fsckd: the error code is actually returned in 'fd'
[elogind.git]
/
src
/
libsystemd-terminal
/
idev-keyboard.c
diff --git
a/src/libsystemd-terminal/idev-keyboard.c
b/src/libsystemd-terminal/idev-keyboard.c
index bcb2a4b1e239140d3798e2499225f35f3411f9ce..f90f1b56d553d8bc8f08239c7d1f6def9e523907 100644
(file)
--- a/
src/libsystemd-terminal/idev-keyboard.c
+++ b/
src/libsystemd-terminal/idev-keyboard.c
@@
-19,7
+19,6
@@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include <inttypes.h>
#include <stdbool.h>
#include <stdlib.h>
#include <systemd/sd-bus.h>
#include <stdbool.h>
#include <stdlib.h>
#include <systemd/sd-bus.h>
@@
-445,8
+444,7
@@
static int kbdctx_query_locale(kbdctx *kc) {
return 0;
error:
return 0;
error:
- log_debug_errno(r, "idev-keyboard: cannot send GetAll to locale1: %m");
- return r;
+ return log_debug_errno(r, "idev-keyboard: cannot send GetAll to locale1: %m");
}
static int kbdctx_locale_props_changed_fn(sd_bus *bus,
}
static int kbdctx_locale_props_changed_fn(sd_bus *bus,
@@
-477,8
+475,7
@@
static int kbdctx_locale_props_changed_fn(sd_bus *bus,
return 0;
error:
return 0;
error:
- log_debug_errno(r, "idev-keyboard: cannot handle PropertiesChanged from locale1: %m");
- return r;
+ return log_debug_errno(r, "idev-keyboard: cannot handle PropertiesChanged from locale1: %m");
}
static int kbdctx_setup_bus(kbdctx *kc) {
}
static int kbdctx_setup_bus(kbdctx *kc) {
@@
-493,10
+490,8
@@
static int kbdctx_setup_bus(kbdctx *kc) {
"path='/org/freedesktop/locale1'",
kbdctx_locale_props_changed_fn,
kc);
"path='/org/freedesktop/locale1'",
kbdctx_locale_props_changed_fn,
kc);
- if (r < 0) {
- log_debug_errno(r, "idev-keyboard: cannot setup locale1 link: %m");
- return r;
- }
+ if (r < 0)
+ return log_debug_errno(r, "idev-keyboard: cannot setup locale1 link: %m");
return kbdctx_query_locale(kc);
}
return kbdctx_query_locale(kc);
}
@@
-511,12
+506,9
@@
static void kbdctx_log_fn(struct xkb_context *ctx, enum xkb_log_level lvl, const
sd_lvl = LOG_INFO;
else if (lvl >= XKB_LOG_LEVEL_WARNING)
sd_lvl = LOG_INFO; /* most XKB warnings really are informational */
sd_lvl = LOG_INFO;
else if (lvl >= XKB_LOG_LEVEL_WARNING)
sd_lvl = LOG_INFO; /* most XKB warnings really are informational */
- else if (lvl >= XKB_LOG_LEVEL_ERROR)
- sd_lvl = LOG_ERR;
- else if (lvl >= XKB_LOG_LEVEL_CRITICAL)
- sd_lvl = LOG_CRIT;
else
else
- sd_lvl = LOG_CRIT;
+ /* XKB_LOG_LEVEL_ERROR and worse */
+ sd_lvl = LOG_ERR;
snprintf(buf, sizeof(buf), "idev-xkb: %s", format);
log_internalv(sd_lvl, 0, __FILE__, __LINE__, __func__, buf, args);
snprintf(buf, sizeof(buf), "idev-xkb: %s", format);
log_internalv(sd_lvl, 0, __FILE__, __LINE__, __func__, buf, args);
@@
-635,7
+627,7
@@
idev_device *idev_find_keyboard(idev_session *s, const char *name) {
assert_return(s, NULL);
assert_return(name, NULL);
assert_return(s, NULL);
assert_return(name, NULL);
- kname = str
append
a("keyboard/", name);
+ kname = str
join
a("keyboard/", name);
return hashmap_get(s->device_map, kname);
}
return hashmap_get(s->device_map, kname);
}
@@
-797,7
+789,7
@@
int idev_keyboard_new(idev_device **out, idev_session *s, const char *name) {
if (r < 0)
return r;
if (r < 0)
return r;
- kname = str
append
a("keyboard/", name);
+ kname = str
join
a("keyboard/", name);
r = idev_device_add(d, kname);
if (r < 0)
return r;
r = idev_device_add(d, kname);
if (r < 0)
return r;
@@
-1125,9
+1117,8
@@
static int keyboard_update_kbdmap(idev_keyboard *k) {
return 0;
error:
return 0;
error:
- log_debug_errno(r, "idev-keyboard: %s/%s: cannot adopt new keymap: %m",
- d->session->name, d->name);
- return r;
+ return log_debug_errno(r, "idev-keyboard: %s/%s: cannot adopt new keymap: %m",
+ d->session->name, d->name);
}
static int keyboard_update_kbdtbl(idev_keyboard *k) {
}
static int keyboard_update_kbdtbl(idev_keyboard *k) {