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

Commit 5e484e9c authored by Colin Cross's avatar Colin Cross
Browse files

init: fix copying boot properties

The previous patch "init: verify size of property buffers passed
to property_get" incorrectly modified one of the callers,
resulting in ro.serialno, ro.bootmode, ro.baseband, and
ro.bootloader always being set to their default values.

Bug: 9469860

(cherry picked from commit 67e3663f)

Change-Id: Ia7b337e1fab6e334729f47ee1269e6c736615177
parent 81963164
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -640,7 +640,9 @@ static void export_kernel_boot_props(void)

    for (i = 0; i < ARRAY_SIZE(prop_map); i++) {
        ret = property_get(prop_map[i].src_prop, tmp);
        if (ret == 0)
        if (ret > 0)
            property_set(prop_map[i].dest_prop, tmp);
        else
            property_set(prop_map[i].dest_prop, prop_map[i].def_val);
    }