mirror of
https://github.com/systemd/systemd.git
synced 2026-11-06 05:17:24 +00:00
shutdown: return correct errors after pipe2()
The functions returned -EPERM for every failure. The callers only test for a negative value, so this is cosmetic.
This commit is contained in:
1 parent
8087660ccc
commit
4a2967f950
1 file changed
+4
-6
@@ -255,9 +255,8 @@ static int remount_with_timeout(MountPoint *m, bool last_try) {
|
||||
|
||||
assert(m);
|
||||
|
||||
r = pipe2(pfd, O_CLOEXEC|O_NONBLOCK);
|
||||
if (r < 0)
|
||||
return r;
|
||||
if (pipe2(pfd, O_CLOEXEC|O_NONBLOCK) < 0)
|
||||
return -errno;
|
||||
|
||||
/* Due to the possibility of a remount operation hanging, we fork a child process and set a
|
||||
* timeout. If the timeout lapses, the assumption is that the particular remount failed. */
|
||||
@@ -317,9 +316,8 @@ static int umount_with_timeout(MountPoint *m, bool last_try) {
|
||||
|
||||
assert(m);
|
||||
|
||||
r = pipe2(pfd, O_CLOEXEC|O_NONBLOCK);
|
||||
if (r < 0)
|
||||
return r;
|
||||
if (pipe2(pfd, O_CLOEXEC|O_NONBLOCK) < 0)
|
||||
return -errno;
|
||||
|
||||
/* Due to the possibility of a umount operation hanging, we fork a child process and set a
|
||||
* timeout. If the timeout lapses, the assumption is that the particular umount failed. */
|
||||
|
||||
Reference in new issue
Block a user