X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=common%2Fcmd_fuse.c;h=d4bc0f6c94a17a5e0084dc9ddd7fd5218a7badfc;hb=9aa1280a5644a1d05859b862ebc7b60a862e0ef3;hp=f24c01c2d9ee29206f75d55cbec8b3a36cf73bcf;hpb=47b8e527448c94d09fc8dbdb6601ea7a605ff955;p=u-boot diff --git a/common/cmd_fuse.c b/common/cmd_fuse.c index f24c01c2d9..d4bc0f6c94 100644 --- a/common/cmd_fuse.c +++ b/common/cmd_fuse.c @@ -6,23 +6,7 @@ * Copyright 2008 Silicon Turnkey Express, Inc. * Martha Marx * - * 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 @@ -49,15 +33,8 @@ static int confirm_prog(void) "what you are doing!\n" "\nReally perform this fuse programming? \n"); - if (getc() == 'y') { - int c; - - putc('y'); - c = getc(); - putc('\n'); - if (c == '\r') - return 1; - } + if (confirm_yesno()) + return 1; puts("Fuse programming aborted\n"); return 0; @@ -151,7 +128,7 @@ static int do_fuse(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[]) err: puts("ERROR\n"); - return ret; + return CMD_RET_FAILURE; } U_BOOT_CMD(