config: fix specifying configuration value with equality sign
authorLukas Czerner <lczerner@redhat.com>
Fri, 11 Apr 2014 00:09:48 +0000 (10:09 +1000)
committerDave Chinner <david@fromorbit.com>
Fri, 11 Apr 2014 00:09:48 +0000 (10:09 +1000)
commit5138e74a2e81b0df5aab6e7688e3692e5140ac21
treeb23b7f5ae3f833dfa1b15e84b1b2521e31ed1c6c
parent9f1a8e7da7182ace17d5ce3e5fcbbfccfd8d8775
config: fix specifying configuration value with equality sign

Currently there is a problem with parse_config_section() when the
configuration value contains equality sign like this for example:

MOUNT_OPTIONS="-o data=journal"

the result will be

export MOUNT_OPTIONS="-o data="journal"

which is not going to work. The reason is that the expression used to
parse the configuration options uses greedy matching '.*'. Fix this by
using non greedy expression to match the first equality sign '[^=]'.

Signed-off-by: Lukas Czerner <lczerner@redhat.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
common/config