chiark / gitweb /
plymouth: use updated socket name
authorLennart Poettering <lennart@poettering.net>
Tue, 16 Nov 2010 02:12:54 +0000 (03:12 +0100)
committerLennart Poettering <lennart@poettering.net>
Tue, 16 Nov 2010 02:12:54 +0000 (03:12 +0100)
TODO
src/manager.c
src/tty-ask-password-agent.c

diff --git a/TODO b/TODO
index 69670d3a543134c67d34300df2b81043d4da4469..12cf78325c28d38c805161f4176ae73076e594e8 100644 (file)
--- a/TODO
+++ b/TODO
@@ -57,8 +57,6 @@
 
 * 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
 
 * add seperate man page for [Install] settings
index 25d85eaf110727f2d790a85a447e0eb92533979f..827e9937c65af551456a24142fd4851c84f6a72f 100644 (file)
@@ -2447,8 +2447,8 @@ void manager_send_unit_plymouth(Manager *m, Unit *u) {
 
         zero(sa);
         sa.sa.sa_family = AF_UNIX;
-        strncpy(sa.un.sun_path+1, "/ply-boot-protocol", sizeof(sa.un.sun_path)-1);
-        if (connect(fd, &sa.sa, sizeof(sa.un)) < 0) {
+        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 (errno != EPIPE &&
                     errno != EAGAIN &&
index 1d17e2289ec7a185342019b81aa7cd24948283a5..d389c98a4886f194c4887bb3b39eb484dac41728 100644 (file)
@@ -80,9 +80,9 @@ static int ask_password_plymouth(const char *message, usec_t until, const char *
 
         zero(sa);
         sa.sa.sa_family = AF_UNIX;
-        strncpy(sa.un.sun_path+1, "/ply-boot-protocol", sizeof(sa.un.sun_path)-1);
-
-        if (connect(fd, &sa.sa, sizeof(sa.un)) < 0) {
+        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) {
+                log_error("FIALED TO CONNECT: %m");
                 r = -errno;
                 goto finish;
         }
@@ -481,7 +481,7 @@ static int watch_passwords(void) {
 
         for (;;) {
                 if ((r = show_passwords()) < 0)
-                        break;
+                        goto finish;
 
                 if (poll(pollfd, _FD_MAX, -1) < 0) {
 
@@ -614,6 +614,9 @@ int main(int argc, char *argv[]) {
         else
                 r = show_passwords();
 
+        if (r < 0)
+                log_error("Error: %s", strerror(-r));
+
 finish:
         return r < 0 ? EXIT_FAILURE : EXIT_SUCCESS;
 }