]> git.ipfire.org Git - thirdparty/util-linux.git/commit
swapoff: cleanup EXIT STATUS
authorKarel Zak <kzak@redhat.com>
Wed, 27 May 2020 16:58:30 +0000 (18:58 +0200)
committerKarel Zak <kzak@redhat.com>
Wed, 27 May 2020 16:58:30 +0000 (18:58 +0200)
commitecfa4dad6f7d338a61417763252d8778e60c1f35
treeef2a0b1633cee24338fb96132098792ee04b5bbf
parentc7fce443b19cf027e635cfb5091cc7bc3da44d1b
swapoff: cleanup EXIT STATUS

The current code hides details about reason why swapoff(8) and swapoff(2) failed. For example
ENOMEM from swapoff(2) is important as it indicates OOM.

The patch also clean ups --all return codes to be more compatible for
example with [u]mount --all, etc.

Addresses: https://github.com/karelzak/util-linux/issues/1050
Signed-off-by: Karel Zak <kzak@redhat.com>
sys-utils/swapoff.c
sys-utils/swapon.8