}
/*-------------------------------------------------------------------------.
-| Write the EOT block(s). We actually zero at least one block, through |
+| Write the EOT block(s). We zero at least two blocks, through |
| the end of the record. Old tar, as previous versions of GNU tar, writes |
| garbage after two zeroed blocks. |
`-------------------------------------------------------------------------*/
write_eot (void)
{
union block *pointer = find_next_block ();
-
- if (pointer)
- {
- size_t space = available_space_after (pointer);
-
- memset (pointer->buffer, 0, space);
- set_next_block_after (pointer);
- }
+ memset (pointer->buffer, 0, BLOCKSIZE);
+ set_next_block_after (pointer);
+ pointer = find_next_block ();
+ memset (pointer->buffer, 0, available_space_after (pointer));
+ set_next_block_after (pointer);
}
/*-----------------------------------------------------.
if (count < 0)
{
char buf[UINTMAX_STRSIZE_BOUND];
- ERROR ((0, errno, _("\
-Read error at byte %s, reading %lu bytes, in file %s"),
+ ERROR ((0, errno,
+ _("Read error at byte %s, reading %lu bytes, in file %s"),
STRINGIFY_BIGINT (fullsize - *sizeleft, buf),
(unsigned long) bufsize, name));
return 1;
if (count < 0)
{
char buf[UINTMAX_STRSIZE_BOUND];
- ERROR ((0, errno, _("\
-Read error at byte %s, reading %lu bytes, in file %s"),
+ ERROR ((0, errno,
+ _("Read error at byte %s, reading %lu bytes, in file %s"),
STRINGIFY_BIGINT (current_stat.st_size - sizeleft,
buf),
(unsigned long) bufsize, p));