From aa0200c3ff6100c3fa3a7aa20a2264063d44837f Mon Sep 17 00:00:00 2001 From: Peter Rajnoha Date: Fri, 25 Oct 2024 12:47:26 +0200 Subject: [PATCH] dev-type: update comment about swap info from blkid --- lib/device/dev-type.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/device/dev-type.c b/lib/device/dev-type.c index ddbbc4f20..c29fb21a8 100644 --- a/lib/device/dev-type.c +++ b/lib/device/dev-type.c @@ -1005,8 +1005,8 @@ int fs_get_blkid(const char *pathname, struct fs_info *fsi) fsi->fs_last_byte = fssize; /* - * For swap, there's no FSLASTBLOCK reported by blkid. We do have FSSIZE reported though. - * The last block is then calculated as: + * For swap, FSLASTBLOCK is reported by blkid since v2.41 so use that directly. + * Otherwise, we do have FSSIZE reported since v2.39. Then. then last block is calculated as: * FSSIZE (== size of the usable swap area) + FSBLOCKSIZE (== size of the swap header) */ if (!strcmp(fsi->fstype, "swap"))