• Yann E. MORIN's avatar
    scripts/config: properly report and set string options · d6686da8
    Yann E. MORIN authored
    Currently, scripts/config removes the leading double-quote from
    string options, but leaves the trailing double-quote.
    
    Also, double-quotes in a string are escaped, but scripts/config
    does not unescape those when printing
    
    Finally, scripts/config does not escape double-quotes when setting
    string options.
    
    Eg. the current behavior:
        $ grep -E '^CONFIG_FOO=' .config
        CONFIG_FOO="Bar \"Buz\" Meh"
        $ ./scripts/config -s FOO
        Bar \"Buz\" Meh"
        $ ./scripts/config --set-str FOO 'Alpha "Bravo" Charlie'
        $ grep -E '^CONFIG_FOO=' .config
        CONFIG_FOO="Alpha "Bravo" Charlie"
    
    Fix those three, giving this new behavior:
        $ grep -E '^CONFIG_FOO=' .config
        CONFIG_FOO="Bar \"Buz\" Meh"
        $ ./scripts/config -s FOO
        Bar "Buz" Meh
        $ ./scripts/config --set-str FOO 'Alpha "Bravo" Charlie'
        $ grep -E '^CONFIG_FOO=' .config
        CONFIG_FOO="Alpha \"Bravo\" Charlie"
    Signed-off-by: default avatar"Yann E. MORIN" <yann.morin.1998@free.fr>
    Acked-by: default avatarAndi Kleen <andi@firstfloor.org>
    Signed-off-by: default avatarMichal Marek <mmarek@suse.cz>
    d6686da8
config 2.88 KB