util: add wlr_ prefix to log symbols

This commit is contained in:
emersion 2018-07-09 22:49:54 +01:00
parent ffc8780893
commit 7cbef15206
No known key found for this signature in database
GPG key ID: 0FDE7BE0E88F5E48
98 changed files with 631 additions and 629 deletions

View file

@ -26,7 +26,7 @@ static const struct libinput_interface libinput_impl = {
static int handle_libinput_readable(int fd, uint32_t mask, void *_backend) {
struct wlr_libinput_backend *backend = _backend;
if (libinput_dispatch(backend->libinput_context) != 0) {
wlr_log(L_ERROR, "Failed to dispatch libinput");
wlr_log(WLR_ERROR, "Failed to dispatch libinput");
// TODO: some kind of abort?
return 0;
}
@ -40,24 +40,24 @@ static int handle_libinput_readable(int fd, uint32_t mask, void *_backend) {
static void log_libinput(struct libinput *libinput_context,
enum libinput_log_priority priority, const char *fmt, va_list args) {
_wlr_vlog(L_ERROR, fmt, args);
_wlr_vlog(WLR_ERROR, fmt, args);
}
static bool backend_start(struct wlr_backend *_backend) {
struct wlr_libinput_backend *backend =
(struct wlr_libinput_backend *)_backend;
wlr_log(L_DEBUG, "Initializing libinput");
wlr_log(WLR_DEBUG, "Initializing libinput");
backend->libinput_context = libinput_udev_create_context(&libinput_impl,
backend, backend->session->udev);
if (!backend->libinput_context) {
wlr_log(L_ERROR, "Failed to create libinput context");
wlr_log(WLR_ERROR, "Failed to create libinput context");
return false;
}
if (libinput_udev_assign_seat(backend->libinput_context,
backend->session->seat) != 0) {
wlr_log(L_ERROR, "Failed to assign libinput seat");
wlr_log(WLR_ERROR, "Failed to assign libinput seat");
return false;
}
@ -75,8 +75,8 @@ static bool backend_start(struct wlr_backend *_backend) {
if (!no_devs && backend->wlr_device_lists.length == 0) {
handle_libinput_readable(libinput_fd, WL_EVENT_READABLE, backend);
if (backend->wlr_device_lists.length == 0) {
wlr_log(L_ERROR, "libinput initialization failed, no input devices");
wlr_log(L_ERROR, "Set WLR_LIBINPUT_NO_DEVICES=1 to suppress this check");
wlr_log(WLR_ERROR, "libinput initialization failed, no input devices");
wlr_log(WLR_ERROR, "Set WLR_LIBINPUT_NO_DEVICES=1 to suppress this check");
return false;
}
}
@ -89,10 +89,10 @@ static bool backend_start(struct wlr_backend *_backend) {
backend->input_event = wl_event_loop_add_fd(event_loop, libinput_fd,
WL_EVENT_READABLE, handle_libinput_readable, backend);
if (!backend->input_event) {
wlr_log(L_ERROR, "Failed to create input event on event loop");
wlr_log(WLR_ERROR, "Failed to create input event on event loop");
return false;
}
wlr_log(L_DEBUG, "libinput successfully initialized");
wlr_log(WLR_DEBUG, "libinput successfully initialized");
return true;
}
@ -162,13 +162,13 @@ struct wlr_backend *wlr_libinput_backend_create(struct wl_display *display,
struct wlr_libinput_backend *backend = calloc(1, sizeof(struct wlr_libinput_backend));
if (!backend) {
wlr_log(L_ERROR, "Allocation failed: %s", strerror(errno));
wlr_log(WLR_ERROR, "Allocation failed: %s", strerror(errno));
return NULL;
}
wlr_backend_init(&backend->backend, &backend_impl);
if (!wlr_list_init(&backend->wlr_device_lists)) {
wlr_log(L_ERROR, "Allocation failed: %s", strerror(errno));
wlr_log(WLR_ERROR, "Allocation failed: %s", strerror(errno));
goto error_backend;
}