X-Git-Url: https://git.kernelconcepts.de/?p=karo-tx-uboot.git;a=blobdiff_plain;f=common%2Fcmd_terminal.c;h=4b9c0b34dec2e3956d800f373e98e1d389d71a06;hp=88716072b30c623d8fc70064228cc0bb4e69c57f;hb=9e4e2adbbc4e73d3ea0fdeeede5f297b698492c6;hpb=8d79953d03e6c5b24215609997dafe4daa623cd6 diff --git a/common/cmd_terminal.c b/common/cmd_terminal.c index 88716072b3..4b9c0b34de 100644 --- a/common/cmd_terminal.c +++ b/common/cmd_terminal.c @@ -2,23 +2,7 @@ * (C) Copyright 2007 OpenMoko, Inc. * Written by Harald Welte * - * 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+ */ /* @@ -26,27 +10,19 @@ */ #include #include -#include - -#if defined(CONFIG_CMD_TERMINAL) +#include +#include -int do_terminal(cmd_tbl_t * cmd, int flag, int argc, char *argv[]) +int do_terminal(cmd_tbl_t * cmd, int flag, int argc, char * const argv[]) { - int i, l; int last_tilde = 0; - device_t *dev = NULL; + struct stdio_dev *dev = NULL; if (argc < 1) return -1; /* Scan for selected output/input device */ - for (i = 1; i <= ListNumItems (devlist); i++) { - device_t *tmp = ListGetPtrToItem (devlist, i); - if (!strcmp(tmp->name, argv[1])) { - dev = tmp; - break; - } - } + dev = stdio_get_by_name(argv[1]); if (!dev) return -1; @@ -95,8 +71,6 @@ int do_terminal(cmd_tbl_t * cmd, int flag, int argc, char *argv[]) U_BOOT_CMD( terminal, 3, 1, do_terminal, - "terminal - start terminal emulator\n", + "start terminal emulator", "" ); - -#endif /* CONFIG_CMD_TERMINAL */