goto good_rtn;
}
flags = ff_pkt->flags;
- ff_pkt->flags &= ~(FO_GZIP|FO_SPARSE);
+ ff_pkt->flags &= ~(FO_GZIP|FO_SPARSE|FO_OFFSETS);
if (flags & FO_ENCRYPT) {
rsrc_stream = STREAM_ENCRYPTED_MACOS_FORK_DATA;
} else {
int zstat;
if (ff_pkt->flags & FO_GZIP) {
- if ((ff_pkt->flags & FO_SPARSE) || (ff_pkt->flags & FO_DELTA)) {
- cbuf = (Bytef *)jcr->compress_buf + SPARSE_FADDR_SIZE;
- max_compress_len = jcr->compress_buf_size - SPARSE_FADDR_SIZE;
+ if ((ff_pkt->flags & FO_SPARSE) || (ff_pkt->flags & FO_OFFSETS)) {
+ cbuf = (Bytef *)jcr->compress_buf + OFFSET_FADDR_SIZE;
+ max_compress_len = jcr->compress_buf_size - OFFSET_FADDR_SIZE;
} else {
cbuf = (Bytef *)jcr->compress_buf;
max_compress_len = jcr->compress_buf_size; /* set max length */
#endif
if (ff_pkt->flags & FO_ENCRYPT) {
- if (ff_pkt->flags & FO_SPARSE) {
- Jmsg0(jcr, M_FATAL, 0, _("Encrypting sparse data not supported.\n"));
+ if ((ff_pkt->flags & FO_SPARSE) || (ff_pkt->flags & FO_OFFSETS)) {
+ Jmsg0(jcr, M_FATAL, 0, _("Encrypting sparse or offset data not supported.\n"));
goto err;
}
/** Allocate the cipher context */
* Make space at beginning of buffer for fileAddr because this
* same buffer will be used for writing if compression is off.
*/
- if ((ff_pkt->flags & FO_SPARSE) || (ff_pkt->flags & FO_DELTA)) {
- rbuf += SPARSE_FADDR_SIZE;
- rsize -= SPARSE_FADDR_SIZE;
+ if ((ff_pkt->flags & FO_SPARSE) || (ff_pkt->flags & FO_OFFSETS)) {
+ rbuf += OFFSET_FADDR_SIZE;
+ rsize -= OFFSET_FADDR_SIZE;
#ifdef HAVE_FREEBSD_OS
/**
* To read FreeBSD partitions, the read size must be
}
if (!allZeros) {
/** Put file address as first data in buffer */
- ser_begin(wbuf, SPARSE_FADDR_SIZE);
+ ser_begin(wbuf, OFFSET_FADDR_SIZE);
ser_uint64(fileAddr); /* store fileAddr in begin of buffer */
}
fileAddr += sd->msglen; /* update file address */
if (allZeros) {
continue; /* skip block of zeros */
}
- } else if (ff_pkt->flags & FO_DELTA) {
+ } else if (ff_pkt->flags & FO_OFFSETS) {
ser_declare;
- ser_begin(wbuf, SPARSE_FADDR_SIZE);
+ ser_begin(wbuf, OFFSET_FADDR_SIZE);
ser_uint64(ff_pkt->bfd.offset); /* store offset in begin of buffer */
}
uint32_t initial_len = 0;
ser_declare;
- if ((ff_pkt->flags & FO_SPARSE) || (ff_pkt->flags & FO_DELTA)) {
- cipher_input_len += SPARSE_FADDR_SIZE;
+ if ((ff_pkt->flags & FO_SPARSE) || (ff_pkt->flags & FO_OFFSETS)) {
+ cipher_input_len += OFFSET_FADDR_SIZE;
}
/** Encrypt the length of the input block */
}
/* Send the buffer to the Storage daemon */
- if ((ff_pkt->flags & FO_SPARSE) || (ff_pkt->flags & FO_DELTA)) {
- sd->msglen += SPARSE_FADDR_SIZE; /* include fileAddr in size */
+ if ((ff_pkt->flags & FO_SPARSE) || (ff_pkt->flags & FO_OFFSETS)) {
+ sd->msglen += OFFSET_FADDR_SIZE; /* include fileAddr in size */
}
sd->msg = wbuf; /* set correct write buffer */
if (!sd->send()) {