]> git.ipfire.org Git - thirdparty/e2fsprogs.git/commitdiff
getsize.c (blkid_get_dev_size): Fix compilation problem on
authorTheodore Ts'o <tytso@mit.edu>
Thu, 17 Mar 2005 04:38:14 +0000 (23:38 -0500)
committerTheodore Ts'o <tytso@mit.edu>
Thu, 17 Mar 2005 04:38:14 +0000 (23:38 -0500)
Darwin systems.

lib/blkid/ChangeLog
lib/blkid/getsize.c

index 43d2863f5151d898d694f48b6bea931563977b55..0fc2b417007ac73800e6c67e4a3807fd61d30a34 100644 (file)
@@ -1,3 +1,8 @@
+2005-03-16  Theodore Ts'o  <tytso@mit.edu>
+
+       * getsize.c (blkid_get_dev_size): Fix compilation problem on
+               Darwin systems.
+
 2006-02-05  Theodore Ts'o  <tytso@mit.edu>
 
        * Release of E2fsprogs 1.36
index 978097d0536c1a0480bba8e9c5818240919610e5..d45e1c2b860ed8850aecf2b679d088203dac2225 100644 (file)
@@ -92,7 +92,7 @@ blkid_loff_t blkid_get_dev_size(int fd)
 #ifdef DKIOCGETBLOCKCOUNT      /* For Apple Darwin */
        if (ioctl(fd, DKIOCGETBLOCKCOUNT, &size64) >= 0) {
                if ((sizeof(blkid_loff_t) < sizeof(unsigned long long))
-                   && ((size64 / (blocksize / 512)) > 0xFFFFFFFF))
+                   && (size64 << 9 > 0xFFFFFFFF))
                        return 0; /* EFBIG */
                return (blkid_loff_t) size64 << 9;
        }