| 55 | } |
| 56 | |
| 57 | bool 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 | |
| 69 | int main(int argc, char *argv[]) { |
| 70 | QCoreApplication a(argc, argv); |
nothing calls this directly
no outgoing calls
no test coverage detected