OSDN Git Service

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 51647b4..544c0df 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 b099e4e..5d389e3 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