summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorwdenk <wdenk>2003-10-06 21:55:32 +0000
committerwdenk <wdenk>2003-10-06 21:55:32 +0000
commitfbe4b5cbdea438ccec0d93de443f367f3ba46196 (patch)
tree7a0a65dbae5217950bcc6301a435a074263fa0a7 /common
parentbb65a312675f3cd1923a5cbe325ad9ca1703fc58 (diff)
downloadu-boot-imx-fbe4b5cbdea438ccec0d93de443f367f3ba46196.zip
u-boot-imx-fbe4b5cbdea438ccec0d93de443f367f3ba46196.tar.gz
u-boot-imx-fbe4b5cbdea438ccec0d93de443f367f3ba46196.tar.bz2
* Update TRAB auto update code
* Make fatload set filesize environment variable fix potential buffer overlow problem * enable basic / medium / high-end configurations for PPChameleonEVB board; fix NAND code * enable TFTP client code to specify to the server the desired timeout value (see RFC-2349)
Diffstat (limited to 'common')
-rw-r--r--common/cmd_fat.c9
-rw-r--r--common/cmd_fdos.c2
2 files changed, 8 insertions, 3 deletions
diff --git a/common/cmd_fat.c b/common/cmd_fat.c
index 2a1da95..c5b3f06 100644
--- a/common/cmd_fat.c
+++ b/common/cmd_fat.c
@@ -74,6 +74,7 @@ int do_fat_fsload (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
long size;
unsigned long offset;
unsigned long count;
+ char buf [12];
block_dev_desc_t *dev_desc=NULL;
int dev=0;
int part=1;
@@ -107,11 +108,15 @@ int do_fat_fsload (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
count = 0;
size = file_fat_read (argv[4], (unsigned char *) offset, count);
- if(size==-1)
+ if(size==-1) {
printf("\n** Unable to read \"%s\" from %s %d:%d **\n",argv[4],argv[1],dev,part);
- else
+ } else {
printf ("\n%ld bytes read\n", size);
+ sprintf(buf, "%lX", size);
+ setenv("filesize", buf);
+ }
+
return size;
}
diff --git a/common/cmd_fdos.c b/common/cmd_fdos.c
index adaddcd..dc02b35 100644
--- a/common/cmd_fdos.c
+++ b/common/cmd_fdos.c
@@ -43,7 +43,7 @@ int do_fdosboot(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
char *ep;
int size;
int rcode = 0;
- char buf [10];
+ char buf [12];
int drive = CFG_FDC_DRIVE_NUMBER;
/* pre-set load_addr */