Print the dump progress indicator after calling dump_start().
Dumpers may wish to print messages from an initialization hook; this change ensures that such messages aren't mixed with output from the generic dump code. MFC after: 1 week
This commit is contained in:
parent
a3eb1e9afb
commit
65dc9f377b
@ -337,13 +337,13 @@ minidumpsys(struct dumperinfo *di)
|
||||
dump_init_header(di, &kdh, KERNELDUMPMAGIC, KERNELDUMP_AMD64_VERSION,
|
||||
dumpsize);
|
||||
|
||||
printf("Dumping %llu out of %ju MB:", (long long)dumpsize >> 20,
|
||||
ptoa((uintmax_t)physmem) / 1048576);
|
||||
|
||||
error = dump_start(di, &kdh);
|
||||
if (error != 0)
|
||||
goto fail;
|
||||
|
||||
printf("Dumping %llu out of %ju MB:", (long long)dumpsize >> 20,
|
||||
ptoa((uintmax_t)physmem) / 1048576);
|
||||
|
||||
/* Dump my header */
|
||||
bzero(&fakepd, sizeof(fakepd));
|
||||
bcopy(&mdhdr, &fakepd, sizeof(mdhdr));
|
||||
|
@ -246,13 +246,13 @@ minidumpsys(struct dumperinfo *di)
|
||||
dump_init_header(di, &kdh, KERNELDUMPMAGIC, KERNELDUMP_ARM_VERSION,
|
||||
dumpsize);
|
||||
|
||||
printf("Physical memory: %u MB\n", ptoa((uintmax_t)physmem) / 1048576);
|
||||
printf("Dumping %llu MB:", (long long)dumpsize >> 20);
|
||||
|
||||
error = dump_start(di, &kdh);
|
||||
if (error != 0)
|
||||
goto fail;
|
||||
|
||||
printf("Physical memory: %u MB\n", ptoa((uintmax_t)physmem) / 1048576);
|
||||
printf("Dumping %llu MB:", (long long)dumpsize >> 20);
|
||||
|
||||
/* Dump my header */
|
||||
bzero(dumpbuf, sizeof(dumpbuf));
|
||||
bcopy(&mdhdr, dumpbuf, sizeof(mdhdr));
|
||||
|
@ -289,13 +289,13 @@ minidumpsys(struct dumperinfo *di)
|
||||
dump_init_header(di, &kdh, KERNELDUMPMAGIC, KERNELDUMP_AARCH64_VERSION,
|
||||
dumpsize);
|
||||
|
||||
printf("Dumping %llu out of %ju MB:", (long long)dumpsize >> 20,
|
||||
ptoa((uintmax_t)physmem) / 1048576);
|
||||
|
||||
error = dump_start(di, &kdh);
|
||||
if (error != 0)
|
||||
goto fail;
|
||||
|
||||
printf("Dumping %llu out of %ju MB:", (long long)dumpsize >> 20,
|
||||
ptoa((uintmax_t)physmem) / 1048576);
|
||||
|
||||
/* Dump my header */
|
||||
bzero(&tmpbuffer, sizeof(tmpbuffer));
|
||||
bcopy(&mdhdr, &tmpbuffer, sizeof(mdhdr));
|
||||
|
@ -254,13 +254,13 @@ minidumpsys(struct dumperinfo *di)
|
||||
dump_init_header(di, &kdh, KERNELDUMPMAGIC, KERNELDUMP_I386_VERSION,
|
||||
dumpsize);
|
||||
|
||||
printf("Physical memory: %ju MB\n", ptoa((uintmax_t)physmem) / 1048576);
|
||||
printf("Dumping %llu MB:", (long long)dumpsize >> 20);
|
||||
|
||||
error = dump_start(di, &kdh);
|
||||
if (error != 0)
|
||||
goto fail;
|
||||
|
||||
printf("Physical memory: %ju MB\n", ptoa((uintmax_t)physmem) / 1048576);
|
||||
printf("Dumping %llu MB:", (long long)dumpsize >> 20);
|
||||
|
||||
/* Dump my header */
|
||||
bzero(&fakept, sizeof(fakept));
|
||||
bcopy(&mdhdr, &fakept, sizeof(mdhdr));
|
||||
|
@ -330,13 +330,13 @@ dumpsys_generic(struct dumperinfo *di)
|
||||
dump_init_header(di, &kdh, KERNELDUMPMAGIC, KERNELDUMP_ARCH_VERSION,
|
||||
dumpsize);
|
||||
|
||||
printf("Dumping %ju MB (%d chunks)\n", (uintmax_t)dumpsize >> 20,
|
||||
ehdr.e_phnum - DUMPSYS_NUM_AUX_HDRS);
|
||||
|
||||
error = dump_start(di, &kdh);
|
||||
if (error != 0)
|
||||
goto fail;
|
||||
|
||||
printf("Dumping %ju MB (%d chunks)\n", (uintmax_t)dumpsize >> 20,
|
||||
ehdr.e_phnum - DUMPSYS_NUM_AUX_HDRS);
|
||||
|
||||
/* Dump ELF header */
|
||||
error = dumpsys_buf_write(di, (char*)&ehdr, sizeof(ehdr));
|
||||
if (error)
|
||||
|
@ -264,13 +264,13 @@ minidumpsys(struct dumperinfo *di)
|
||||
dump_init_header(di, &kdh, KERNELDUMPMAGIC, KERNELDUMP_MIPS_VERSION,
|
||||
dumpsize);
|
||||
|
||||
printf("Dumping %llu out of %ju MB:", (long long)dumpsize >> 20,
|
||||
ptoa((uintmax_t)physmem) / 1048576);
|
||||
|
||||
error = dump_start(di, &kdh);
|
||||
if (error != 0)
|
||||
goto fail;
|
||||
|
||||
printf("Dumping %llu out of %ju MB:", (long long)dumpsize >> 20,
|
||||
ptoa((uintmax_t)physmem) / 1048576);
|
||||
|
||||
/* Dump my header */
|
||||
bzero(tmpbuffer, sizeof(tmpbuffer));
|
||||
bcopy(&mdhdr, tmpbuffer, sizeof(mdhdr));
|
||||
|
@ -98,12 +98,12 @@ dumpsys(struct dumperinfo *di)
|
||||
dump_init_header(di, &kdh, KERNELDUMPMAGIC, KERNELDUMP_SPARC64_VERSION,
|
||||
size);
|
||||
|
||||
printf("Dumping %lu MB (%d chunks)\n", (u_long)(size >> 20), nreg);
|
||||
|
||||
error = dump_start(di, &kdh);
|
||||
if (error != 0)
|
||||
goto fail;
|
||||
|
||||
printf("Dumping %lu MB (%d chunks)\n", (u_long)(size >> 20), nreg);
|
||||
|
||||
/* Dump the private header. */
|
||||
hdr.dh_hdr_size = hdrsize;
|
||||
hdr.dh_tsb_pa = tsb_kernel_phys;
|
||||
|
Loading…
Reference in New Issue
Block a user