diff options
author | Masahiro Yamada <yamada.masahiro@socionext.com> | 2016-12-25 12:41:41 +0900 |
---|---|---|
committer | Masahiro Yamada <yamada.masahiro@socionext.com> | 2017-01-27 13:21:21 +0900 |
commit | 40866aaf1c60b31d46b1b969598e3403a4d8a6c1 (patch) | |
tree | d20c513821966dca9aa23dd9b64b5935c14afa91 /tools | |
parent | c38b36d8a069f29b98f11a6dcdc3631317d2a992 (diff) |
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: Masahiro Yamada <yamada.masahiro@socionext.com>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/fiptool/fiptool.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/fiptool/fiptool.c b/tools/fiptool/fiptool.c index 6145e26d..d51d6ab9 100644 --- a/tools/fiptool/fiptool.c +++ b/tools/fiptool/fiptool.c @@ -882,7 +882,7 @@ static int update_cmd(int argc, char *argv[]) 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) |