mirror of
https://github.com/systemd/systemd.git
synced 2024-12-23 21:35:11 +03:00
exec-invoke: handle errno log message writing in write_confirm_error_fd() like we usually do
This commit is contained in:
parent
83e5672f90
commit
85f3957072
@ -694,15 +694,16 @@ static int setup_confirm_stdio(
|
||||
}
|
||||
|
||||
static void write_confirm_error_fd(int err, int fd, const char *unit_id) {
|
||||
assert(err < 0);
|
||||
assert(err != 0);
|
||||
assert(fd >= 0);
|
||||
assert(unit_id);
|
||||
|
||||
if (err == -ETIMEDOUT)
|
||||
errno = abs(err);
|
||||
|
||||
if (errno == ETIMEDOUT)
|
||||
dprintf(fd, "Confirmation question timed out for %s, assuming positive response.\n", unit_id);
|
||||
else {
|
||||
errno = -err;
|
||||
dprintf(fd, "Couldn't ask confirmation for %s: %m, assuming positive response.\n", unit_id);
|
||||
}
|
||||
else
|
||||
dprintf(fd, "Couldn't ask confirmation for %s, assuming positive response: %m\n", unit_id);
|
||||
}
|
||||
|
||||
static void write_confirm_error(int err, const char *vc, const char *unit_id) {
|
||||
|
Loading…
Reference in New Issue
Block a user