xwayland/launcher: Use %m instead of manual strerror(errno)
This commit is contained in:
parent
13600c02af
commit
4783739f39
@ -213,8 +213,7 @@ bind_to_abstract_socket(int display)
|
|||||||
"%c/tmp/.X11-unix/X%d", 0, display);
|
"%c/tmp/.X11-unix/X%d", 0, display);
|
||||||
size = offsetof(struct sockaddr_un, sun_path) + name_size;
|
size = offsetof(struct sockaddr_un, sun_path) + name_size;
|
||||||
if (bind(fd, (struct sockaddr *) &addr, size) < 0) {
|
if (bind(fd, (struct sockaddr *) &addr, size) < 0) {
|
||||||
weston_log("failed to bind to @%s: %s\n",
|
weston_log("failed to bind to @%s: %m\n", addr.sun_path + 1);
|
||||||
addr.sun_path + 1, strerror(errno));
|
|
||||||
close(fd);
|
close(fd);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
@ -244,8 +243,7 @@ bind_to_unix_socket(int display)
|
|||||||
size = offsetof(struct sockaddr_un, sun_path) + name_size;
|
size = offsetof(struct sockaddr_un, sun_path) + name_size;
|
||||||
unlink(addr.sun_path);
|
unlink(addr.sun_path);
|
||||||
if (bind(fd, (struct sockaddr *) &addr, size) < 0) {
|
if (bind(fd, (struct sockaddr *) &addr, size) < 0) {
|
||||||
weston_log("failed to bind to %s (%s)\n",
|
weston_log("failed to bind to %s: %m\n", addr.sun_path);
|
||||||
addr.sun_path, strerror(errno));
|
|
||||||
close(fd);
|
close(fd);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user