From 5bcf9f0c81fe1a28902dd3893faca1ff494a8ef8 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Tue, 16 Feb 2010 13:48:09 +0100 Subject: [PATCH] swapon: fix swapsize calculation Reported-by: Peter Breitenlohner Signed-off-by: Karel Zak --- mount/swapon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mount/swapon.c b/mount/swapon.c index 75ba8653..5574f7ea 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 -- 2.39.5