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

Commit 7e952f41 authored by Johan Redestig's avatar Johan Redestig
Browse files

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
parent c9c401e6
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;