diff --git a/CHANGELOG b/CHANGELOG index b3560968ac736bd9f2d08f3728ed064b770cd8ac..8aede6ea2b5ef87f8038f697bd23ddd74a518ae2 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,6 +1,12 @@ 0.6.1 (1/??/2009): ------------------ +- Fixed bug that returned incorrect disk size on 32-bit versions of + FreeBSD. + +- Fixed bug that prevented FreeBSD version from working on disk image + files. + - Fixed bug that caused BSD disklabel conversion to not work. 0.6.0 (1/15/2009): diff --git a/gpt.h b/gpt.h index 1f780eee0bd3c0ddcb72f55b2242836a6426759d..b4e0f063f2e8925ec5deef36c415c9d95d091a13 100644 --- a/gpt.h +++ b/gpt.h @@ -16,7 +16,7 @@ #ifndef __GPTSTRUCTS #define __GPTSTRUCTS -#define GPTFDISK_VERSION "0.6.1-pre2" +#define GPTFDISK_VERSION "0.6.1-pre3" using namespace std; diff --git a/support.cc b/support.cc index 47ff4380bcc84f1b7533d315773173f8b0254571..0d4a7b34e384004e1869dfd6bc2236e7c3ab4448 100644 --- a/support.cc +++ b/support.cc @@ -588,6 +588,7 @@ int myWrite(int fd, char* buffer, int numBytes) { // to work around a problem returning a uint64_t value on Mac OS. uint64_t disksize(int fd, int *err) { long sz; // Do not delete; needed for Linux + uint64_t size = 0; // Do not delete; needed for FreeBSD long long b; // Do not delete; needed for Linux uint64_t sectors = 0; // size in sectors off_t bytes = 0; // size in bytes @@ -602,9 +603,9 @@ uint64_t disksize(int fd, int *err) { *err = ioctl(fd, DKIOCGETBLOCKCOUNT, §ors); #else #ifdef __FreeBSD__ - *err = ioctl(fd, DIOCGMEDIASIZE, &sz); + *err = ioctl(fd, DIOCGMEDIASIZE, &size); b = GetBlockSize(fd); - sectors = sz / b; + sectors = size / b; #else *err = ioctl(fd, BLKGETSIZE, &sz); if (*err) {