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 Change-Id: Id45bd8dd657e8d61f4cfaf7e6b2559d2bfd05181
This commit is contained in:
parent
e80e0319ae
commit
67e3663fc9
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue