aboutsummaryrefslogtreecommitdiff
path: root/xwayland/xwayland.c
diff options
context:
space:
mode:
Diffstat (limited to 'xwayland/xwayland.c')
-rw-r--r--xwayland/xwayland.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/xwayland/xwayland.c b/xwayland/xwayland.c
index 36d75845..1068b942 100644
--- a/xwayland/xwayland.c
+++ b/xwayland/xwayland.c
@@ -47,7 +47,7 @@ static void safe_close(int fd) {
static int unset_cloexec(int fd) {
if (fcntl(fd, F_SETFD, 0) != 0) {
- wlr_log_errno(L_ERROR, "fcntl() failed on fd %d", fd);
+ wlr_log_errno(WLR_ERROR, "fcntl() failed on fd %d", fd);
return -1;
}
return 0;
@@ -98,19 +98,19 @@ static void exec_xwayland(struct wlr_xwayland *wlr_xwayland) {
fill_arg(&cur_arg, "%d", wlr_xwayland->x_fd[0]) < 0 ||
fill_arg(&cur_arg, "%d", wlr_xwayland->x_fd[1]) < 0 ||
fill_arg(&cur_arg, "%d", wlr_xwayland->wm_fd[1]) < 0) {
- wlr_log_errno(L_ERROR, "alloc/print failure");
+ wlr_log_errno(WLR_ERROR, "alloc/print failure");
_exit(EXIT_FAILURE);
}
const char *xdg_runtime = getenv("XDG_RUNTIME_DIR");
const char *path_var = getenv("PATH");
if (!xdg_runtime) {
- wlr_log(L_ERROR, "XDG_RUNTIME_DIR is not set");
+ wlr_log(WLR_ERROR, "XDG_RUNTIME_DIR is not set");
_exit(EXIT_FAILURE);
}
if (clearenv()) {
- wlr_log_errno(L_ERROR, "clearenv failed");
+ wlr_log_errno(WLR_ERROR, "clearenv failed");
_exit(EXIT_FAILURE);
}
setenv("XDG_RUNTIME_DIR", xdg_runtime, true);
@@ -119,7 +119,7 @@ static void exec_xwayland(struct wlr_xwayland *wlr_xwayland) {
snprintf(wayland_socket_str, sizeof(wayland_socket_str), "%d", wlr_xwayland->wl_fd[1]);
setenv("WAYLAND_SOCKET", wayland_socket_str, true);
- wlr_log(L_INFO, "WAYLAND_SOCKET=%d Xwayland :%d -rootless -terminate -listen %d -listen %d -wm %d",
+ wlr_log(WLR_INFO, "WAYLAND_SOCKET=%d Xwayland :%d -rootless -terminate -listen %d -listen %d -wm %d",
wlr_xwayland->wl_fd[1], wlr_xwayland->display, wlr_xwayland->x_fd[0],
wlr_xwayland->x_fd[1], wlr_xwayland->wm_fd[1]);
@@ -207,10 +207,10 @@ static void handle_client_destroy(struct wl_listener *listener, void *data) {
if (time(NULL) - wlr_xwayland->server_start > 5) {
if (wlr_xwayland->lazy) {
- wlr_log(L_INFO, "Restarting Xwayland (lazy)");
+ wlr_log(WLR_INFO, "Restarting Xwayland (lazy)");
xwayland_start_server_lazy(wlr_xwayland);
} else {
- wlr_log(L_INFO, "Restarting Xwayland");
+ wlr_log(WLR_INFO, "Restarting Xwayland");
xwayland_start_server(wlr_xwayland);
}
}
@@ -237,14 +237,14 @@ static int xserver_handle_ready(int signal_number, void *data) {
if (errno == EINTR) {
continue;
}
- wlr_log_errno(L_ERROR, "waitpid for Xwayland fork failed");
+ wlr_log_errno(WLR_ERROR, "waitpid for Xwayland fork failed");
return 1;
}
if (stat_val) {
- wlr_log(L_ERROR, "Xwayland startup failed, not setting up xwm");
+ wlr_log(WLR_ERROR, "Xwayland startup failed, not setting up xwm");
return 1;
}
- wlr_log(L_DEBUG, "Xserver is ready");
+ wlr_log(WLR_DEBUG, "Xserver is ready");
wlr_xwayland->xwm = xwm_create(wlr_xwayland);
if (!wlr_xwayland->xwm) {
@@ -311,14 +311,14 @@ static bool xwayland_start_server(struct wlr_xwayland *wlr_xwayland) {
if (socketpair(AF_UNIX, SOCK_STREAM | SOCK_CLOEXEC, 0, wlr_xwayland->wl_fd) != 0 ||
socketpair(AF_UNIX, SOCK_STREAM | SOCK_CLOEXEC, 0, wlr_xwayland->wm_fd) != 0) {
- wlr_log_errno(L_ERROR, "failed to create socketpair");
+ wlr_log_errno(WLR_ERROR, "failed to create socketpair");
xwayland_finish_server(wlr_xwayland);
return false;
}
wlr_xwayland->server_start = time(NULL);
if (!(wlr_xwayland->client = wl_client_create(wlr_xwayland->wl_display, wlr_xwayland->wl_fd[0]))) {
- wlr_log_errno(L_ERROR, "wl_client_create failed");
+ wlr_log_errno(WLR_ERROR, "wl_client_create failed");
xwayland_finish_server(wlr_xwayland);
return false;
}
@@ -346,16 +346,16 @@ static bool xwayland_start_server(struct wlr_xwayland *wlr_xwayland) {
sigprocmask(SIG_BLOCK, &sigset, NULL);
if ((pid = fork()) == 0) {
exec_xwayland(wlr_xwayland);
- wlr_log_errno(L_ERROR, "failed to exec Xwayland");
+ wlr_log_errno(WLR_ERROR, "failed to exec Xwayland");
_exit(EXIT_FAILURE);
}
if (pid < 0) {
- wlr_log_errno(L_ERROR, "second fork failed");
+ wlr_log_errno(WLR_ERROR, "second fork failed");
_exit(EXIT_FAILURE);
}
sigwait(&sigset, &sig);
kill(ppid, SIGUSR1);
- wlr_log(L_DEBUG, "sent SIGUSR1 to process %d", ppid);
+ wlr_log(WLR_DEBUG, "sent SIGUSR1 to process %d", ppid);
if (sig == SIGCHLD) {
waitpid(pid, NULL, 0);
_exit(EXIT_FAILURE);
@@ -363,7 +363,7 @@ static bool xwayland_start_server(struct wlr_xwayland *wlr_xwayland) {
_exit(EXIT_SUCCESS);
}
if (wlr_xwayland->pid < 0) {
- wlr_log_errno(L_ERROR, "fork failed");
+ wlr_log_errno(WLR_ERROR, "fork failed");
xwayland_finish_server(wlr_xwayland);
return false;
}