We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent aef29ac commit 3c40b2eCopy full SHA for 3c40b2e
src/boot/FPPINIT.cpp
@@ -937,7 +937,8 @@ static void detectNetworkModules() {
937
std::string modName = "/sys/class/net/" + filename + "/device/driver/module";
938
if (FileExists(modName)) {
939
char buf[256];
940
- readlink(modName.c_str(), buf, sizeof(buf));
+ size_t l = readlink(modName.c_str(), buf, sizeof(buf));
941
+ buf[l] = 0;
942
std::string mod = buf;
943
mod = mod.substr(mod.rfind("/") + 1);
944
content += mod;
@@ -1430,6 +1431,8 @@ int main(int argc, char* argv[]) {
1430
1431
}
1432
1433
1434
+ } else if (action == "detectNetworkModules") {
1435
+ detectNetworkModules();
1436
1437
printf("------------------------------\n");
1438
return 0;
0 commit comments