diff options
author | Ivan Kruglov <mail@ikruglov.com> | 2024-11-06 11:12:28 +0100 |
---|---|---|
committer | Ivan Kruglov <mail@ikruglov.com> | 2024-11-06 11:18:38 +0100 |
commit | f72a64f3525a5aa26829e17ef8c8214534f677da (patch) | |
tree | d43eb455c8d2c5b1320826c8c3e7460f49f49ae0 /src/shutdown/umount.c | |
parent | process-util: introduce report_errno_and_exit() as part of src/basic/process-... (diff) | |
download | systemd-f72a64f3525a5aa26829e17ef8c8214534f677da.tar.xz systemd-f72a64f3525a5aa26829e17ef8c8214534f677da.zip |
use report_errno_and_exit() in src/shutdown/umount.c
Diffstat (limited to '')
-rw-r--r-- | src/shutdown/umount.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/shutdown/umount.c b/src/shutdown/umount.c index ca6d36e054..4bc01c75e0 100644 --- a/src/shutdown/umount.c +++ b/src/shutdown/umount.c @@ -274,8 +274,7 @@ static int remount_with_timeout(MountPoint *m, bool last_try) { "Failed to remount '%s' read-only: %m", m->path); - (void) write(pfd[1], &r, sizeof(r)); /* try to send errno up */ - _exit(r < 0 ? EXIT_FAILURE : EXIT_SUCCESS); + report_errno_and_exit(pfd[1], r); } pfd[1] = safe_close(pfd[1]); @@ -337,8 +336,7 @@ static int umount_with_timeout(MountPoint *m, bool last_try) { log_umount_blockers(m->path); } - (void) write(pfd[1], &r, sizeof(r)); /* try to send errno up */ - _exit(r < 0 ? EXIT_FAILURE : EXIT_SUCCESS); + report_errno_and_exit(pfd[1], r); } pfd[1] = safe_close(pfd[1]); |