aboutsummaryrefslogtreecommitdiff
path: root/libc/stdio/stdio.cpp
diff options
context:
space:
mode:
authorTom Cherry <tomcherry@google.com>2017-10-09 13:49:17 -0700
committerTom Cherry <tomcherry@google.com>2017-10-10 15:52:25 -0700
commit8a311631edc0c6212d4f9c50854956d2233aea40 (patch)
tree885d3feb21fc2545d9830aaa819e4f24236722fd /libc/stdio/stdio.cpp
parent983c2da84cdcd0171b7f726b78990cabd0a58f49 (diff)
Allow read-only system properties to have arbitrary lengths
We need to be able to store build fingerprints that are over 92 characters long, which is the current restriction for system property value length. Increasing the value maximum across the board has plenty of caveats, particularly that an allocator would be required to handle deallocation when replacing long property values with short values. There is also no compelling reasons to do this. But, increasing the length of simply read-only properties, such as the build fingerprint, has less caveats as there will never be a deallocation of these strings. This change uses spare bits in the top of serial (only spare for read-only properties) to indicate if a property is 'long' or not. The information required to access these 'long' properties is stored in a union where the legacy property value is located. An error message is retained for legacy callers. The new property is readable via __system_property_read_callback() and most importantly android::base::GetProperty and higher level (Java, `getprop`) callers. All code should move to these higher level functions as much as possible. Bug: 23102347 Bug: 34954705 Test: bionic unit tests Change-Id: Ia85e0d979b92afff601cc52b39114379617a0c64
Diffstat (limited to 'libc/stdio/stdio.cpp')
0 files changed, 0 insertions, 0 deletions