scripts/mw_debug: Make progress counts display on one line

This outputs a carriage return rather than a newline after the
display of the progress count during the load and save operations.
This makes the output more compact and better looking.

Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
jtag-port
Paul Mackerras 5 years ago
parent 03f9d7a97e
commit aab84acda8

@ -507,8 +507,10 @@ static void load(const char *filename, uint64_t addr)
// if (rc < 8) XXX fixup endian ? // if (rc < 8) XXX fixup endian ?
check(dmi_write(DBG_WB_DATA, data), "writing WB_DATA"); check(dmi_write(DBG_WB_DATA, data), "writing WB_DATA");
count += 8; count += 8;
if (!(count % 1024)) if (!(count % 1024)) {
printf("%x...\n", count); printf("%x...\r", count);
fflush(stdout);
}
} }
close(fd); close(fd);
printf("%x done.\n", count); printf("%x done.\n", count);
@ -535,8 +537,10 @@ static void save(const char *filename, uint64_t addr, uint64_t size)
break; break;
} }
count += 8; count += 8;
if (!(count % 1024)) if (!(count % 1024)) {
printf("%x...\n", count); printf("%x...\r", count);
fflush(stdout);
}
if (count >= size) if (count >= size)
break; break;
} }

Loading…
Cancel
Save