| 597 | } |
| 598 | |
| 599 | static bool |
| 600 | tar_write_padding_data(TarMethodFile *f, size_t bytes) |
| 601 | { |
| 602 | PGAlignedXLogBlock zerobuf; |
| 603 | size_t bytesleft = bytes; |
| 604 | |
| 605 | memset(zerobuf.data, 0, XLOG_BLCKSZ); |
| 606 | while (bytesleft) |
| 607 | { |
| 608 | size_t bytestowrite = Min(bytesleft, XLOG_BLCKSZ); |
| 609 | ssize_t r = tar_write(f, zerobuf.data, bytestowrite); |
| 610 | |
| 611 | if (r < 0) |
| 612 | return false; |
| 613 | bytesleft -= r; |
| 614 | } |
| 615 | |
| 616 | return true; |
| 617 | } |
| 618 | |
| 619 | static char * |
| 620 | tar_get_file_name(const char *pathname, const char *temp_suffix) |
no test coverage detected