force rewrite of output files

master
Сергей Маринкевич 3 years ago
parent f33df2c4e6
commit c50e4d2c3e

@ -244,7 +244,7 @@ static int fdt_dump_node_attribute(char * fdt, char * strings, const char *attri
snprintf(out_filename, 128, "./%s", outname); snprintf(out_filename, 128, "./%s", outname);
*strchr(out_filename, '@') = '_'; *strchr(out_filename, '@') = '_';
debug("Open file '%s'\n", 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) if (fd < 0)
{ {
printf("Error: %d\n", errno); printf("Error: %d\n", errno);

Loading…
Cancel
Save