This line should check the existence of the input file, but it is
actually checking the output file. When -o option is given to the
"update" command, the outfile is unlikely to exist, then parse_fip()
is skipped and an empty FIP file is output. This is wrong behavior.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
if (outfile[0] == '\0')
snprintf(outfile, sizeof(outfile), "%s", argv[0]);
- if (access(outfile, F_OK) == 0)
+ if (access(argv[0], F_OK) == 0)
parse_fip(argv[0], &toc_header);
if (pflag)