]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
lib/blkdev: use 64-bit to count size in bytes
authorKarel Zak <kzak@redhat.com>
Wed, 5 Aug 2015 10:40:35 +0000 (12:40 +0200)
committerKarel Zak <kzak@redhat.com>
Wed, 5 Aug 2015 10:40:35 +0000 (12:40 +0200)
Signed-off-by: Karel Zak <kzak@redhat.com>
lib/blkdev.c

index c4ebfaba002df0b3cd8a87a9e16cca89a6a2bed5..5f495822ee42979216a365117f6d36407861655b 100644 (file)
@@ -124,7 +124,7 @@ blkdev_get_size(int fd, unsigned long long *bytes)
                struct floppy_struct this_floppy;
 
                if (ioctl(fd, FDGETPRM, &this_floppy) >= 0) {
-                       *bytes = this_floppy.size << 9;
+                       *bytes = ((unsigned long long) this_floppy.size) << 9;
                        return 0;
                }
        }