1
0
mirror of https://github.com/systemd/systemd.git synced 2024-12-23 21:35:11 +03:00

plymouth: use updated socket name

This commit is contained in:
Lennart Poettering 2010-11-16 03:12:54 +01:00
parent 180f90cb13
commit 967072694d
3 changed files with 9 additions and 8 deletions

2
TODO
View File

@ -57,8 +57,6 @@
* when processes remain in a service even though the start command failed enter active * when processes remain in a service even though the start command failed enter active
* fix plymouth socket name, when plymouth started to use a clean one
* parse early boot time env var from dracut RD_TIMEOUT, drop RD_xxx * parse early boot time env var from dracut RD_TIMEOUT, drop RD_xxx
* add seperate man page for [Install] settings * add seperate man page for [Install] settings

View File

@ -2447,8 +2447,8 @@ void manager_send_unit_plymouth(Manager *m, Unit *u) {
zero(sa); zero(sa);
sa.sa.sa_family = AF_UNIX; sa.sa.sa_family = AF_UNIX;
strncpy(sa.un.sun_path+1, "/ply-boot-protocol", sizeof(sa.un.sun_path)-1); strncpy(sa.un.sun_path+1, "/org/freedesktop/plymouthd", sizeof(sa.un.sun_path)-1);
if (connect(fd, &sa.sa, sizeof(sa.un)) < 0) { if (connect(fd, &sa.sa, offsetof(struct sockaddr_un, sun_path) + 1 + strlen(sa.un.sun_path+1)) < 0) {
if (errno != EPIPE && if (errno != EPIPE &&
errno != EAGAIN && errno != EAGAIN &&

View File

@ -80,9 +80,9 @@ static int ask_password_plymouth(const char *message, usec_t until, const char *
zero(sa); zero(sa);
sa.sa.sa_family = AF_UNIX; sa.sa.sa_family = AF_UNIX;
strncpy(sa.un.sun_path+1, "/ply-boot-protocol", sizeof(sa.un.sun_path)-1); strncpy(sa.un.sun_path+1, "/org/freedesktop/plymouthd", sizeof(sa.un.sun_path)-1);
if (connect(fd, &sa.sa, offsetof(struct sockaddr_un, sun_path) + 1 + strlen(sa.un.sun_path+1)) < 0) {
if (connect(fd, &sa.sa, sizeof(sa.un)) < 0) { log_error("FIALED TO CONNECT: %m");
r = -errno; r = -errno;
goto finish; goto finish;
} }
@ -481,7 +481,7 @@ static int watch_passwords(void) {
for (;;) { for (;;) {
if ((r = show_passwords()) < 0) if ((r = show_passwords()) < 0)
break; goto finish;
if (poll(pollfd, _FD_MAX, -1) < 0) { if (poll(pollfd, _FD_MAX, -1) < 0) {
@ -614,6 +614,9 @@ int main(int argc, char *argv[]) {
else else
r = show_passwords(); r = show_passwords();
if (r < 0)
log_error("Error: %s", strerror(-r));
finish: finish:
return r < 0 ? EXIT_FAILURE : EXIT_SUCCESS; return r < 0 ? EXIT_FAILURE : EXIT_SUCCESS;
} }