BLKGETSIZE ioctl uses unsigned long, not long for the size parameter.

Thus the maximum supported device is 2 TB on 32 bit platforms
instead of only 1 TB.


(Logical change 1.277)
edge.strict_endians
omakaista.fi!szaka 2004-02-17 03:40:22 +00:00
parent 9a18a4a5ed
commit 46f0709d29
1 changed files with 1 additions and 1 deletions

View File

@ -903,7 +903,7 @@ static s64 device_size_get(int fd)
{
s64 high, low;
#ifdef BLKGETSIZE
long size;
unsigned long size;
if (ioctl(fd, BLKGETSIZE, &size) >= 0) {
Dprintf("BLKGETSIZE nr 512 byte blocks = %ld (0x%ld)\n", size,