- The problem is that the ?numerous? "dev->capabilities |= CAP_LSEEK"
are overwritten by dev->device_generic_init() in init_dev() that
does a "dev->capabilities = device->cap_bits;"
- Now Bacula display the second line below just after the 1st one when
appending a already used volume
= 01-Dec 09:34 127.0.0.1-sd JobId 1: Volume "Vol0001" previously written, moving to end of data.
+ 01-Dec 09:34 127.0.0.1-sd JobId 1: Ready to append to end of Volume "Vol0001" size=21,857,409
this can be seen in restart-job-test
return NULL;
}
dev = New(cloud_dev(jcr, device));
- dev->capabilities |= CAP_LSEEK;
+ dev->capabilities |= CAP_LSEEK; /* ATTN overwritten in init_dev() later */
return dev;
}
{
Enter(dbglvl);
m_fd = -1;
- capabilities |= CAP_LSEEK;
+ capabilities |= CAP_LSEEK; /* ATTN overwritten in init_dev() later */
/* Initialize Cloud driver */
if (!driver) {
/* Do device specific initialization */
dev->device_specific_init(jcr, device);
+ if (device->dev_type == B_FILE_DEV || device->dev_type == B_CLOUD_DEV) {
+ dev->capabilities |= CAP_LSEEK;
+ }
+
/* ***FIXME*** move to fifo driver */
if (dev->is_fifo()) {
dev->capabilities |= CAP_STREAM; /* set stream device */