From 1cdb6f760215b36709aa434ba9b24720b6d2872f Mon Sep 17 00:00:00 2001 From: Theodore Ts'o Date: Sun, 21 Mar 2004 20:16:19 -0500 Subject: [PATCH] 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) --- lib/blkid/ChangeLog | 7 +++++++ lib/blkid/getsize.c | 2 -- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/lib/blkid/ChangeLog b/lib/blkid/ChangeLog index 51647b48..544c0dfe 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 b099e4e8..5d389e3f 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