PERFORCE change 78868 for review
Peter Wemm
peter at FreeBSD.org
Thu Jun 23 19:19:01 GMT 2005
http://perforce.freebsd.org/chv.cgi?CH=78868
Change 78868 by peter at peter_melody on 2005/06/23 19:18:38
Do a progress countdown for the crashdumps instead of twiddle.
Affected files ...
.. //depot/projects/hammer/sys/amd64/amd64/dump_machdep.c#17 edit
Differences ...
==== //depot/projects/hammer/sys/amd64/amd64/dump_machdep.c#17 (text+ko) ====
@@ -177,6 +177,8 @@
return (error);
}
+#define PG2MB(pgs) ((pgs + (1 << 8) - 1) >> 8)
+
static int
cb_dumpdata(struct md_pa *mdp, int seqnr, void *arg)
{
@@ -194,7 +196,7 @@
pgs = mdp->md_size / PAGE_SIZE;
pa = mdp->md_start;
- printf(" chunk %d: %ld pages ", seqnr, (long)pgs);
+ printf(" chunk %d: %ldMB (%ld pages)", seqnr, PG2MB(pgs), pgs);
while (pgs) {
chunk = pgs;
@@ -203,7 +205,7 @@
sz = chunk << PAGE_SHIFT;
counter += sz;
if (counter >> 24) {
- printf("%c\b", "|/-\\"[twiddle++ & 3]);
+ printf(" %ld", PG2MB(pgs));
counter &= (1<<24) - 1;
}
for (i = 0; i < chunk; i++) {
@@ -222,9 +224,9 @@
if (c == 0x03)
return (ECANCELED);
if (c != -1)
- printf("(CTRL-C to abort) ");
+ printf(" (CTRL-C to abort) ");
}
- printf("... %s\n", (error) ? "fail" : "ok");
+ printf(" ... %s\n", (error) ? "fail" : "ok");
return (error);
}
More information about the p4-projects
mailing list