X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=common%2Fcmd_jffs2.c;h=bce098315e386cf9348f8a24495fc7f361b6f418;hb=e5a504eb3d8cbc33199dac61a07d16ddd3c1c7f9;hp=0e7a6b0f3b2140d6f89005bce111f791edbf4551;hpb=54841ab50c20d6fa6c9cc3eb826989da3a22d934;p=u-boot diff --git a/common/cmd_jffs2.c b/common/cmd_jffs2.c index 0e7a6b0f3b..bce098315e 100644 --- a/common/cmd_jffs2.c +++ b/common/cmd_jffs2.c @@ -18,23 +18,7 @@ * $Id: cmdlinepart.c,v 1.17 2004/11/26 11:18:47 lavinen Exp $ * Copyright 2002 SYSGO Real-Time Solutions GmbH * - * 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+ */ /* @@ -281,7 +265,7 @@ static inline u32 get_part_sector_size_nor(struct mtdids *id, struct part_info * flash = &flash_info[id->num]; start_phys = flash->start[0] + part->offset; - end_phys = start_phys + part->size; + end_phys = start_phys + part->size - 1; for (i = 0; i < flash->sector_count; i++) { if (flash->start[i] >= end_phys) @@ -525,11 +509,9 @@ int do_jffs2_fsload(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) } if (size > 0) { - char buf[10]; printf("### %s load complete: %d bytes loaded to 0x%lx\n", fsname, size, offset); - sprintf(buf, "%x", size); - setenv("filesize", buf); + setenv_hex("filesize", size); } else { printf("### %s LOAD ERROR<%x> for %s!\n", fsname, size, filename); }