]> git.ipfire.org Git - thirdparty/e2fsprogs.git/commitdiff
Don't close the file descriptor when determining the size.
authorTheodore Ts'o <tytso@mit.edu>
Mon, 22 Mar 2004 01:16:19 +0000 (20:16 -0500)
committerTheodore Ts'o <tytso@mit.edu>
Mon, 22 Mar 2004 01:16:19 +0000 (20:16 -0500)
This bug was introduced in the previous getsize changes,
and was screwing up the blkid library probe functions.
(Addresses Debian Bug #239191)

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

index 51647b48ccd778143a9b0df209733ad68c9d7a0b..544c0dfe67ba3973aef9a79beeb24d227ed9384e 100644 (file)
@@ -1,3 +1,10 @@
+2004-03-21  Theodore Ts'o  <tytso@mit.edu>
+
+       * getsize.c (blkid_get_dev_size): Don't close the file descriptor
+               when determining the size.  This bug was introduced in the
+               previous getsize changes, and was screwing up the blkid
+               library probe functions.  (Addresses Debian Bug #239191)
+
 2004-03-08  Theodore Ts'o  <tytso@mit.edu>
 
        * getsize.c (blkid_get_dev_size): Only use the BLKGETSIZE64 ioctl
index b099e4e88b8f06386c5a1afe823e604bab60438f..5d389e3ffe0e771f5f2ce06fdf7ac6eccf7f6b26 100644 (file)
@@ -89,7 +89,6 @@ blkid_loff_t blkid_get_dev_size(int fd)
                if ((sizeof(blkid_loff_t) < sizeof(unsigned long long))
                    && ((size64 / (blocksize / 512)) > 0xFFFFFFFF))
                        return 0; /* EFBIG */
-               close(fd);
                return (blkid_loff_t) size64 << 9;
        }
 #endif
@@ -106,7 +105,6 @@ blkid_loff_t blkid_get_dev_size(int fd)
                if ((sizeof(blkid_loff_t) < sizeof(unsigned long long))
                    && ((size64) > 0xFFFFFFFF))
                        return 0; /* EFBIG */
-               close(fd);
                return size64;
        }
 #endif