FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
fastfetch/src/common/impl/kmod_linux.c at dev · fastfetch-cli/fastfetch · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
fastfetch-cli
/
fastfetch
Public
Uh oh!
There was an error while loading.
Please reload this page
.
Notifications
You must be signed in to change notification settings
Fork
867
Star
24.4k
Code
Issues
57
Pull requests
20
Discussions
Actions
Wiki
Security and quality
1
Insights
Additional navigation options
Code
Issues
Pull requests
Discussions
Actions
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
fastfetch
/
src
/
common
/
impl
/
kmod_linux.c
Copy path
More file actions
More file actions
Latest commit
History
History
History
25 lines (21 loc) · 592 Bytes
Breadcrumbs
fastfetch
/
src
/
common
/
impl
/
kmod_linux.c
Copy path
File metadata and controls
25 lines (21 loc) · 592 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#include
"common/kmod.h"
#include
"common/io.h"
bool
ffKmodLoaded
(
const
char
*
modName
) {
static
FFstrbuf
modules
;
if
(
modules
.
chars
==
nullptr
) {
ffStrbufInitS
(
&
modules
,
"\n"
);
ffAppendFileBuffer
(
"/proc/modules"
,
&
modules
);
}
if
(
modules
.
length
==
0
) {
return
false;
}
uint32_t
len
=
(
uint32_t
)
strlen
(
modName
);
if
(
len
>
250
) {
return
false;
}
char
temp
[
256
];
temp
[
0
]
=
'\n'
;
memcpy
(
temp
+
1
,
modName
,
len
);
temp
[
1
+
len
]
=
' '
;
return
memmem
(
modules
.
chars
,
modules
.
length
,
temp
,
len
+
2
)
!=
nullptr
;
}
Back
|
FazBrowse Home
|
New Git URL