From: Karel Zak Date: Tue, 16 Feb 2010 12:48:09 +0000 (+0100) Subject: swapon: fix swapsize calculation X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5bcf9f0c81fe1a28902dd3893faca1ff494a8ef8;p=util-linux swapon: fix swapsize calculation Reported-by: Peter Breitenlohner Signed-off-by: Karel Zak --- 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