]> git.sur5r.net Git - u-boot/blobdiff - cmd/pxe.c
Merge git://git.denx.de/u-boot-dm
[u-boot] / cmd / pxe.c
index a62cbe192a321781eef0858defeb7b2fadb01bc5..5609545de575d090b27f48fd0d2d2ee61b8bdc73 100644 (file)
--- a/cmd/pxe.c
+++ b/cmd/pxe.c
@@ -1,8 +1,7 @@
+// SPDX-License-Identifier: GPL-2.0+
 /*
  * Copyright 2010-2011 Calxeda, Inc.
  * Copyright (c) 2014, NVIDIA CORPORATION.  All rights reserved.
- *
- * SPDX-License-Identifier:    GPL-2.0+
  */
 
 #include <common.h>
@@ -686,16 +685,17 @@ static int label_boot(cmd_tbl_t *cmdtp, struct pxe_label *label)
                               strlen(ip_str), strlen(mac_str),
                               sizeof(bootargs));
                        return 1;
+               } else {
+                       if (label->append)
+                               strncpy(bootargs, label->append,
+                                       sizeof(bootargs));
+                       strcat(bootargs, ip_str);
+                       strcat(bootargs, mac_str);
+
+                       cli_simple_process_macros(bootargs, finalbootargs);
+                       env_set("bootargs", finalbootargs);
+                       printf("append: %s\n", finalbootargs);
                }
-
-               if (label->append)
-                       strncpy(bootargs, label->append, sizeof(bootargs));
-               strncat(bootargs, ip_str, sizeof(bootargs) - strlen(bootargs));
-               strncat(bootargs, mac_str, sizeof(bootargs) - strlen(bootargs));
-
-               cli_simple_process_macros(bootargs, finalbootargs);
-               env_set("bootargs", finalbootargs);
-               printf("append: %s\n", finalbootargs);
        }
 
        bootm_argv[1] = env_get("kernel_addr_r");
@@ -1453,8 +1453,8 @@ static struct menu *pxe_menu_to_menu(struct pxe_menu *cfg)
        /*
         * Create a menu and add items for all the labels.
         */
-       m = menu_create(cfg->title, cfg->timeout, cfg->prompt, label_print,
-                       NULL, NULL);
+       m = menu_create(cfg->title, DIV_ROUND_UP(cfg->timeout, 10),
+                       cfg->prompt, label_print, NULL, NULL);
 
        if (!m)
                return NULL;