Commit 40866aaf authored by Masahiro Yamada's avatar Masahiro Yamada
Browse files

fiptool: fix existence check of FIP input file for update command



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: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
parent c38b36d8
...@@ -882,7 +882,7 @@ static int update_cmd(int argc, char *argv[]) ...@@ -882,7 +882,7 @@ static int update_cmd(int argc, char *argv[])
if (outfile[0] == '\0') if (outfile[0] == '\0')
snprintf(outfile, sizeof(outfile), "%s", argv[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); parse_fip(argv[0], &toc_header);
if (pflag) if (pflag)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment