From 1b87a611ab42551cd65d30ab75f7b7a27a927c4e Mon Sep 17 00:00:00 2001 From: Nicolas Boichat Date: Wed, 26 Oct 2005 16:06:24 +0000 Subject: [PATCH] Update VolParts when writing the last part (no more free space). git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@2485 91ce42f0-d328-0410-95d8-f526ca767f89 --- bacula/nb-1.37 | 2 ++ bacula/src/stored/block.c | 1 + bacula/src/stored/dvd.c | 2 ++ 3 files changed, 5 insertions(+) diff --git a/bacula/nb-1.37 b/bacula/nb-1.37 index f4c0aa441b..b9bcce64f8 100644 --- a/bacula/nb-1.37 +++ b/bacula/nb-1.37 @@ -4,6 +4,8 @@ General: Changes to 1.37.*: +26Oct05 + - dvd.c: update VolParts when writing the last part. 19Oct05 - configure: add check for dd, remove check for df - block.c:do_dvd_size_checks: Check we are writing to a dvd before doing tests diff --git a/bacula/src/stored/block.c b/bacula/src/stored/block.c index 87c67abe84..5f3f2feb04 100644 --- a/bacula/src/stored/block.c +++ b/bacula/src/stored/block.c @@ -696,6 +696,7 @@ static bool terminate_writing_volume(DCR *dcr) if (dev->is_dvd()) { dvd_write_part(dcr); /* write last part */ + dev->VolCatInfo.VolCatParts = dev->num_parts; } if (!dir_update_volume_info(dcr, false)) { diff --git a/bacula/src/stored/dvd.c b/bacula/src/stored/dvd.c index 578cbaaaf8..417cf5fcec 100644 --- a/bacula/src/stored/dvd.c +++ b/bacula/src/stored/dvd.c @@ -488,6 +488,8 @@ int dvd_open_next_part(DCR *dcr) * needed. If num_parts represents what is on the DVD * we should only need to change it when writing a part * to the DVD. + * NB. As dvd_write_part increments dev->num_parts, I also + * think it is not needed. */ if (dev->num_parts < dev->part) { Dmsg2(100, "Set npart=%d to part=%d\n", dev->num_parts, dev->part); -- 2.39.2