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=98e9ff610ed0a3a80a7478336acff99133199375;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