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

Commit 237db1e7 authored by Takaya Saeki's avatar Takaya Saeki Committed by Akilesh Kailash
Browse files

libprefetch: fix property names in the .rc script



Current property names in .rc do not match what libprefetch actually
expects. In addition, the name of the property to stop the record starts
with `ro.` while it is expected to be modified. This commit fixes these
problems. Since prefetch was not working due to mismatching names, this
fix should not introduce a breaking change.


Bug: 380766679
Test: Test prefetch works on a Cuttlefish
Change-Id: I588b6f555fa9797a1a089aa983bcdc47bbb5e17e
Signed-off-by: default avatarTakaya Saeki <takayas@google.com>
parent 53ee78c3
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -8,7 +8,7 @@ service prefetch /system/bin/prefetch start
    disabled
    disabled
    oneshot
    oneshot


on property:ro.prefetch_boot.record=true
on property:prefetch_boot.record=true
    start prefetch_record
    start prefetch_record


service prefetch_record /system/bin/prefetch record --duration ${ro.prefetch_boot.duration_s:-0}
service prefetch_record /system/bin/prefetch record --duration ${ro.prefetch_boot.duration_s:-0}
@@ -18,7 +18,7 @@ service prefetch_record /system/bin/prefetch record --duration ${ro.prefetch_boo
    disabled
    disabled
    oneshot
    oneshot


on property:ro.prefetch_boot.replay=true
on property:prefetch_boot.replay=true
    start prefetch_replay
    start prefetch_replay


service prefetch_replay /system/bin/prefetch replay --io-depth ${ro.prefetch_boot.io_depth:-2} --max-fds ${ro.prefetch_boot.max_fds:-128}
service prefetch_replay /system/bin/prefetch replay --io-depth ${ro.prefetch_boot.io_depth:-2} --max-fds ${ro.prefetch_boot.max_fds:-128}
+1 −1
Original line number Original line Diff line number Diff line
@@ -13,7 +13,7 @@ use rustutils::system_properties::PropertyWatcher;


const PREFETCH_RECORD_PROPERTY: &str = "prefetch_boot.record";
const PREFETCH_RECORD_PROPERTY: &str = "prefetch_boot.record";
const PREFETCH_REPLAY_PROPERTY: &str = "prefetch_boot.replay";
const PREFETCH_REPLAY_PROPERTY: &str = "prefetch_boot.replay";
const PREFETCH_RECORD_PROPERTY_STOP: &str = "ro.prefetch_boot.record_stop";
const PREFETCH_RECORD_PROPERTY_STOP: &str = "prefetch_boot.record_stop";


fn wait_for_property_true(
fn wait_for_property_true(
    property_name: &str,
    property_name: &str,