Skip to content

Commit 716f0a3

Browse files
committed
PhysicalDisk (Haiku): report drive type
1 parent f839fcf commit 716f0a3

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/detection/physicaldisk/physicaldisk_haiku.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,8 @@ static const char* detectDisk(int dfd, const char* diskType, const char* diskId,
4040
ffStrbufInitS(&device->interconnect, diskType);
4141
device->temperature = 0.0/0.0;
4242
device->type = FF_PHYSICALDISK_TYPE_NONE;
43-
if (geometry.read_only)
44-
device->type |= FF_PHYSICALDISK_TYPE_READONLY;
45-
if (geometry.removable)
46-
device->type |= FF_PHYSICALDISK_TYPE_REMOVABLE;
43+
device->type |= (geometry.read_only ? FF_PHYSICALDISK_TYPE_READONLY : FF_PHYSICALDISK_TYPE_READWRITE) |
44+
(geometry.removable ? FF_PHYSICALDISK_TYPE_REMOVABLE : FF_PHYSICALDISK_TYPE_FIXED);
4745
device->size = (uint64_t) geometry.cylinder_count * geometry.sectors_per_track * geometry.bytes_per_sector;
4846

4947
return NULL;

0 commit comments

Comments
 (0)