Files
fastfetch/src/detection/host/host_nbsd.c
T
李通洲 4665fdd145 Global: make it compile on NetBSD
Doesn't work yet.
2024-10-27 11:43:36 +08:00

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;
}