- BSR_VOLUME *bsrvol;
- BSR_VOLFILE *volfile;
- uint32_t sfile = UINT32_MAX;
-
- /* Find minimum start file so that we can forward space to it */
- for (volfile = bsr->volfile; volfile; volfile=volfile->next) {
- if (volfile->sfile < sfile) {
- sfile = volfile->sfile;
- }
- }
- /* Now add volumes for this bsr */
- for (bsrvol = bsr->volume; bsrvol; bsrvol=bsrvol->next) {
- vol = new_vol();
- bstrncpy(vol->VolumeName, bsrvol->VolumeName, sizeof(vol->VolumeName));
- bstrncpy(vol->MediaType, bsrvol->MediaType, sizeof(vol->MediaType));
- vol->start_file = sfile;
- if (add_vol(jcr, vol)) {
- jcr->NumVolumes++;
+ BSR_VOLUME *bsrvol;
+ BSR_VOLFILE *volfile;
+ uint32_t sfile = UINT32_MAX;
+
+ /* Find minimum start file so that we can forward space to it */
+ for (volfile = bsr->volfile; volfile; volfile=volfile->next) {
+ if (volfile->sfile < sfile) {
+ sfile = volfile->sfile;
+ }
+ }
+ /* Now add volumes for this bsr */
+ for (bsrvol = bsr->volume; bsrvol; bsrvol=bsrvol->next) {
+ vol = new_restore_volume();
+ bstrncpy(vol->VolumeName, bsrvol->VolumeName, sizeof(vol->VolumeName));
+ bstrncpy(vol->MediaType, bsrvol->MediaType, sizeof(vol->MediaType));
+ bstrncpy(vol->device, bsrvol->device, sizeof(vol->device));
+ vol->Slot = bsrvol->Slot;
+ vol->start_file = sfile;
+ if (add_restore_volume(jcr, vol)) {
+ jcr->NumReadVolumes++;