From: Alain Spineux Date: Mon, 28 Nov 2022 09:20:23 +0000 (+0100) Subject: bscan: initialize the volume type using the device type X-Git-Tag: Beta-15.0.0~335 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6ae88fef66ebd7d04e2ec4a8a0d447188b9221a2;p=thirdparty%2Fbacula.git bscan: initialize the volume type using the device type - bscan was initializing this value to ZERO and this was working as expected because we include ZERO in our SQL query, like in : AND VolType IN (0,%d)", mr->VolType) - I have tested this with File (1) and Dedup (15) devices --- diff --git a/bacula/src/stored/bscan.c b/bacula/src/stored/bscan.c index ba68c6339..5ee839bad 100644 --- a/bacula/src/stored/bscan.c +++ b/bacula/src/stored/bscan.c @@ -506,6 +506,7 @@ static bool record_cb(DCR *dcr, DEV_RECORD *rec) bstrncpy(mr.VolumeName, dev->VolHdr.VolumeName, sizeof(mr.VolumeName)); mr.PoolId = pr.PoolId; mr.VolEncrypted = !!(dev->VolHdr.blkh_options & BLKHOPT_ENCRYPT_VOL); + mr.VolType = dev->dev_type; num_media++; if (db_get_media_record(bjcr, db, &mr)) { if (verbose) {