diff options
author | Dimitry Ivanov <dimitry@google.com> | 2017-01-25 13:27:03 -0800 |
---|---|---|
committer | Rob Landley <rob@landley.net> | 2017-01-25 17:36:06 -0600 |
commit | 102841199bee9cc76f3fff4335d6dbdd3c0cc8ab (patch) | |
tree | 52ff367e7e5f100ac930e257e352bcc0b7d8d410 /toys/android/setprop.c | |
parent | 4d8ffe62d06b1f7472e3dc0c63344311af5d68d0 (diff) | |
download | toybox-102841199bee9cc76f3fff4335d6dbdd3c0cc8ab.tar.gz |
Remove name length limit for system properties
Android O removes name length limit for system properties.
Use __system_property_read_callback instead of deprecated
__system_property_read in getprop and remove check for
property name length in setprop.
Test: adb shell setprop debug.test.very.very.long.property.name valueforpropertywithlongname
Test: adb shell getprop | grep debug.test.very.very.long.property.name
Bug: http://b/33926793
Change-Id: I57ca99ea33283d069cd1b7b9f110ec9fb27f3d19
Diffstat (limited to 'toys/android/setprop.c')
-rw-r--r-- | toys/android/setprop.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/toys/android/setprop.c b/toys/android/setprop.c index 2af314aa..c1356156 100644 --- a/toys/android/setprop.c +++ b/toys/android/setprop.c @@ -29,9 +29,6 @@ void setprop_main(void) // recognize most failures (because it doesn't wait for init), so // we duplicate all of init's checks here to help the user. - if (name_len >= PROP_NAME_MAX) - error_exit("name '%s' too long; try '%.*s'", - name, PROP_NAME_MAX - 1, name); if (value_len >= PROP_VALUE_MAX) error_exit("value '%s' too long; try '%.*s'", value, PROP_VALUE_MAX - 1, value); |