diff --git a/devices/common/ata/atahd.cpp b/devices/common/ata/atahd.cpp index b5f462d..820a57d 100644 --- a/devices/common/ata/atahd.cpp +++ b/devices/common/ata/atahd.cpp @@ -63,14 +63,16 @@ int AtaHardDisk::device_postinit() { void AtaHardDisk::insert_image(std::string filename) { if (!this->hdd_img.open(filename)) { - ABORT_F("%s: could not open image file \"%s\"", this->name.c_str(), filename.c_str()); + ABORT_F("%s: could not open image file \"%s\"", this->name.c_str(), + filename.c_str()); } this->img_size = this->hdd_img.size(); uint64_t sectors = this->hdd_img.size() / ATA_HD_SEC_SIZE; this->total_sectors = (uint32_t)sectors; if (sectors != this->total_sectors) { - ABORT_F("%s: image file \"%s\" is too big", this->name.c_str(), filename.c_str()); + ABORT_F("%s: image file \"%s\" is too big", this->name.c_str(), + filename.c_str()); } this->calc_chs_params(); } diff --git a/devices/common/ata/atahd.h b/devices/common/ata/atahd.h index 8c7fb34..5d698c1 100644 --- a/devices/common/ata/atahd.h +++ b/devices/common/ata/atahd.h @@ -30,9 +30,13 @@ along with this program. If not, see . #include #define ATA_HD_SEC_SIZE 512 -#define ATA_BIOS_LIMIT 16514064 // C:16383 x H:16 x S:63 = C:1032 x H:254 x S:63 = 8063.5078125 MiB = 8.46 GB -#define REAL_CHS_LIMIT 267382800 // C:65535 x H:16 x S:255 = 127.498 GiB = 136.900 GB = largest identify -#define CHS_LIMIT 267386880 // C:65536 x H:16 x S:255 = 127.500 GiB = 136.902 GB = largest address + +// C:16383 x H:16 x S:63 = C:1032 x H:254 x S:63 = 8063.5078125 MiB = 8.46 GB +#define ATA_BIOS_LIMIT 16514064 +// C:65535 x H:16 x S:255 = 127.498 GiB = 136.900 GB = largest identify +#define REAL_CHS_LIMIT 267382800 +// C:65536 x H:16 x S:255 = 127.500 GiB = 136.902 GB = largest address +#define CHS_LIMIT 267386880 class AtaHardDisk : public AtaBaseDevice {