2022-09-19 21:31:50 +02:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#ifndef FF_INCLUDED_common_sysctl
|
|
|
|
|
#define FF_INCLUDED_common_sysctl
|
|
|
|
|
|
|
|
|
|
#include "fastfetch.h"
|
2022-10-27 10:46:33 +08:00
|
|
|
#include "util/FFcheckmacros.h"
|
|
|
|
|
|
2022-09-19 23:16:43 +02:00
|
|
|
#include <sys/types.h>
|
2022-09-19 21:45:39 +02:00
|
|
|
#include <sys/sysctl.h>
|
2022-09-19 21:31:50 +02:00
|
|
|
|
2022-10-27 10:46:33 +08:00
|
|
|
const char* ffSysctlGetString(const char* propName, FFstrbuf* result);
|
|
|
|
|
FF_C_NODISCARD int ffSysctlGetInt(const char* propName, int defaultValue);
|
|
|
|
|
FF_C_NODISCARD int64_t ffSysctlGetInt64(const char* propName, int64_t defaultValue);
|
|
|
|
|
FF_C_NODISCARD void* ffSysctlGetData(int* request, u_int requestLength, size_t* resultLength);
|
2022-09-19 21:31:50 +02:00
|
|
|
|
|
|
|
|
#endif
|