Skip to content
Snippets Groups Projects
Commit 81f8d3b0 authored by Anton Vorontsov's avatar Anton Vorontsov Committed by Wolfgang Denk
Browse files

hwconfig: Fix stop characters parsing for subkeys


For the following hwconfig string:

  key1:subkey1=value1,subkey2=value2;key2:value3

The subkey2 cannot be extracted correctly. The parsing code looks
for comma as a stopch, but there may be two kind of stop characters:
a comma and a semicolon.

Currently the code would return "value2;key2:value3", while just
"value2" is the correct answer.

This patch fixes the issue by making the code aware of multiple
stop characters.

For old U-Boots, the issue can be workarounded by placing a comma
before a semicolon, i.e.:

  hwconfig=key1:subkey1=value1,subkey2=value2,;key2:value3

Reported-by: default avatarYork Sun <yorksun@freescale.com>
Signed-off-by: default avatarAnton Vorontsov <avorontsov@mvista.com>
parent e365c43d
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment