From 990132f07db39b80c1ed103e5832adf200834e5f Mon Sep 17 00:00:00 2001 From: Robert Watson Date: Thu, 31 Jan 2008 16:22:14 +0000 Subject: [PATCH] Use dump_write() instead of direct calls to di->dumper() in textdumps. Textdumps already do pretty much the same sanity checking, but abstractions and seatbelts are both useful. MFC after: 2 months --- sys/ddb/db_textdump.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/ddb/db_textdump.c b/sys/ddb/db_textdump.c index a876278066b..fbfc18f33cb 100644 --- a/sys/ddb/db_textdump.c +++ b/sys/ddb/db_textdump.c @@ -259,8 +259,8 @@ textdump_writeblock(struct dumperinfo *di, off_t offset, char *buffer) return (EIO); if (offset < SIZEOF_METADATA) return (ENOSPC); - textdump_error = di->dumper(di->priv, buffer, 0, offset + - di->mediaoffset, TEXTDUMP_BLOCKSIZE); + textdump_error = dump_write(di, buffer, 0, offset + di->mediaoffset, + TEXTDUMP_BLOCKSIZE); return (textdump_error); } @@ -502,7 +502,7 @@ textdump_dumpsys(struct dumperinfo *di) * Terminate the dump, report any errors, and clear the pending flag. */ if (textdump_error == 0) - (void)di->dumper(di->priv, NULL, 0, 0, 0); + (void)dump_write(di, NULL, 0, 0, 0); if (textdump_error == ENOSPC) printf("Insufficient space on dump partition\n"); else if (textdump_error != 0)