mirror of
https://github.com/opnsense/src.git
synced 2026-06-09 00:32:25 -04:00
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
This commit is contained in:
parent
748f8a5016
commit
990132f07d
1 changed files with 3 additions and 3 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue