Index: sbin/savecore/savecore.c =================================================================== --- sbin/savecore/savecore.c +++ sbin/savecore/savecore.c @@ -99,30 +99,37 @@ static void infohandler(int); static void -printheader(xo_handle_t *xo, const struct kerneldumpheader *h, const char *device, - int bounds, const int status) +printheader(xo_handle_t *xo, const struct kerneldumpheader *h, + const char *device, int bounds, const int status) { uint64_t dumplen; time_t t; const char *stat_str; xo_flush_h(xo); - xo_emit_h(xo, "{Lwc:Dump header from device}{:dump_device/%s}\n", device); - xo_emit_h(xo, "{P: }{Lwc:Architecture}{:architecture/%s}\n", h->architecture); - xo_emit_h(xo, "{P: }{Lwc:Architecture Version}{:architecture_version/%u}\n", dtoh32(h->architectureversion)); + xo_emit_h(xo, "{Lwc:Dump header from device}{:dump_device/%s}\n", + device); + xo_emit_h(xo, "{P: }{Lwc:Architecture}{:architecture/%s}\n", + h->architecture); + xo_emit_h(xo, "{P: }{Lwc:Architecture Version}{:architecture_version/%u}\n", + dtoh32(h->architectureversion)); dumplen = dtoh64(h->dumplength); - xo_emit_h(xo, "{P: }{Lwc:Dump Length}{:dump_length_bytes/%lld}\n", (long long)dumplen); - xo_emit_h(xo, "{P: }{Lwc:Blocksize}{:blocksize/%d}\n", dtoh32(h->blocksize)); + xo_emit_h(xo, "{P: }{Lwc:Dump Length}{:dump_length_bytes/%lld}\n", + (long long)dumplen); + xo_emit_h(xo, "{P: }{Lwc:Blocksize}{:blocksize/%d}\n", + dtoh32(h->blocksize)); t = dtoh64(h->dumptime); xo_emit_h(xo, "{P: }{Lwc:Dumptime}{:dumptime/%s}", ctime(&t)); xo_emit_h(xo, "{P: }{Lwc:Hostname}{:hostname/%s}\n", h->hostname); xo_emit_h(xo, "{P: }{Lwc:Magic}{:magic/%s}\n", h->magic); - xo_emit_h(xo, "{P: }{Lwc:Version String}{:version_string/%s}", h->versionstring); - xo_emit_h(xo, "{P: }{Lwc:Panic String}{:panic_string/%s}\n", h->panicstring); + xo_emit_h(xo, "{P: }{Lwc:Version String}{:version_string/%s}", + h->versionstring); + xo_emit_h(xo, "{P: }{Lwc:Panic String}{:panic_string/%s}\n", + h->panicstring); xo_emit_h(xo, "{P: }{Lwc:Dump Parity}{:dump_parity/%u}\n", h->parity); xo_emit_h(xo, "{P: }{Lwc:Bounds}{:bounds/%d}\n", bounds); - switch(status) { + switch (status) { case STATUS_BAD: stat_str = "bad"; break; @@ -131,13 +138,15 @@ break; default: stat_str = "unknown"; + break; } xo_emit_h(xo, "{P: }{Lwc:Dump Status}{:dump_status/%s}\n", stat_str); xo_flush_h(xo); } static int -getbounds(void) { +getbounds(void) +{ FILE *fp; char buf[6]; int ret; @@ -168,7 +177,8 @@ } static void -writebounds(int bounds) { +writebounds(int bounds) +{ FILE *fp; if ((fp = fopen("bounds", "w")) == NULL) {