Merge remote-tracking branch 'origin/startup-sanity-checks' into startup-sanity-checks

This commit is contained in:
alesapin 2022-03-29 14:29:33 +02:00
commit 842c0b8ff0
2 changed files with 3 additions and 3 deletions

View File

@ -27,7 +27,7 @@ uint64_t getAvailableMemoryAmountOrZero()
unsigned int usermem;
size_t len = sizeof(usermem);
static int mib[2] = { CTL_HW, HW_USERMEM };
if (sysctl(mib, 2, &usermem, &len, NULL, 0) == 0 && len == sizeof(usermem))
if (sysctl(mib, 2, &usermem, &len, nullptr, 0) == 0 && len == sizeof(usermem))
return usermem;
else
return 0;

View File

@ -35,13 +35,13 @@ enum class BlockDeviceType
#if !defined(__linux__)
[[noreturn]]
#endif
BlockDeviceType getBlockDeviceType([[maybe_unused]] const String & deviceId);
BlockDeviceType getBlockDeviceType([[maybe_unused]] const String & device_id);
// Get size of read-ahead in bytes for specified block device
#if !defined(__linux__)
[[noreturn]]
#endif
UInt64 getBlockDeviceReadAheadBytes([[maybe_unused]] const String & deviceId);
UInt64 getBlockDeviceReadAheadBytes([[maybe_unused]] const String & device_id);
/// Returns mount point of filesystem where absolute_path (must exist) is located
std::filesystem::path getMountPoint(std::filesystem::path absolute_path);