swapon: fix swapsize calculation

Reported-by: Peter Breitenlohner <peb@mppmu.mpg.de>
Signed-off-by: Karel Zak <kzak@redhat.com>
This commit is contained in:
Karel Zak 2010-02-16 13:48:09 +01:00
parent 4fc5d65bf2
commit 98e9ff610e
1 changed files with 1 additions and 1 deletions

View File

@ -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