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

Commit 8f625665 authored by Matthew Maurer's avatar Matthew Maurer
Browse files

trusty: rpmb_dev: Prevent desync between rpmb_dev and storageproxyd

The mock RPMB can get out of sync with TD storage blocks in the event of
panic or crash. Making this O_SYNC will prevent this from happening.

Bug: 160723681
Test: None
Change-Id: Ia16dfc88ceae56e4e9724a42ac0db492c0e707a4
parent 4d3c2846
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -591,7 +591,7 @@ int main(int argc, char** argv) {
        return EXIT_SUCCESS;
    }

    open_flags = O_RDWR;
    open_flags = O_RDWR | O_SYNC;
    if (init) {
        open_flags |= O_CREAT | O_TRUNC;
    }