zephyr/scripts/kconfig
Tomi Ollila 66d1b3ce10 kconfig: kconfiglib.py: Backup files only
The _save_old() to return early if <filename> is not file (or symlink
to a file).

This is simplest alternative to avoid attempt to rename /dev/null
(which could succeed).

This also keeps fifos (perhaps nonexistent potential usage but
this is nicer).

If <filename> were directory or socket, after shutil.copyfile(),
writing to the file (by caller, _write_config()), would fail.

Fixes #31362

Co-authored-by: Marti Bolivar <marti.bolivar@nordicsemi.no>
Signed-off-by: Tomi Ollila <tomi.ollila@iki.fi>
2021-01-28 10:40:24 -05:00
..
diffconfig
guiconfig.py kconfig/devicetree: Print path to headers when configuring 2020-01-31 19:45:43 +01:00
hardenconfig.py hardening: Deal with empty lines in csv file 2020-08-12 16:43:18 -04:00
hardened.csv benchmarking: remove execution benchmarking code 2020-09-05 13:28:38 -05:00
kconfig.py cmake: using ${ZEPHYR_BASE} instead of $ENV{ZEPHYR_BASE} 2020-03-27 16:23:46 +01:00
kconfigfunctions.py scripts/Kconfig: Add dt_node_has_prop Kconfig function 2021-01-15 10:29:30 -05:00
kconfiglib.py kconfig: kconfiglib.py: Backup files only 2021-01-28 10:40:24 -05:00
lint.py scripts: kconfig: lint.py: Add check for missing CONFIG_ prefix 2020-01-31 19:29:49 +01:00
menuconfig.py kconfig/devicetree: Print path to headers when configuring 2020-01-31 19:45:43 +01:00