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>
// if (rc < 8) XXX fixup endian ?
check(dmi_write(DBG_WB_DATA, data), "writing WB_DATA");
count += 8;
- if (!(count % 1024))
- printf("%x...\n", count);
+ if (!(count % 1024)) {
+ printf("%x...\r", count);
+ fflush(stdout);
+ }
}
close(fd);
printf("%x done.\n", count);
break;
}
count += 8;
- if (!(count % 1024))
- printf("%x...\n", count);
+ if (!(count % 1024)) {
+ printf("%x...\r", count);
+ fflush(stdout);
+ }
if (count >= size)
break;
}