mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-11-07 13:44:18 +01:00
4665fdd145
Doesn't work yet.
18 lines
566 B
C
18 lines
566 B
C
#include "host.h"
|
|
#include "common/sysctl.h"
|
|
#include "util/smbiosHelper.h"
|
|
|
|
const char* ffDetectHost(FFHostResult* host)
|
|
{
|
|
const char* error = NULL;
|
|
if ((error = ffSysctlGetString("machdep.dmi.system-product", &host->name)))
|
|
return error;
|
|
ffCleanUpSmbiosValue(&host->name);
|
|
if (ffSysctlGetString("machdep.dmi.system-vendor", &host->vendor) == NULL)
|
|
ffCleanUpSmbiosValue(&host->vendor);
|
|
if (ffSysctlGetString("machdep.dmi.system-version", &host->version) == NULL)
|
|
ffCleanUpSmbiosValue(&host->version);
|
|
|
|
return NULL;
|
|
}
|