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
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
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
menuconfig.py