X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=bacula%2Fsrc%2Fstored%2Fparse_bsr.c;h=af9c2f4fc92f8ce4b0bbdd8a2f6df48192fc1fbe;hb=1bf3065ec3bd9c1d65a14ee98b6e42bf7077ba16;hp=0f66eeb186b0a1464d7a04aab3fd500cb1fba89e;hpb=c37638750b04e222c9436d70c55d28193c58a86f;p=bacula%2Fbacula diff --git a/bacula/src/stored/parse_bsr.c b/bacula/src/stored/parse_bsr.c old mode 100755 new mode 100644 index 0f66eeb186..af9c2f4fc9 --- a/bacula/src/stored/parse_bsr.c +++ b/bacula/src/stored/parse_bsr.c @@ -14,8 +14,8 @@ many others, a complete list can be found in the file AUTHORS. This program is Free Software; you can redistribute it and/or modify it under the terms of version two of the GNU General Public - License as published by the Free Software Foundation plus additions - that are listed in the file LICENSE. + License as published by the Free Software Foundation and included + in the file LICENSE. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -138,28 +138,28 @@ BSR *parse_bsr(JCR *jcr, char *fname) BSR *root_bsr = new_bsr(); BSR *bsr = root_bsr; - Dmsg1(200, "Enter parse_bsf %s\n", fname); + Dmsg1(300, "Enter parse_bsf %s\n", fname); if ((lc = lex_open_file(lc, fname, s_err)) == NULL) { berrno be; Emsg2(M_ERROR_TERM, 0, _("Cannot open bootstrap file %s: %s\n"), - fname, be.strerror()); + fname, be.bstrerror()); } lc->caller_ctx = (void *)jcr; while ((token=lex_get_token(lc, T_ALL)) != T_EOF) { - Dmsg1(200, "parse got token=%s\n", lex_tok_to_str(token)); + Dmsg1(300, "parse got token=%s\n", lex_tok_to_str(token)); if (token == T_EOL) { continue; } for (i=0; items[i].name; i++) { if (strcasecmp(items[i].name, lc->str) == 0) { token = lex_get_token(lc, T_ALL); - Dmsg1 (200, "in T_IDENT got token=%s\n", lex_tok_to_str(token)); + Dmsg1 (300, "in T_IDENT got token=%s\n", lex_tok_to_str(token)); if (token != T_EQUALS) { scan_err1(lc, "expected an equals, got: %s", lc->str); bsr = NULL; break; } - Dmsg1(200, "calling handler for %s\n", items[i].name); + Dmsg1(300, "calling handler for %s\n", items[i].name); /* Call item handler */ bsr = items[i].handler(lc, bsr); i = -1; @@ -167,7 +167,7 @@ BSR *parse_bsr(JCR *jcr, char *fname) } } if (i >= 0) { - Dmsg1(200, "Keyword = %s\n", lc->str); + Dmsg1(300, "Keyword = %s\n", lc->str); scan_err1(lc, "Keyword %s not found", lc->str); bsr = NULL; break; @@ -177,7 +177,7 @@ BSR *parse_bsr(JCR *jcr, char *fname) } } lc = lex_close_file(lc); - Dmsg0(200, "Leave parse_bsf()\n"); + Dmsg0(300, "Leave parse_bsf()\n"); if (!bsr) { free_bsr(root_bsr); root_bsr = NULL; @@ -751,9 +751,6 @@ void dump_sesstime(BSR_SESSTIME *sesstime) } - - - void dump_bsr(BSR *bsr, bool recurse) { int save_debug = debug_level; @@ -893,8 +890,8 @@ void create_restore_volume_list(JCR *jcr) /* * Build a list of volumes to be processed */ - jcr->NumVolumes = 0; - jcr->CurVolume = 0; + jcr->NumReadVolumes = 0; + jcr->CurReadVolume = 0; if (jcr->bsr) { BSR *bsr = jcr->bsr; if (!bsr->volume || !bsr->volume->VolumeName) { @@ -920,7 +917,7 @@ void create_restore_volume_list(JCR *jcr) vol->Slot = bsrvol->Slot; vol->start_file = sfile; if (add_restore_volume(jcr, vol)) { - jcr->NumVolumes++; + jcr->NumReadVolumes++; Dmsg2(400, "Added volume=%s mediatype=%s\n", vol->VolumeName, vol->MediaType); } else { @@ -941,7 +938,7 @@ void create_restore_volume_list(JCR *jcr) bstrncpy(vol->VolumeName, p, sizeof(vol->VolumeName)); bstrncpy(vol->MediaType, jcr->dcr->media_type, sizeof(vol->MediaType)); if (add_restore_volume(jcr, vol)) { - jcr->NumVolumes++; + jcr->NumReadVolumes++; } else { free((char *)vol); }