common/rc: Enable _format_swapfile to return the swap size
authorCarlos Maiolino <cmaiolino@redhat.com>
Wed, 10 Nov 2021 12:41:18 +0000 (13:41 +0100)
committerEryu Guan <guaneryu@gmail.com>
Sun, 14 Nov 2021 12:18:59 +0000 (20:18 +0800)
commitbb0ab7b292b4259b50006305ec5fcf5fbe0ab8b3
treea29056310bc653e9ab88cc266d16899f042eaf1c
parente429c4aa559926be86762c08a06ce2569731a170
common/rc: Enable _format_swapfile to return the swap size

Once the kernel is free to not map the full swap file during a swapon call,
it can be useful to know the exact size of the swap area created during
_format_swapfile().

To achieve this, it is needed to change other _format_swapfile() callers to drop
the return value if not required, otherwise, it will be printed to stdout making
such tests to fail.

Signed-off-by: Carlos Maiolino <cmaiolino@redhat.com>
Reviewed-by: Eryu Guan <guaneryu@gmail.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
12 files changed:
common/rc
tests/btrfs/173
tests/btrfs/174
tests/btrfs/175
tests/btrfs/176
tests/btrfs/177
tests/generic/356
tests/generic/357
tests/generic/493
tests/generic/494
tests/generic/554
tests/generic/569