summaryrefslogtreecommitdiffstats
path: root/perl-install/c/stuff.xs.pl
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2004-01-30 11:28:13 +0000
committerPascal Rigaux <pixel@mandriva.com>2004-01-30 11:28:13 +0000
commitcea669d73d47a59c8e0e6b43da1674c9f2c41edc (patch)
tree02e2f99f78b10b761c141c232841e0e2c130bd4d /perl-install/c/stuff.xs.pl
parentd6b267e25610b648ea95997db639dbac9d294a49 (diff)
downloaddrakx-cea669d73d47a59c8e0e6b43da1674c9f2c41edc.tar
drakx-cea669d73d47a59c8e0e6b43da1674c9f2c41edc.tar.gz
drakx-cea669d73d47a59c8e0e6b43da1674c9f2c41edc.tar.bz2
drakx-cea669d73d47a59c8e0e6b43da1674c9f2c41edc.tar.xz
drakx-cea669d73d47a59c8e0e6b43da1674c9f2c41edc.zip
the multiplication must be done with type "long long" otherwise it overflows at 4GB
Diffstat (limited to 'perl-install/c/stuff.xs.pl')
-rw-r--r--perl-install/c/stuff.xs.pl4
1 files changed, 2 insertions, 2 deletions
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;