summaryrefslogtreecommitdiffstats
path: root/mount/swapon.c
diff options
context:
space:
mode:
authorKarel Zak2010-02-16 13:48:09 +0100
committerKarel Zak2010-02-16 13:48:09 +0100
commit98e9ff610ed0a3a80a7478336acff99133199375 (patch)
tree72476542ac9528a5adec503538eedb324a1b46a9 /mount/swapon.c
parentblkid: report open() errors in low-level probing (diff)
downloadkernel-qcow2-util-linux-98e9ff610ed0a3a80a7478336acff99133199375.tar.gz
kernel-qcow2-util-linux-98e9ff610ed0a3a80a7478336acff99133199375.tar.xz
kernel-qcow2-util-linux-98e9ff610ed0a3a80a7478336acff99133199375.zip
swapon: fix swapsize calculation
Reported-by: Peter Breitenlohner <peb@mppmu.mpg.de> Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'mount/swapon.c')
-rw-r--r--mount/swapon.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mount/swapon.c b/mount/swapon.c
index 75ba86533..5574f7ea6 100644
--- a/mount/swapon.c
+++ b/mount/swapon.c
@@ -354,7 +354,7 @@ swap_get_size(const char *hdr, const char *devname, unsigned int pagesize)
pagesize / 1024,
flip ? _("different") : _("same"));
- return (last_page + 1) * pagesize;
+ return ((unsigned long long) last_page + 1) * pagesize;
}
static int