Skip to content

Commit af067c7

Browse files
committed
Util: rename KernelMod to Kmod
1 parent 8bbc985 commit af067c7

File tree

6 files changed

+14
-14
lines changed

6 files changed

+14
-14
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -425,7 +425,7 @@ set(LIBFASTFETCH_SRC
425425
src/util/base64.c
426426
src/util/FFlist.c
427427
src/util/FFstrbuf.c
428-
src/util/kernelMod.c
428+
src/util/kmod.c
429429
src/util/path.c
430430
src/util/platform/FFPlatform.c
431431
src/util/smbiosHelper.c

src/detection/tpm/tpm_bsd.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
#include "tpm.h"
22
#include "common/sysctl.h"
3-
#include "util/kernelMod.h"
3+
#include "util/kmod.h"
44

55
const char* ffDetectTPM(FFTPMResult* result)
66
{
77
if (ffSysctlGetString("dev.tpmcrb.0.%desc", &result->description) != NULL)
88
{
9-
if (!ffKernelModLoaded("tpm")) return "`tpm` kernel module is not loaded";
9+
if (!ffKmodLoaded("tpm")) return "`tpm` kernel module is not loaded";
1010
return "TPM device is not found";
1111
}
1212

src/detection/zpool/zpool_linux.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#include "zpool.h"
22

33
#ifdef FF_HAVE_LIBZFS
4-
#include "util/kernelMod.h"
4+
#include "util/kmod.h"
55

66
#ifdef __sun
77
#define FF_DISABLE_DLOPEN
@@ -85,7 +85,7 @@ const char* ffDetectZpool(FFlist* result /* list of FFZpoolResult */)
8585
libzfs_handle_t* handle = fflibzfs_init();
8686
if (!handle)
8787
{
88-
if (!ffKernelModLoaded("zfs")) return "`zfs` kernel module is not loaded";
88+
if (!ffKmodLoaded("zfs")) return "`zfs` kernel module is not loaded";
8989
return "libzfs_init() failed";
9090
}
9191

src/util/kernelMod.h

Lines changed: 0 additions & 5 deletions
This file was deleted.
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
#include "kernelMod.h"
1+
#include "kmod.h"
22

33
#if __linux__
44
#include "common/io/io.h"
55

6-
bool ffKernelModLoaded(const char* modName)
6+
bool ffKmodLoaded(const char* modName)
77
{
88
static FFstrbuf modules;
99
if (modules.chars == NULL)
@@ -27,12 +27,12 @@ bool ffKernelModLoaded(const char* modName)
2727
#include <sys/param.h>
2828
#include <sys/module.h>
2929

30-
bool ffKernelModLoaded(const char* modName)
30+
bool ffKmodLoaded(const char* modName)
3131
{
3232
return modfind(modName) >= 0;
3333
}
3434
#else
35-
bool ffKernelModLoaded(FF_MAYBE_UNUSED const char* modName)
35+
bool ffKmodLoaded(FF_MAYBE_UNUSED const char* modName)
3636
{
3737
return true; // Don't generate kernel module related errors
3838
}

src/util/kmod.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#pragma once
2+
3+
#include "fastfetch.h"
4+
5+
bool ffKmodLoaded(const char* modName);

0 commit comments

Comments
 (0)