fs: Use new numeric setenv functions

Use setenv_ulong(), setenv_hex() and setenv_addr() in fs/

Signed-off-by: Simon Glass <sjg@chromium.org>
master
Simon Glass 11 years ago
parent 41ef372c1a
commit 49c4f0370b
  1. 4
      fs/fs.c
  2. 4
      fs/ubifs/ubifs.c

@ -256,7 +256,6 @@ int do_load(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[],
unsigned long bytes; unsigned long bytes;
unsigned long pos; unsigned long pos;
int len_read; int len_read;
char buf[12];
unsigned long time; unsigned long time;
if (argc < 2) if (argc < 2)
@ -308,8 +307,7 @@ int do_load(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[],
} }
puts("\n"); puts("\n");
sprintf(buf, "0x%x", len_read); setenv_hex("filesize", len_read);
setenv("filesize", buf);
return 0; return 0;
} }

@ -687,7 +687,6 @@ int ubifs_load(char *filename, u32 addr, u32 size)
int i; int i;
int count; int count;
int last_block_size = 0; int last_block_size = 0;
char buf [10];
c->ubi = ubi_open_volume(c->vi.ubi_num, c->vi.vol_id, UBI_READONLY); c->ubi = ubi_open_volume(c->vi.ubi_num, c->vi.vol_id, UBI_READONLY);
/* ubifs_findfile will resolve symlinks, so we know that we get /* ubifs_findfile will resolve symlinks, so we know that we get
@ -740,8 +739,7 @@ int ubifs_load(char *filename, u32 addr, u32 size)
if (err) if (err)
printf("Error reading file '%s'\n", filename); printf("Error reading file '%s'\n", filename);
else { else {
sprintf(buf, "%X", size); setenv_hex("filesize", size);
setenv("filesize", buf);
printf("Done\n"); printf("Done\n");
} }

Loading…
Cancel
Save