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

@ -38,7 +38,7 @@ static int direct_session_open(struct wlr_session *base, const char *path) {
int fd = direct_ipc_open(session->sock, path);
if (fd < 0) {
wlr_log(L_ERROR, "Failed to open %s: %s%s", path, strerror(-fd),
wlr_log(WLR_ERROR, "Failed to open %s: %s%s", path, strerror(-fd),
fd == -EINVAL ? "; is another display server running?" : "");
return fd;
}
@ -61,7 +61,7 @@ static void direct_session_close(struct wlr_session *base, int fd) {
struct stat st;
if (fstat(fd, &st) < 0) {
wlr_log_errno(L_ERROR, "Stat failed");
wlr_log_errno(WLR_ERROR, "Stat failed");
close(fd);
return;
}
@ -100,7 +100,7 @@ static void direct_session_destroy(struct wlr_session *base) {
ioctl(session->tty_fd, VT_SETMODE, &mode);
if (errno) {
wlr_log(L_ERROR, "Failed to restore tty");
wlr_log(WLR_ERROR, "Failed to restore tty");
}
wl_event_source_remove(session->vt_source);
@ -150,13 +150,13 @@ static int vt_handler(int signo, void *data) {
static bool setup_tty(struct direct_session *session, struct wl_display *display) {
int fd = open("/dev/tty", O_RDWR);
if (fd == -1) {
wlr_log_errno(L_ERROR, "Cannot open /dev/tty");
wlr_log_errno(WLR_ERROR, "Cannot open /dev/tty");
return false;
}
struct vt_stat vt_stat;
if (ioctl(fd, VT_GETSTATE, &vt_stat)) {
wlr_log_errno(L_ERROR, "Could not get current tty number");
wlr_log_errno(WLR_ERROR, "Could not get current tty number");
goto error;
}
@ -165,12 +165,12 @@ static bool setup_tty(struct direct_session *session, struct wl_display *display
ret = ioctl(fd, KDGETMODE, &kd_mode);
if (ret) {
wlr_log_errno(L_ERROR, "Failed to get tty mode");
wlr_log_errno(WLR_ERROR, "Failed to get tty mode");
goto error;
}
if (kd_mode != KD_TEXT) {
wlr_log(L_ERROR,
wlr_log(WLR_ERROR,
"tty already in graphics mode; is another display server running?");
goto error;
}
@ -179,17 +179,17 @@ static bool setup_tty(struct direct_session *session, struct wl_display *display
ioctl(fd, VT_WAITACTIVE, tty);
if (ioctl(fd, KDGKBMODE, &old_kbmode)) {
wlr_log_errno(L_ERROR, "Failed to read keyboard mode");
wlr_log_errno(WLR_ERROR, "Failed to read keyboard mode");
goto error;
}
if (ioctl(fd, KDSKBMODE, K_OFF)) {
wlr_log_errno(L_ERROR, "Failed to set keyboard mode");
wlr_log_errno(WLR_ERROR, "Failed to set keyboard mode");
goto error;
}
if (ioctl(fd, KDSETMODE, KD_GRAPHICS)) {
wlr_log_errno(L_ERROR, "Failed to set graphics mode on tty");
wlr_log_errno(WLR_ERROR, "Failed to set graphics mode on tty");
goto error;
}
@ -200,7 +200,7 @@ static bool setup_tty(struct direct_session *session, struct wl_display *display
};
if (ioctl(fd, VT_SETMODE, &mode) < 0) {
wlr_log(L_ERROR, "Failed to take control of tty");
wlr_log(WLR_ERROR, "Failed to take control of tty");
goto error;
}
@ -225,7 +225,7 @@ error:
static struct wlr_session *direct_session_create(struct wl_display *disp) {
struct direct_session *session = calloc(1, sizeof(*session));
if (!session) {
wlr_log_errno(L_ERROR, "Allocation failed");
wlr_log_errno(WLR_ERROR, "Allocation failed");
return NULL;
}
@ -251,7 +251,7 @@ static struct wlr_session *direct_session_create(struct wl_display *disp) {
snprintf(session->base.seat, sizeof(session->base.seat), "%s", seat);
session->base.impl = &session_direct;
wlr_log(L_INFO, "Successfully loaded direct session");
wlr_log(WLR_INFO, "Successfully loaded direct session");
return &session->base;
error_ipc: