]> git.sur5r.net Git - u-boot/blobdiff - tools/imagetool.c
imx: ventana: gsc: add gsc sleep command
[u-boot] / tools / imagetool.c
index 351211cd5387b9e727ce22501428d2a6af19cc7b..08d191d9f894a6b86afd867de33ec4026c2286f2 100644 (file)
@@ -51,7 +51,8 @@ int imagetool_verify_print_header(
                                 * successful
                                 */
                                if ((*curr)->print_header) {
-                                       (*curr)->print_header(ptr);
+                                       if (!params->quiet)
+                                               (*curr)->print_header(ptr);
                                } else {
                                        fprintf(stderr,
                                                "%s: print_header undefined for %s\n",
@@ -107,6 +108,7 @@ int imagetool_get_filesize(struct image_tool_params *params, const char *fname)
        if (fstat(fd, &sbuf) < 0) {
                fprintf(stderr, "%s: Can't stat %s: %s\n",
                        params->cmdname, fname, strerror(errno));
+               close(fd);
                return -1;
        }
        close(fd);