Skip to content
Snippets Groups Projects
Commit ea1440a2 authored by Troy Kisky's avatar Troy Kisky
Browse files

fuse: make fuse read set an environment variable

parent d932fa1b
No related branches found
No related tags found
No related merge requests found
...@@ -62,14 +62,19 @@ static int do_fuse(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[]) ...@@ -62,14 +62,19 @@ static int do_fuse(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
printf("Reading bank %u:\n", bank); printf("Reading bank %u:\n", bank);
for (i = 0; i < cnt; i++, word++) { for (i = 0; i < cnt; i++, word++) {
char name[16];
char vbuf[16];
if (!(i % 4)) if (!(i % 4))
printf("\nWord 0x%.8x:", word); printf("\nWord 0x%.8x: ", word);
ret = fuse_read(bank, word, &val); ret = fuse_read(bank, word, &val);
if (ret) if (ret)
goto err; goto err;
printf(" %.8x", val); snprintf(name, sizeof(name), "fuse_read_val%x", i);
snprintf(vbuf, sizeof(vbuf), "%.8x", val);
env_set(name, vbuf);
puts(vbuf);
} }
putc('\n'); putc('\n');
} else if (!strcmp(op, "sense")) { } else if (!strcmp(op, "sense")) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment