Skip to content
Commit 6a8aed70 authored by Lennart Poettering's avatar Lennart Poettering Committed by Zbigniew Jędrzejewski-Szmek
Browse files

sleep: rework what we do if a suspend fails.

First of all, let's fix logging: let's simply log the same message as we
do on success, so that there's always the same pair of these messages
around, regardless if the suspend was successful or not. To distuingish
a successful suspend from a failed one, check the ERRNO= field of the
structured message.

In most ways a failed suspend cycle is not distuingishable from a
successful one that took no time, hence let's treat it this way, and
always pair the success message with a failure message.

This also changes a more important concept: the post-suspend callouts
are now called also called on failure, following the same logic: let's
always run them in pairs: for every pre callout a post callout has to
follow.

(cherry picked from commit 14250f09)
parent 252eee75
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment