[systemd-devel] [PATCH 5/5] fsckd: clean up log messages
Lennart Poettering
lennart at poettering.net
Tue Mar 10 03:46:16 PDT 2015
On Tue, 10.03.15 11:34, Didier Roche (didrocks at ubuntu.com) wrote:
Looks good! Applied!
> >From 32c1aec9bddf21b1380eb8f7b801468d3875e2a9 Mon Sep 17 00:00:00 2001
> From: Didier Roche <didrocks at ubuntu.com>
> Date: Tue, 10 Mar 2015 10:18:00 +0100
> Subject: [PATCH 5/5] fsckd: clean up log messages
> MIME-Version: 1.0
> Content-Type: text/plain; charset=UTF-8
> Content-Transfer-Encoding: 8bit
>
> Avoid double logs printing. Not that we don't return
> manager_update_global_progress() to the handler callback as if the console or
> plymouth isn't available momentarily, we still desire to handle future
> fd progress events if those are available again (like cancellation, reports???)
> ---
> src/fsckd/fsckd.c | 11 +++--------
> 1 file changed, 3 insertions(+), 8 deletions(-)
>
> diff --git a/src/fsckd/fsckd.c b/src/fsckd/fsckd.c
> index 52d69cd..5e5784b 100644
> --- a/src/fsckd/fsckd.c
> +++ b/src/fsckd/fsckd.c
> @@ -354,8 +354,7 @@ static int manager_update_global_progress(Manager *m) {
> /* try to connect to plymouth and send message */
> r = manager_send_plymouth_message(m, fsck_message);
> if (r < 0)
> - log_debug("Couldn't send message to plymouth");
> -
> + return r;
> }
> return 0;
> }
> @@ -384,9 +383,7 @@ static int client_progress_handler(sd_event_source *s, int fd, uint32_t revents,
> else {
> log_warning("Closing bad behaving fsck client connection at fd %d", client->fd);
> client_free(client);
> - r = manager_update_global_progress(m);
> - if (r < 0)
> - log_warning_errno(r, "Couldn't update global progress: %m");
> + manager_update_global_progress(m);
> }
> return 0;
> }
> @@ -410,9 +407,7 @@ static int client_progress_handler(sd_event_source *s, int fd, uint32_t revents,
> } else
> log_error_errno(r, "Unknown error while trying to read fsck data: %m");
>
> - r = manager_update_global_progress(m);
> - if (r < 0)
> - log_warning_errno(r, "Couldn't update global progress: %m");
> + manager_update_global_progress(m);
>
> return 0;
> }
> --
> 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