From cea669d73d47a59c8e0e6b43da1674c9f2c41edc Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Fri, 30 Jan 2004 11:28:13 +0000 Subject: the multiplication must be done with type "long long" otherwise it overflows at 4GB --- perl-install/c/stuff.xs.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'perl-install') diff --git a/perl-install/c/stuff.xs.pl b/perl-install/c/stuff.xs.pl index 252e889b7..79ba11acb 100644 --- a/perl-install/c/stuff.xs.pl +++ b/perl-install/c/stuff.xs.pl @@ -249,8 +249,8 @@ add_partition(hd, part_number, start_sector, size_sector) unsigned long size_sector CODE: { - long long start = start_sector * 512; - long long size = size_sector * 512; + long long start = (long long) start_sector * 512; + long long size = (long long) size_sector * 512; struct blkpg_partition p = { start, size, part_number, "", "" }; struct blkpg_ioctl_arg s = { BLKPG_ADD_PARTITION, 0, sizeof(struct blkpg_partition), (void *) &p }; RETVAL = ioctl(hd, BLKPG, &s) == 0; -- cgit v1.2.1