mirror of https://github.com/vitalif/e2fsprogs
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)bitmap-optimize
parent
abdf84f38a
commit
1cdb6f7602
|
@ -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>
|
2004-03-08 Theodore Ts'o <tytso@mit.edu>
|
||||||
|
|
||||||
* getsize.c (blkid_get_dev_size): Only use the BLKGETSIZE64 ioctl
|
* getsize.c (blkid_get_dev_size): Only use the BLKGETSIZE64 ioctl
|
||||||
|
|
|
@ -89,7 +89,6 @@ blkid_loff_t blkid_get_dev_size(int fd)
|
||||||
if ((sizeof(blkid_loff_t) < sizeof(unsigned long long))
|
if ((sizeof(blkid_loff_t) < sizeof(unsigned long long))
|
||||||
&& ((size64 / (blocksize / 512)) > 0xFFFFFFFF))
|
&& ((size64 / (blocksize / 512)) > 0xFFFFFFFF))
|
||||||
return 0; /* EFBIG */
|
return 0; /* EFBIG */
|
||||||
close(fd);
|
|
||||||
return (blkid_loff_t) size64 << 9;
|
return (blkid_loff_t) size64 << 9;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -106,7 +105,6 @@ blkid_loff_t blkid_get_dev_size(int fd)
|
||||||
if ((sizeof(blkid_loff_t) < sizeof(unsigned long long))
|
if ((sizeof(blkid_loff_t) < sizeof(unsigned long long))
|
||||||
&& ((size64) > 0xFFFFFFFF))
|
&& ((size64) > 0xFFFFFFFF))
|
||||||
return 0; /* EFBIG */
|
return 0; /* EFBIG */
|
||||||
close(fd);
|
|
||||||
return size64;
|
return size64;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue