General:
Changes to 1.37.*:
-16Oct05
+17Oct05
+ - Fix bug when recycling DVD devices (append flag was removed).
- Add tests for dvd+rw-format in configure script.
- scripts/dvd-handler: Reformat DVD-RW when needed. This needs dvd+rw-format.
- Add patch for dvd+rw-tools in patches dir (this should probably be elsewhere).
+16Oct05
- Remove scripts/dvd-freespace and scripts/dvd-writepart, as they are now
merged into scripts/dvd-handler. Note: Documentation needs to be updated.
- scripts/dvd-handler: "zero" brand-new DVD+/-RW to fix a problem with some
if (!check_can_write_on_non_blank_dvd(dcr)) {
Mmsg(errmsg, _("The media in the device %s is not empty, please blank it before writing anything to it.\n"), print_name());
Emsg0(M_FATAL, 0, errmsg);
+ unmount_dev(this, 1); /* Unmount the device, so the operator can change it. */
fd = -1;
return;
}
dev->set_mounted(mount); /* set/clear mounted flag */
free_pool_memory(results);
- /* Do not check free space when unmounting (otherwise it will mount it again) */
+ /* Do not check free space when unmounting */
if (mount) {
update_free_space_dev(dev);
}
{
DEVICE *dev = dcr->dev;
- Dmsg4(29, "Enter: ==== open_first_part dev=%s Vol=%s mode=%d num_parts=%d\n", dev->print_name(),
- dev->VolCatInfo.VolCatName, dev->openmode, dev->num_parts);
+ Dmsg5(29, "Enter: ==== open_first_part dev=%s Vol=%s mode=%d num_parts=%d append=%d\n", dev->print_name(),
+ dev->VolCatInfo.VolCatName, dev->openmode, dev->num_parts, dev->can_append());
if (dev->fd >= 0) {
close(dev->fd);
Dmsg2(50, "Call dev->open(vol=%s, mode=%d)\n", dcr->VolCatInfo.VolCatName,
mode);
+ int append = dev->can_append();
if (dev->open(dcr, mode) < 0) {
Dmsg0(50, "open dev() failed\n");
return -1;
}
- Dmsg1(50, "Leave open_first_part state=%s\n", dev->is_open()?"open":"not open");
+ if (append && (dev->part == dev->num_parts)) { /* If needed, set the append flag back */
+ dev->set_append();
+ }
+ Dmsg2(50, "Leave open_first_part state=%s append=%d\n", dev->is_open()?"open":"not open", dev->can_append());
+
return dev->fd;
}