| 405 | } |
| 406 | |
| 407 | static void |
| 408 | textdump_dump_version(struct dumperinfo *di) |
| 409 | { |
| 410 | u_int len; |
| 411 | |
| 412 | /* |
| 413 | * Write out tar header -- at most one block of version information. |
| 414 | */ |
| 415 | len = min(strlen(version), TEXTDUMP_BLOCKSIZE); |
| 416 | textdump_mkustar(textdump_block_buffer, TAR_VERSION_FILENAME, len); |
| 417 | (void)textdump_writenextblock(di, textdump_block_buffer); |
| 418 | |
| 419 | /* |
| 420 | * Zero pad the version string and write out block. |
| 421 | */ |
| 422 | bzero(textdump_block_buffer, sizeof(textdump_block_buffer)); |
| 423 | bcopy(version, textdump_block_buffer, len); |
| 424 | (void)textdump_writenextblock(di, textdump_block_buffer); |
| 425 | } |
| 426 | |
| 427 | /* |
| 428 | * Commit text dump to disk. |
no test coverage detected