mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-09-13 02:42:09 +02:00
Util: rename KernelMod to Kmod
This commit is contained in:
+1
-1
@@ -425,7 +425,7 @@ set(LIBFASTFETCH_SRC
|
||||
src/util/base64.c
|
||||
src/util/FFlist.c
|
||||
src/util/FFstrbuf.c
|
||||
src/util/kernelMod.c
|
||||
src/util/kmod.c
|
||||
src/util/path.c
|
||||
src/util/platform/FFPlatform.c
|
||||
src/util/smbiosHelper.c
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
#include "tpm.h"
|
||||
#include "common/sysctl.h"
|
||||
#include "util/kernelMod.h"
|
||||
#include "util/kmod.h"
|
||||
|
||||
const char* ffDetectTPM(FFTPMResult* result)
|
||||
{
|
||||
if (ffSysctlGetString("dev.tpmcrb.0.%desc", &result->description) != NULL)
|
||||
{
|
||||
if (!ffKernelModLoaded("tpm")) return "`tpm` kernel module is not loaded";
|
||||
if (!ffKmodLoaded("tpm")) return "`tpm` kernel module is not loaded";
|
||||
return "TPM device is not found";
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#include "zpool.h"
|
||||
|
||||
#ifdef FF_HAVE_LIBZFS
|
||||
#include "util/kernelMod.h"
|
||||
#include "util/kmod.h"
|
||||
|
||||
#ifdef __sun
|
||||
#define FF_DISABLE_DLOPEN
|
||||
@@ -85,7 +85,7 @@ const char* ffDetectZpool(FFlist* result /* list of FFZpoolResult */)
|
||||
libzfs_handle_t* handle = fflibzfs_init();
|
||||
if (!handle)
|
||||
{
|
||||
if (!ffKernelModLoaded("zfs")) return "`zfs` kernel module is not loaded";
|
||||
if (!ffKmodLoaded("zfs")) return "`zfs` kernel module is not loaded";
|
||||
return "libzfs_init() failed";
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#include "fastfetch.h"
|
||||
|
||||
bool ffKernelModLoaded(const char* modName);
|
||||
@@ -1,9 +1,9 @@
|
||||
#include "kernelMod.h"
|
||||
#include "kmod.h"
|
||||
|
||||
#if __linux__
|
||||
#include "common/io/io.h"
|
||||
|
||||
bool ffKernelModLoaded(const char* modName)
|
||||
bool ffKmodLoaded(const char* modName)
|
||||
{
|
||||
static FFstrbuf modules;
|
||||
if (modules.chars == NULL)
|
||||
@@ -27,12 +27,12 @@ bool ffKernelModLoaded(const char* modName)
|
||||
#include <sys/param.h>
|
||||
#include <sys/module.h>
|
||||
|
||||
bool ffKernelModLoaded(const char* modName)
|
||||
bool ffKmodLoaded(const char* modName)
|
||||
{
|
||||
return modfind(modName) >= 0;
|
||||
}
|
||||
#else
|
||||
bool ffKernelModLoaded(FF_MAYBE_UNUSED const char* modName)
|
||||
bool ffKmodLoaded(FF_MAYBE_UNUSED const char* modName)
|
||||
{
|
||||
return true; // Don't generate kernel module related errors
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
#pragma once
|
||||
|
||||
#include "fastfetch.h"
|
||||
|
||||
bool ffKmodLoaded(const char* modName);
|
||||
Reference in New Issue
Block a user