force rewrite of output files

This commit is contained in:
Сергей Маринкевич
2022-12-26 19:39:02 +07:00
parent f33df2c4e6
commit c50e4d2c3e
+1 -1
View File
@@ -244,7 +244,7 @@ static int fdt_dump_node_attribute(char * fdt, char * strings, const char *attri
snprintf(out_filename, 128, "./%s", outname);
*strchr(out_filename, '@') = '_';
debug("Open file '%s'\n", out_filename);
fd = open(out_filename, O_WRONLY | O_CREAT, 0666);
fd = open(out_filename, O_WRONLY | O_CREAT | O_TRUNC, 0666);
if (fd < 0)
{
printf("Error: %d\n", errno);