Bump do_write buffer size

In the case of do_write (write to generic file) there
is really no relation to the PROP_VALUE_MAX limitation
of system properties. The current value, 92, is not so
much for writing to files so bump it a bit.

Ideally there should not be any low hard limit in this
case. Either expand_props should allocate the output
buffer or take the output fd and to streaming write.
Such a change is rather invasive though and at this
point in time it seems reasonable that one dont want
more than 256 character strings in the init files.

Change-Id: I846a282ae4e747e6171eef38b302b46287951451
This commit is contained in:
Johan Redestig 2014-12-05 00:36:41 +01:00
parent c9c401e64b
commit 7e952f41f1
1 changed files with 1 additions and 1 deletions

View File

@ -717,7 +717,7 @@ int do_write(int nargs, char **args)
const char *path = args[1];
const char *value = args[2];
char expanded_value[PROP_VALUE_MAX];
char expanded_value[256];
if (expand_props(expanded_value, value, sizeof(expanded_value))) {
ERROR("cannot expand '%s' while writing to '%s'\n", value, path);
return -EINVAL;