[systemd-devel] [PATCH] Fsckd: only connect to plymouth if running
Lennart Poettering
lennart at poettering.net
Mon Mar 9 11:13:28 PDT 2015
On Mon, 09.03.15 13:49, Didier Roche (didrocks at ubuntu.com) wrote:
> Hey,
>
> use the systemd plymouth pid file detection to only try to send messages to
> plymouth if present.
> This prevent some warning spams which may confuse users as in
> https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1429171
This check should be done inside connect_plymouth() I figure, not
before each invocation of send_message_plymouth().
>
> Cheers,
> Didier
> >From 9ad48f85f7acc18fe1b5782058a8bb58014a3d16 Mon Sep 17 00:00:00 2001
> From: Didier Roche <didrocks at ubuntu.com>
> Date: Mon, 9 Mar 2015 13:44:39 +0100
> Subject: [PATCH] Fsckd: only connect to plymouth if running
>
> Ensure that we are not trying to send plymouth messages if the plymouth pid
> file is not present.
> ---
> src/fsckd/fsckd.c | 8 +++++---
> 1 file changed, 5 insertions(+), 3 deletions(-)
>
> diff --git a/src/fsckd/fsckd.c b/src/fsckd/fsckd.c
> index 834476c..4362e10 100644
> --- a/src/fsckd/fsckd.c
> +++ b/src/fsckd/fsckd.c
> @@ -238,9 +238,11 @@ static int update_global_progress(Manager *m) {
> }
>
> /* try to connect to plymouth and send message */
> - r = send_message_plymouth(m, fsck_message);
> - if (r < 0)
> - log_debug("Couldn't send message to plymouth");
> + if (plymouth_running()) {
> + r = send_message_plymouth(m, fsck_message);
> + if (r < 0)
> + log_debug("Couldn't send message to plymouth");
> + }
>
> if (l > m->clear)
> m->clear = l;
> --
> 2.1.4
>
> _______________________________________________
> systemd-devel mailing list
> systemd-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Lennart
--
Lennart Poettering, Red Hat
More information about the systemd-devel
mailing list