]> git.ipfire.org Git - thirdparty/bacula.git/commitdiff
bvfs: Add VolType to .bvfs_versions
authorEric Bollengier <eric@baculasystems.com>
Fri, 30 Sep 2022 06:11:35 +0000 (08:11 +0200)
committerEric Bollengier <eric@baculasystems.com>
Thu, 14 Sep 2023 11:56:59 +0000 (13:56 +0200)
bacula/src/cats/bvfs.c
bacula/src/cats/bvfs.h
bacula/src/dird/ua_dotcmds.c

index d451d613ef7eb1a3ccce64777d15abb90d849eb6..4b074059bd255278d8120820416c25a2154b2264 100644 (file)
@@ -916,8 +916,8 @@ void Bvfs::get_all_file_versions(DBId_t pathid, FileId_t fnid, alist *clients)
 "SELECT DISTINCT 'V', File.PathId, File.FileId,  File.JobId, "
 //         4          5           6
         "File.LStat, File.FileId, File.Md5,  "
-//         7                    8
-       "Media.VolumeName, Media.InChanger "
+//         7                    8             9
+       "Media.VolumeName, Media.InChanger, Media.VolType "
 "FROM File, Job, Client, JobMedia, Media "
 "WHERE File.Filename = %s "
   "AND File.PathId = %s "
index 35454df8bd0cf256da9f613632fc60f4d39927a8..ef8855ce3aaac1ed456bbac101bd453e2bce60d6 100644 (file)
@@ -60,6 +60,7 @@ typedef enum {
    BVFS_Md5     = 6,
    BVFS_VolName = 7,
    BVFS_VolInchanger = 8,
+   BVFS_VolType  = 9,
 
    /* Only if Delta record */
    BVFS_DeltaSeq = 6,
index a89d0dfe89ba118c5fc9c682cf3924b13926cd3f..6cb83f05559a5b7b5334d21b7b3944b579a2c85b 100644 (file)
@@ -494,10 +494,10 @@ static int bvfs_result_handler(void *ctx, int fields, char **row)
                    jobid, lstat, path);
 
    } else if (bvfs_is_version(row)) {
-      ua->send_msg("%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\n", row[BVFS_PathId],
+      ua->send_msg("%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\n", row[BVFS_PathId],
                    row[BVFS_FilenameId], fileid, jobid,
                    lstat, row[BVFS_Md5], row[BVFS_VolName],
-                   row[BVFS_VolInchanger]);
+                   row[BVFS_VolInchanger], row[BVFS_VolType]);
 
    } else if (bvfs_is_file(row)) {
       ua->send_msg("%s\t%s\t%s\t%s\t%s\t%s\n", row[BVFS_PathId],
@@ -505,8 +505,8 @@ static int bvfs_result_handler(void *ctx, int fields, char **row)
                    lstat, row[BVFS_Name]);
 
    } else if (bvfs_is_volume_list(row)) {
-      ua->send_msg("%s\t%s\n", row[BVFS_VolName],
-                   row[BVFS_VolInchanger]);
+      ua->send_msg("%s\t%s\t%s\n", row[BVFS_VolName],
+                   row[BVFS_VolInchanger], row[BVFS_VolType]);
 
    } else if (bvfs_is_delta_list(row)) {
       ua->send_msg("%s\t%s\t%s\t%s\t%s\t%s\t%s\n", row[BVFS_PathId],