X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;ds=inline;f=common%2Fcmd_terminal.c;h=4b9c0b34dec2e3956d800f373e98e1d389d71a06;hb=4ca0c3c993436cca743ed521e7f3d784d7fe31c8;hp=57943c10b9a06706ea1f8b6e78c25bb467264229;hpb=3de7bf0e6b1ad2608014096c8192f13229b2e9d7;p=u-boot diff --git a/common/cmd_terminal.c b/common/cmd_terminal.c index 57943c10b9..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,25 +10,19 @@ */ #include #include -#include +#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; @@ -93,6 +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", "" );