X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=bacula%2Fsrc%2Fstored%2Fbscan.c;h=69482f198eaaa2a088d51108ab8569c72614d7a6;hb=5acaefa52eef9207ee62d4fe9d231701c0dc4529;hp=7c686ac7f680758f120c58f57217ad9375c9ff0f;hpb=c37638750b04e222c9436d70c55d28193c58a86f;p=bacula%2Fbacula diff --git a/bacula/src/stored/bscan.c b/bacula/src/stored/bscan.c index 7c686ac7f6..69482f198e 100644 --- a/bacula/src/stored/bscan.c +++ b/bacula/src/stored/bscan.c @@ -129,7 +129,7 @@ PROG_COPYRIGHT " -v verbose\n" " -V specify Volume names (separated by |)\n" " -w specify working directory (default from conf file)\n" -" -? print this message\n\n"), BYEAR, VERSION, BDATE); +" -? print this message\n\n"), 2001, VERSION, BDATE); exit(1); } @@ -147,6 +147,7 @@ int main (int argc, char *argv[]) my_name_is(argc, argv, "bscan"); init_msg(NULL, NULL); + OSDependentInit(); while ((ch = getopt(argc, argv, "b:c:d:h:mn:pP:rsSu:vV:w:?")) != -1) { switch (ch) { @@ -269,7 +270,7 @@ int main (int argc, char *argv[]) if (showProgress) { char ed1[50]; struct stat sb; - fstat(dev->fd, &sb); + fstat(dev->fd(), &sb); currentVolumeSize = sb.st_size; Pmsg1(000, _("First Volume Size = %sn"), edit_uint64(currentVolumeSize, ed1)); @@ -342,7 +343,7 @@ static bool bscan_mount_next_read_volume(DCR *dcr) if (showProgress) { char ed1[50]; struct stat sb; - fstat(dev->fd, &sb); + fstat(dev->fd(), &sb); currentVolumeSize = sb.st_size; Pmsg1(000, _("First Volume Size = %sn"), edit_uint64(currentVolumeSize, ed1)); @@ -365,6 +366,9 @@ static void do_scan() read_records(bjcr->read_dcr, record_cb, bscan_mount_next_read_volume); + if (update_db) { + db_write_batch_file_records(bjcr); /* used by bulk batch file insert */ + } free_attr(attr); }