cmd = self.growcmd + self.growparams
if newvol:
- cmd += " -Z "
# Ignore any existing iso9660 filesystem - used for truncate
if newvol == 2:
- cmd += "-use-the-force-luke=tty "
+ cmd += " -use-the-force-luke=tty"
+ cmd += " -Z "
else:
cmd += " -M "
cmd += self.device + " " + str(partfile)
if (dev->VolCatInfo.VolCatName[0] == 0) {
Pmsg0(000, _("NULL Volume name. This shouldn't happen!!!\n"));
}
- Dmsg1(20, "Begin append device=%s\n", dev->print_name());
+ Dmsg1(50, "Begin append device=%s\n", dev->print_name());
begin_data_spool(dcr);
begin_attribute_spool(jcr);
struct stat statp;
int part_save = part;
POOL_MEM archive_name(PM_FNAME);
+ int status;
part = num_dvd_parts;
Dmsg3(100, "Remove empty part in close call make_dvd_filename. part=%d num=%d vol=%s\n",
part, num_dvd_parts, VolCatInfo.VolCatName);
make_spooled_dvd_filename(this, archive_name);
/* Check that the part file is empty */
- if ((stat(archive_name.c_str(), &statp) == 0) && (statp.st_size == 0)) {
+ status = stat(archive_name.c_str(), &statp);
+ if (status == 0 && statp.st_size == 0) {
Dmsg1(100, "unlink(%s)\n", archive_name.c_str());
unlink(archive_name.c_str());
- }
+ set_part_spooled(false); /* no spooled part left */
+ } else if (status < 0) {
+ set_part_spooled(false); /* spool doesn't exit */
+ }
part = part_save; /* restore part number */
}
}
results = get_memory(2000);
results[0] = 0;
+
/* If busy retry each second */
+ Dmsg1(20, "do_mount run_prog=%s\n", ocmd.c_str());
while ((status = run_program_full_output(ocmd.c_str(),
max_open_wait/2, results)) != 0) {
/* Doesn't work with internationalisation (This is not a problem) */
results = get_memory(2000);
results[0] = 0;
/* If busy retry each second */
- Dmsg1(100, "Run prog=%s\n", ocmd.c_str());
+ Dmsg1(20, "Run mount prog=%s\n", ocmd.c_str());
while ((status = run_program_full_output(ocmd.c_str(),
dev->max_open_wait/2, results)) != 0) {
Dmsg2(99, "Mount status=%d result=%s\n", status, results);
- /* Doesn't work with internationalisation (This is not a problem) */
+ /* Doesn't work with internationalization (This is not a problem) */
if (mount && fnmatch("*is already mounted on*", results, 0) == 0) {
break;
}
while (1) {
berrno be;
- Dmsg1(100, "Run prog=%s\n", ocmd.c_str());
+ Dmsg1(20, "Run freespace prog=%s\n", ocmd.c_str());
status = run_program_full_output(ocmd.c_str(), dev->max_open_wait/2, results);
if (status == 0) {
free = str_to_int64(results);
else
timeout = dev->max_open_wait + (dev->part_size/(1350*1024/4));
- Dmsg2(29, "dvd_write_part: cmd=%s timeout=%d\n", ocmd.c_str(), timeout);
-
+ Dmsg2(20, "dvd_write_part: cmd=%s timeout=%d\n", ocmd.c_str(), timeout);
status = run_program_full_output(ocmd.c_str(), timeout, results.c_str());
if (status != 0) {
return false;
}
Jmsg(dcr->jcr, M_INFO, 0, _("Part %d written to DVD.\n"), dev->part);
+ Dmsg2(400, "dvd_write_part: Part %d written to DVD\nResults: %s\n",
+ dev->part, results.c_str());
+
if (dev->truncated_dvd) {
dev->truncated_dvd = false; /* turn off flag */
} else { /* DVD part written */
return false;
}
- Dmsg6(20, "Write sesson_label record JobId=%d FI=%s SessId=%d Strm=%s len=%d "
+ Dmsg6(50, "Write sesson_label record JobId=%d FI=%s SessId=%d Strm=%s len=%d "
"remainder=%d\n", jcr->JobId,
FI_to_ascii(buf1, rec->FileIndex), rec->VolSessionId,
stream_to_ascii(buf2, rec->Stream, rec->FileIndex), rec->data_len,
rec->remainder);
free_record(rec);
- Dmsg2(20, "Leave write_session_label Block=%d File=%d\n",
+ Dmsg2(50, "Leave write_session_label Block=%d File=%d\n",
dev->block_num, dev->file);
return true;
}
} else if (dev->at_eof()) {
if (verbose) {
- Jmsg(jcr, M_INFO, 0, _("End of file %u on device %s, Volume \"%s\"\n"),
- dev->file, dev->print_name(), dcr->VolumeName);
+ char dvdpart[100];
+ if (dev->is_dvd()) {
+ bsnprintf(dvdpart, sizeof(dvdpart), _("part %d "), dev->part);
+ } else {
+ dvdpart[0] = 0;
+ }
+ Jmsg(jcr, M_INFO, 0, _("End of file %u %son device %s, Volume \"%s\"\n"),
+ dev->file, dvdpart, dev->print_name(), dcr->VolumeName);
}
Dmsg3(200, "End of file %u on device %s, Volume \"%s\"\n",
dev->file, dev->print_name(), dcr->VolumeName);
#undef VERSION
#define VERSION "1.39.21"
-#define BDATE "31 August 2006"
-#define LSMDATE "31Aug06"
+#define BDATE "01 Septermber 2006"
+#define LSMDATE "01Sep06"
#define BYEAR "2006" /* year for copyright messages in progs */
/* Debug flags */
Technical notes on version 1.39
General:
+01Sep06
+kes Apply new dvd-handler patch from Richard Mortimer.
+kes Tweak so that debug level 20 shows only DVD commands.
+kes Correct spooled_part flag in dev.c close() so that it is cleared
+ when the spool file is deleted or does not exist.
+kes Print part number in read_records when eof hit (restore).
31Aug06
kes Make find with no args in tree restore return error rather than
stopping the selection. Fixes bug #665