MCPcopy Create free account
hub / github.com/dmitry-s93/MControlCenter / loadEcSysModule

Method loadEcSysModule

src/helper/helper.cpp:57–67  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

55}
56
57bool Helper::loadEcSysModule() const {
58 fprintf(stderr, "%s\n", qPrintable("Trying to load the ec_sys kernel module"));
59 auto *process = new QProcess();
60 process->start("sh", QStringList() << "-c" << "/usr/sbin/modprobe ec_sys write_support=1 2>&1");
61 process->waitForFinished(1000);
62 if (QByteArray output = process->readAllStandardOutput(); output != "")
63 fprintf(stderr, "%s", qPrintable(output));
64 if (isEcSysModuleLoaded())
65 return true;
66 return false;
67}
68
69int main(int argc, char *argv[]) {
70 QCoreApplication a(argc, argv);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected