X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=common%2Fcmd_reiser.c;h=887156486a136af8235e8d25b54f582c0ecd7ca4;hb=015999584167b946dbc8f0c4fee96cc806dd10cc;hp=2865014463d352ab951eb120a82e1f9c2c4af341;hpb=650f36641ccfe1c2444277891da7c76cdde99f8b;p=u-boot diff --git a/common/cmd_reiser.c b/common/cmd_reiser.c index 2865014463..887156486a 100644 --- a/common/cmd_reiser.c +++ b/common/cmd_reiser.c @@ -3,24 +3,7 @@ * Sysgo Real-Time Solutions, AG * Pavel Bartusek * - * 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+ */ /* @@ -57,7 +40,7 @@ int do_reiserls (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) if (argc < 3) return CMD_RET_USAGE; - part = get_device_and_partition(argv[1], argv[2], &dev_desc, &info); + part = get_device_and_partition(argv[1], argv[2], &dev_desc, &info, 1); if (part < 0) return 1; @@ -100,7 +83,6 @@ int do_reiserload (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) ulong addr = 0, filelen; disk_partition_t info; block_dev_desc_t *dev_desc = NULL; - char buf [12]; unsigned long count; char *addr_str; @@ -140,7 +122,7 @@ int do_reiserload (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) return 1; } - part = get_device_and_partition(argv[1], argv[2], &dev_desc, &info); + part = get_device_and_partition(argv[1], argv[2], &dev_desc, &info, 1); if (part < 0) return 1; @@ -159,7 +141,7 @@ int do_reiserload (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) filelen = reiserfs_open(filename); if (filelen < 0) { - printf("** File not found %s\n", filename); + printf("** File not found %s **\n", filename); return 1; } if ((count < filelen) && (count != 0)) { @@ -175,8 +157,7 @@ int do_reiserload (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) load_addr = addr; printf ("\n%ld bytes read\n", filelen); - sprintf(buf, "%lX", filelen); - setenv("filesize", buf); + setenv_hex("filesize", filelen); return filelen; }