mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-11-08 06:00:08 +01:00
Global: formats code [ci skip]
This commit is contained in:
@@ -164,7 +164,12 @@ static bool parseBattery(int dfd, const char* id, FFBatteryOptions* options, FFl
|
||||
}
|
||||
|
||||
FF_DEBUG("Battery \"%s\": Capacity: %.2f%%, Status: \"%x\", Time Remaining: %d seconds, Temperature: %.1f°C, Cycle Count: %u",
|
||||
id, result->capacity, result->status, result->timeRemaining, result->temperature, result->cycleCount);
|
||||
id,
|
||||
result->capacity,
|
||||
result->status,
|
||||
result->timeRemaining,
|
||||
result->temperature,
|
||||
result->cycleCount);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -189,7 +194,7 @@ const char* ffDetectBattery(FFBatteryOptions* options, FFlist* results) {
|
||||
}
|
||||
|
||||
if (acConnected) {
|
||||
FF_LIST_FOR_EACH(FFBatteryResult, batt, *results) {
|
||||
FF_LIST_FOR_EACH (FFBatteryResult, batt, *results) {
|
||||
batt->status |= FF_BATTERY_STATUS_AC_CONNECTED;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@ typedef struct FFSmbiosSystemInfo {
|
||||
uint8_t ClockSeqLow;
|
||||
uint8_t Node[6];
|
||||
} FF_A_PACKED UUID; // varies
|
||||
uint8_t WakeUpType; // enum
|
||||
uint8_t WakeUpType; // enum
|
||||
|
||||
// 2.4+
|
||||
uint8_t SKUNumber; // string
|
||||
|
||||
@@ -78,13 +78,14 @@ const char* ffDetectPhysicalDisk(FFlist* result, FFPhysicalDiskOptions* options)
|
||||
if (deviceName.length == 0) {
|
||||
FF_CFTYPE_AUTO_RELEASE CFDictionaryRef deviceCharacteristics = IORegistryEntryCreateCFProperty(entryPhysical, CFSTR(kIOPropertyDeviceCharacteristicsKey), NULL, kNilOptions);
|
||||
if (deviceCharacteristics) {
|
||||
if (ffCfDictGetString(deviceCharacteristics, CFSTR(kIOPropertyVendorNameKey), &deviceName) == NULL &&deviceName.length > 0) {
|
||||
if (ffCfDictGetString(deviceCharacteristics, CFSTR(kIOPropertyVendorNameKey), &deviceName) == NULL && deviceName.length > 0) {
|
||||
ffStrbufAppendC(&deviceName, ' ');
|
||||
}
|
||||
|
||||
FF_STRBUF_AUTO_DESTROY name = ffStrbufCreate();
|
||||
if (ffCfDictGetString(deviceCharacteristics, CFSTR(kIOPropertyProductNameKey), &name) == NULL)
|
||||
if (ffCfDictGetString(deviceCharacteristics, CFSTR(kIOPropertyProductNameKey), &name) == NULL) {
|
||||
ffStrbufAppend(&deviceName, &name);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user