1
0
Fork 0
remarkable-uboot/scripts
Stefan Roese 20c20826ef Kconfig: Enable usage of escape char '\' in string values
I might have missed something, but I failed to use the escape char '\'
in strings. To pass a printf format string like "foo %d bar\n" via
Kconfig to the code.

Right now its not possible to use the escape character '\' in Kconfig
string values correctly to e.g. set this string value "test output\n".
The '\n' will be converted to 'n'.

The current implementation removes some of the '\' chars from the input
string in conf_set_sym_val(). Examples:

'\'	-> ''
'\\'	-> '\'
'\\\'	-> '\'
'\\\\'	-> '\\'
...

And then doubles the backslash chars in the output string in
sym_escape_string_value(). Example:

'\'	-> ''	-> ''
'\\'	-> '\'	-> '\\'
'\\\'	-> '\'	-> '\\'
'\\\\'	-> '\\'	-> '\\\\'
...

As you see in these examples, its impossible to generate a single '\'
charater in the output string as its needed for something like '\n'.

This patch now changes this behavior to not drop some backslashes in
conf_set_sym_val() and to not add new backslashes in the resulting
output string. Removing the function sym_escape_string_value()
completely as its not needed anymore.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Cc: Tom Rini <trini@konsulko.com>
2015-06-08 10:45:04 -04:00
..
basic fixdep: remove multiple .config support code 2015-03-05 20:50:30 -05:00
kconfig Kconfig: Enable usage of escape char '\' in string values 2015-06-08 10:45:04 -04:00
.gitignore kernel-doc: move kernel-doc tools to scripts/ 2014-02-19 11:10:04 -05:00
Kbuild.include kbuild: sync misc scripts with Linux 3.18-rc1 2014-11-07 16:27:07 -05:00
Lindent scripts/Lindent: import from Linux 3.16 2014-08-21 12:01:29 -04:00
Makefile kconfig: switch to Kconfig 2014-07-30 08:48:03 -04:00
Makefile.autoconf moveconfig: Ignore duplicate configs when moving 2015-05-27 08:39:15 +09:00
Makefile.build kconfig: switch to single .config configuration 2015-02-24 17:06:23 -05:00
Makefile.clean kbuild: sync misc scripts with Linux 3.18-rc1 2014-11-07 16:27:07 -05:00
Makefile.extrawarn kbuild: do not hide clang warnings during build with W=1 2014-11-04 15:01:56 -05:00
Makefile.host kbuild: improve multi-objs dependency and cleanups 2014-11-07 16:27:06 -05:00
Makefile.lib fix makefiles to respect DTC setting 2015-04-07 08:41:10 -04:00
Makefile.spl kbuild: define DO_DEPS_ONLY for u-boot.cfg to fix build error 2015-05-28 08:18:22 -04:00
Makefile.uncmd_spl kconfig: remove unneeded dependency on !SPL_BUILD 2015-02-24 17:06:27 -05:00
binutils-version.sh scripts: fix binutils-version.sh for 'as' without a package. 2015-01-08 11:00:45 -05:00
checkpatch.pl checkpatch: remove unnecessary + after {8,8} 2014-09-25 09:31:24 -04:00
checkstack.pl scripts/checkstack.pl: update to get AArch64 port from Linux 2015-03-05 11:17:53 -05:00
cleanpatch Makefile: Move some scripts imported from Linux 2013-12-13 09:18:45 -05:00
docproc.c cosmetic: kbuild: clean-up coding style (sync with Linux 3.16-rc1) 2014-06-20 11:56:26 -04:00
dtc-version.sh kbuild: Make scripts executable 2014-11-12 13:25:42 -05:00
fill_scrapyard.py scripts: add a utility to fill blank fields of doc/README.scrapyard 2015-01-14 10:58:49 -05:00
gcc-stack-usage.sh kbuild: Make scripts executable 2014-11-12 13:25:42 -05:00
gcc-version.sh kbuild: Make scripts executable 2014-11-12 13:25:42 -05:00
get_maintainer.pl get_maintainer.pl: fix source tree detection 2014-12-08 09:35:41 -05:00
kernel-doc kbuild: sync misc scripts with Linux 3.18-rc1 2014-11-07 16:27:07 -05:00
ld-version.sh kbuild: sync with Linux Kernel v3.15-rc1 2014-04-18 11:43:36 -04:00
mailmapper tools, scripts: refactor error-out statements of Python scripts 2014-08-21 12:01:11 -04:00
mkmakefile kbuild: Make scripts executable 2014-11-12 13:25:42 -05:00
objdiff scripts: objdiff: sync with Linux 3.16 2014-08-21 12:01:11 -04:00
setlocalversion scripts: refetch scripts/setlocalversion from Linux 3.16 2014-08-28 17:18:48 -04:00
show-gnu-make scripts: add scripts/show-gnu-make to get GNU Make command name 2014-07-29 11:48:36 -04:00