net: cosmetic: Fixup var names related to boot file
[oweals/u-boot.git] / common / update.c
index 94d6a82aeb1b19478c07706419334815ac15d8e5..bc0c48f29c586ef4f50d8d0528b3bc167679ed4b 100644 (file)
@@ -4,24 +4,7 @@
  * Written by: Rafal Czubak <rcz@semihalf.com>
  *             Bartlomiej Sieka <tur@semihalf.com>
  *
- * See file CREDITS for list of people who contributed to this
- * project.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of
- * the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- * MA 02111-1307 USA
- *
+ * SPDX-License-Identifier:    GPL-2.0+
  */
 
 #include <common.h>
@@ -75,7 +58,7 @@ static int update_load(char *filename, ulong msec_max, int cnt_max, ulong addr)
        saved_timeout_msecs = TftpRRQTimeoutMSecs;
        saved_timeout_count = TftpRRQTimeoutCountMax;
        saved_netretry = strdup(getenv("netretry"));
-       saved_bootfile = strdup(BootFile);
+       saved_bootfile = strdup(net_boot_file_name);
 
        /* set timeouts for auto-update */
        TftpRRQTimeoutMSecs = msec_max;
@@ -86,7 +69,7 @@ static int update_load(char *filename, ulong msec_max, int cnt_max, ulong addr)
 
        /* download the update file */
        load_addr = addr;
-       copy_filename(BootFile, filename, sizeof(BootFile));
+       copy_filename(net_boot_file_name, filename, sizeof(net_boot_file_name));
        size = NetLoop(TFTPGET);
 
        if (size < 0)
@@ -103,7 +86,8 @@ static int update_load(char *filename, ulong msec_max, int cnt_max, ulong addr)
                free(saved_netretry);
 
        if (saved_bootfile != NULL) {
-               copy_filename(BootFile, saved_bootfile, sizeof(BootFile));
+               copy_filename(net_boot_file_name, saved_bootfile,
+                             sizeof(net_boot_file_name));
                free(saved_bootfile);
        }
 
@@ -297,7 +281,7 @@ got_update_file:
                printf("Processing update '%s' :",
                        fit_get_name(fit, noffset, NULL));
 
-               if (!fit_image_check_hashes(fit, noffset)) {
+               if (!fit_image_verify(fit, noffset)) {
                        printf("Error: invalid update hash, aborting\n");
                        ret = 1;
                        goto next_node;