From: Theodore Ts'o Date: Mon, 22 Mar 2004 01:16:19 +0000 (-0500) Subject: Don't close the file descriptor when determining the size. X-Git-Tag: APPLE_UUID_SNAP_1~12 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=1cdb6f760215b36709aa434ba9b24720b6d2872f;p=tools%2Fe2fsprogs.git 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) --- diff --git a/lib/blkid/ChangeLog b/lib/blkid/ChangeLog index 51647b4..544c0df 100644 --- a/lib/blkid/ChangeLog +++ b/lib/blkid/ChangeLog @@ -1,3 +1,10 @@ +2004-03-21 Theodore Ts'o + + * 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 * getsize.c (blkid_get_dev_size): Only use the BLKGETSIZE64 ioctl diff --git a/lib/blkid/getsize.c b/lib/blkid/getsize.c index b099e4e..5d389e3 100644 --- a/lib/blkid/getsize.c +++ b/lib/blkid/getsize.c @@ -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