Skip to content

Commit

Permalink
BVFS API: Adjusts the output format of .bvfs_versions
Browse files Browse the repository at this point in the history
Lets the .bvfs_versions command deliver JSON output in the format analog to
.bvfs_lsdirs and .bvfs_lsfiles.

{
  "jsonrpc": "2.0",
  "id": null,
  "result": {
    "versions": [
      {
        "type": "V",
        "pathid": 30,
        "fileid": 24,
        "jobid": 3,
        "md5": "kX1Iyd92ko+Eql7lVGzLtA",
        "lstat": "P0B FCBe IGk B Pb PV A HQQ BAA BA BZ8x+i BZ8x+i BZ8x+i A A C",
        "volumename": "Full-0001",
        "volumeinchanger": 0,
        "stat": {
          "dev": 64769,
          "ino": 1319006,
          "mode": 33188,
          "nlink": 1,
          "user": "bareos",
          "group": "bareos",
          "rdev": 0,
          "size": 29712,
          "atime": 1509105570,
          "mtime": 1509105570,
          "ctime": 1509105570
        }
      }
    ]
  }
}
  • Loading branch information
fbergkemper committed Nov 8, 2017
1 parent 3e14aa3 commit d93391d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/dird/ua_dotcmds.c
Expand Up @@ -206,6 +206,7 @@ static int bvfs_result_handler(void *ctx, int fields, char **row)
ua->send->object_key_value("MD5", row[BVFS_Md5], "%s\t");
ua->send->object_key_value("VolumeName", row[BVFS_VolName], "%s\t");
ua->send->object_key_value("VolumeInChanger", str_to_uint64(row[BVFS_VolInchanger]), "%lld\n");
bvfs_stat(ua, lstat, &LinkFI);
ua->send->object_end();
} else if (bvfs_is_file(row)) {
ua->send->object_start();
Expand Down

0 comments on commit d93391d

Please sign in to comment.