16 May, 2012

1 commit

  • 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: "Yann E. MORIN"
    Acked-by: Andi Kleen
    Signed-off-by: Michal Marek

    Yann E. MORIN
     

15 Dec, 2010

1 commit


25 Nov, 2010

1 commit


15 Jun, 2009

3 commits


15 Jan, 2009

1 commit


08 Jan, 2009

1 commit

  • I often change single options in .config files. Instead of using
    an editor or one of the frontends it's convenient to do this from
    the command line. It's also useful to do from automated build scripts
    when building different variants from a base config file.

    I extracted most of the CONFIG manipulation code from one of my
    build scripts into a new shell script scripts/config

    The script is not integrated with the normal Kconfig machinery
    and doesn't do any checking against Kconfig files, but just manipulates
    that text format. This is always done at make time anyways.

    I believe this script would be a useful standard addition for scripts/*

    Sample usage:

    ./scripts/config --disable smp
    Disable SMP in .config file

    ./scripts/config --file otherdir/.config --module e1000e
    Enable E1000E as module in otherdir/.config

    ./scripts/config --state smp
    y
    Check state of config option CONFIG_SMP

    After merging into git please make scripts/config executable

    Signed-off-by: Andi Kleen
    Signed-off-by: Sam Ravnborg

    Andi Kleen