]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - common/cmd_bootmenu.c
arm: am43xx: enable spi clock
[karo-tx-uboot.git] / common / cmd_bootmenu.c
index a3cbffab24e4017d999752973b8f9a847ca5b8d5..5879065c2ea45cc7b9731884aad1aa9a95128340 100644 (file)
@@ -1,30 +1,13 @@
 /*
  * (C) Copyright 2011-2013 Pali Rohár <pali.rohar@gmail.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>
 #include <command.h>
 #include <ansi.h>
 #include <menu.h>
-#include <hush.h>
 #include <watchdog.h>
 #include <malloc.h>
 #include <linux/string.h>
@@ -64,12 +47,12 @@ enum bootmenu_key {
 
 static char *bootmenu_getoption(unsigned short int n)
 {
-       char name[MAX_ENV_SIZE] = "bootmenu_";
+       char name[MAX_ENV_SIZE];
 
        if (n > MAX_COUNT)
                return NULL;
 
-       sprintf(name + 9, "%d", n);
+       sprintf(name, "bootmenu_%d", n);
        return getenv(name);
 }