* Write to the dump device starting at dumpoff. When compression is enabled, * writes to the device will be performed using a callback that gets invoked * when the compression stream's output buffer is full. */
| 1641 | * when the compression stream's output buffer is full. |
| 1642 | */ |
| 1643 | int |
| 1644 | dump_append(struct dumperinfo *di, void *virtual, vm_offset_t physical, |
| 1645 | size_t length) |
| 1646 | { |
| 1647 | void *buf; |
| 1648 | |
| 1649 | if (di->kdcomp != NULL) { |
| 1650 | /* Bounce through a buffer to avoid CRC errors. */ |
| 1651 | if (length > di->maxiosize) |
| 1652 | return (EINVAL); |
| 1653 | buf = di->kdcomp->kdc_buf; |
| 1654 | memmove(buf, virtual, length); |
| 1655 | return (compressor_write(di->kdcomp->kdc_stream, buf, length)); |
| 1656 | } |
| 1657 | return (_dump_append(di, virtual, physical, length)); |
| 1658 | } |
| 1659 | |
| 1660 | /* |
| 1661 | * Write to the dump device at the specified offset. |
no test coverage detected