Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e4eca58f authored by Felipe Leme's avatar Felipe Leme
Browse files

Checks if /proc/modules exist before calling lsmod.

Change-Id: I8de20d5b99cf613d8d4af699ab8487d27e79bb3f
Fixes: 29276583
parent 194198f5
Loading
Loading
Loading
Loading
+6 −1
Original line number Original line Diff line number Diff line
@@ -691,7 +691,12 @@ static void dumpstate(const std::string& screenshot_path, const std::string& ver


    run_command("PRINTENV", 10, "printenv", NULL);
    run_command("PRINTENV", 10, "printenv", NULL);
    run_command("NETSTAT", 10, "netstat", "-n", NULL);
    run_command("NETSTAT", 10, "netstat", "-n", NULL);
    struct stat s;
    if (stat("/proc/modules", &s) != 0) {
        MYLOGD("Skipping 'lsmod' because /proc/modules does not exist\n");
    } else {
        run_command("LSMOD", 10, "lsmod", NULL);
        run_command("LSMOD", 10, "lsmod", NULL);
    }


    do_dmesg();
    do_dmesg();