diff options
author | Jakub Kicinski <kuba@kernel.org> | 2023-08-25 00:24:31 +0300 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2023-08-26 04:56:48 +0300 |
commit | a02430c06f56931675f19a914b11a960607b2505 (patch) | |
tree | 1c1d9f35fbe0312b0161120354e5644a8f1b055e /scripts/gdb/linux/vmalloc.py | |
parent | f5e17b471fa88e1e6b430c5df383a04c8caf3707 (diff) | |
download | linux-a02430c06f56931675f19a914b11a960607b2505.tar.xz |
tools: ynl-gen: fix uAPI generation after tempfile changes
We use a tempfile for code generation, to avoid wiping the target
file out if the code generator crashes. File contents are copied
from tempfile to actual destination at the end of main().
uAPI generation is relatively simple so when generating the uAPI
header we return from main() early, and never reach the "copy code
over" stage. Since commit under Fixes uAPI headers are not updated
by ynl-gen.
Move the copy/commit of the code into CodeWriter, to make it
easier to call at any point in time. Hook it into the destructor
to make sure we don't miss calling it.
Fixes: f65f305ae008 ("tools: ynl-gen: use temporary file for rendering")
Link: https://lore.kernel.org/r/20230824212431.1683612-1-kuba@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'scripts/gdb/linux/vmalloc.py')
0 files changed, 0 insertions, 0 deletions