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

Commit a53635f8 authored by Kean Mariotti's avatar Kean Mariotti Committed by Android (Google) Code Review
Browse files

Merge "Fix file permissions of generated layers trace" into main

parents 4ab47554 c34489c9
Loading
Loading
Loading
Loading
+10 −1
Original line number Original line Diff line number Diff line
@@ -64,8 +64,17 @@ int main(int argc, char** argv) {


    if (!LayerTraceGenerator().generate(transactionTraceFile, traceFlags, layerTracing,
    if (!LayerTraceGenerator().generate(transactionTraceFile, traceFlags, layerTracing,
                                        generateLastEntryOnly)) {
                                        generateLastEntryOnly)) {
        std::cout << "Error: Failed to generate layers trace " << outputLayersTracePath;
        std::cout << "Error: Failed to generate layers trace " << outputLayersTracePath << "\n";
        return -1;
        return -1;
    }
    }

    // Set output file permissions (-rw-r--r--)
    outStream.close();
    const mode_t mode = S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH;
    if (chmod(outputLayersTracePath, mode) != 0) {
        std::cout << "Error: Failed to set permissions of " << outputLayersTracePath << "\n";
        return -1;
    }

    return 0;
    return 0;
}
}