mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2025-02-20 11:43:27 +08:00
PhysicalDisk (Haiku): report drive type
This commit is contained in:
parent
f839fcfa29
commit
716f0a3bbb
@ -40,10 +40,8 @@ static const char* detectDisk(int dfd, const char* diskType, const char* diskId,
|
|||||||
ffStrbufInitS(&device->interconnect, diskType);
|
ffStrbufInitS(&device->interconnect, diskType);
|
||||||
device->temperature = 0.0/0.0;
|
device->temperature = 0.0/0.0;
|
||||||
device->type = FF_PHYSICALDISK_TYPE_NONE;
|
device->type = FF_PHYSICALDISK_TYPE_NONE;
|
||||||
if (geometry.read_only)
|
device->type |= (geometry.read_only ? FF_PHYSICALDISK_TYPE_READONLY : FF_PHYSICALDISK_TYPE_READWRITE) |
|
||||||
device->type |= FF_PHYSICALDISK_TYPE_READONLY;
|
(geometry.removable ? FF_PHYSICALDISK_TYPE_REMOVABLE : FF_PHYSICALDISK_TYPE_FIXED);
|
||||||
if (geometry.removable)
|
|
||||||
device->type |= FF_PHYSICALDISK_TYPE_REMOVABLE;
|
|
||||||
device->size = (uint64_t) geometry.cylinder_count * geometry.sectors_per_track * geometry.bytes_per_sector;
|
device->size = (uint64_t) geometry.cylinder_count * geometry.sectors_per_track * geometry.bytes_per_sector;
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user