From 6fd4720faf327829f99396ace2e0fca6e3b972af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=80=9A=E6=B4=B2?= Date: Tue, 18 Feb 2025 10:13:25 +0800 Subject: [PATCH] PhysicalDisk (Haiku): fix drive size calcuation --- src/detection/physicaldisk/physicaldisk_haiku.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/detection/physicaldisk/physicaldisk_haiku.c b/src/detection/physicaldisk/physicaldisk_haiku.c index 170c40aa4..a64857114 100644 --- a/src/detection/physicaldisk/physicaldisk_haiku.c +++ b/src/detection/physicaldisk/physicaldisk_haiku.c @@ -34,7 +34,7 @@ static const char* detectDisk(FFstrbuf* path, const char* diskType, FFlist* resu device->type = FF_PHYSICALDISK_TYPE_NONE; device->type |= (geometry.read_only ? FF_PHYSICALDISK_TYPE_READONLY : FF_PHYSICALDISK_TYPE_READWRITE) | (geometry.removable ? FF_PHYSICALDISK_TYPE_REMOVABLE : FF_PHYSICALDISK_TYPE_FIXED); - device->size = (uint64_t) geometry.cylinder_count * geometry.sectors_per_track * geometry.bytes_per_sector; + device->size = (uint64_t) geometry.cylinder_count *geometry.heads * geometry.sectors_per_track * geometry.bytes_per_sector; return NULL; }