]> err.no Git - util-linux/commitdiff
swapon: fix swapsize calculation
authorKarel Zak <kzak@redhat.com>
Tue, 16 Feb 2010 12:48:09 +0000 (13:48 +0100)
committerKarel Zak <kzak@redhat.com>
Mon, 22 Feb 2010 08:42:43 +0000 (09:42 +0100)
Reported-by: Peter Breitenlohner <peb@mppmu.mpg.de>
Signed-off-by: Karel Zak <kzak@redhat.com>
mount/swapon.c

index 75ba86533e3a023592206fe7f2a041d374e79a4c..5574f7ea63b15f061bcd196873e4e4d483eac6ad 100644 (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