ct_compress,
ct_gzip,
ct_bzip2,
+ ct_lzip,
ct_lzma,
ct_lzop,
ct_xz
{ ct_compress, 2, "\037\235", COMPRESS_PROGRAM, "-Z" },
{ ct_gzip, 2, "\037\213", GZIP_PROGRAM, "-z" },
{ ct_bzip2, 3, "BZh", BZIP2_PROGRAM, "-j" },
+ { ct_lzip, 4, "LZIP", LZIP_PROGRAM, "--lzip" },
{ ct_lzma, 6, "\xFFLZMA", LZMA_PROGRAM, "--lzma" },
{ ct_lzop, 4, "\211LZO", LZOP_PROGRAM, "--lzop" },
{ ct_xz, 6, "\0xFD7zXZ", XZ_PROGRAM, "-J" },
off_t start = current_block_ordinal ();
off_t offset;
off_t nrec, nblk;
- off_t skipped = (blocking_factor - (current_block - record_start));
+ off_t skipped = (blocking_factor - (current_block - record_start))
+ * BLOCKSIZE;
- size -= skipped * BLOCKSIZE;
-
- if (size < record_size)
+ if (size <= skipped)
return 0;
- /* FIXME: flush? */
-
+
/* Compute number of records to skip */
- nrec = size / record_size;
+ nrec = (size - skipped) / record_size;
+ if (nrec == 0)
+ return 0;
offset = rmtlseek (archive, nrec * record_size, SEEK_CUR);
if (offset < 0)
return offset;
check_label_pattern (const char *label)
{
char *string;
- bool result;
+ bool result = false;
if (fnmatch (volume_label_option, label, 0) == 0)
return true;
switch (wanted_access)
{
case ACCESS_READ:
+ case ACCESS_UPDATE:
if (volume_label_option)
match_volume_label ();
break;
if (volume_label_option)
write_volume_label ();
break;
-
- default:
- break;
}
set_volume_start_time ();
}