src/stored/match_bsr.c
int match_bsr(BSR *bsr, DEV_RECORD *rec, VOLUME_LABEL *volrec, SESSION_LABEL *sessrec, JCR *jcr)
{
   int stat;

   /*
    * The bsr->reposition flag is set any time a bsr is done.
    *   In this case, we can probably reposition the
    *   tape to the next available bsr position.
    */
   if (jcr->use_new_match_all) { /* TODO: Remove the if when the new code is tested */
      if (bsr->cur_bsr) {
         bsr = bsr->cur_bsr;
      }
   }
   if (bsr) {
      bsr->reposition = false;
      /* Temp code to test the new match_all */
      if (jcr->use_new_match_all) {
         stat = new_match_all(bsr, rec, volrec, sessrec, true, jcr);
      } else {
         stat = match_all(bsr, rec, volrec, sessrec, true, jcr);
      }
      /*
       * Note, bsr->reposition is set by match_all when
       *  a bsr is done. We turn it off if a match was
       *  found or if we cannot use positioning
       */
      if (stat != 0 || !bsr->use_positioning) {
         bsr->reposition = false;
      }
   } else {
      stat = 1;                       /* no bsr => match all */
   }
   return stat;
}
/*********************************************************************
 *
 *      Match Bootstrap records
 *        returns  1 on match
 *        returns  0 no match and reposition is set if we should
 *                      reposition the tape
 *       returns -1 no additional matches possible
 */
Match Bootstrap records
returns  1 on match
returns  0 no match and reposition is set if we should
reposition the tape
returns -1 no additional matches possible
Match Bootstrap records returns 1 on match returns 0 no match and reposition is set if we should reposition the tape returns - 1 no additional matches possible
int match_bsr(BSR *bsr, DEV_RECORD *rec, VOLUME_LABEL *volrec, SESSION_LABEL *sessrec, JCR *jcr)
{
   int stat;
   if (jcr->use_new_match_all) { 
      if (bsr->cur_bsr) {
         bsr = bsr->cur_bsr;
      }
   }
   if (bsr) {
      bsr->reposition = false;
      if (jcr->use_new_match_all) {
         stat = new_match_all(bsr, rec, volrec, sessrec, true, jcr);
      } else {
         stat = match_all(bsr, rec, volrec, sessrec, true, jcr);
      }
      if (stat != 0 || !bsr->use_positioning) {
         bsr->reposition = false;
      }
   } else {
      stat = 1;                       
   }
   return stat;
}
int match_bsr ( BSR * bsr , DEV_RECORD * rec , VOLUME_LABEL * volrec , SESSION_LABEL * sessrec , JCR * jcr ) { int stat ; if ( jcr -> use_new_match_all ) { if ( bsr -> cur_bsr ) { bsr = bsr -> cur_bsr ; } } if ( bsr ) { bsr -> reposition = false ; if ( jcr -> use_new_match_all ) { stat = new_match_all ( bsr , rec , volrec , sessrec , true , jcr ) ; } else { stat = match_all ( bsr , rec , volrec , sessrec , true , jcr ) ; } if ( stat != 0 || ! bsr -> use_positioning ) { bsr -> reposition = false ; } } else { stat = 1 ; } return stat ; }
Match Bootstrap records
        returns  1 on match
        returns  0 no match and reposition is set if we should
                      reposition the tape
       returns -1 no additional matches possible
Match Bootstrap records returns 1 on match returns 0 no match and reposition is set if we should reposition the tape returns - 1 no additional matches possible
/*
    * The bsr->reposition flag is set any time a bsr is done.
    *   In this case, we can probably reposition the
    *   tape to the next available bsr position.
    */ /* TODO: Remove the if when the new code is tested */ /* Temp code to test the new match_all */ /*
       * Note, bsr->reposition is set by match_all when
       *  a bsr is done. We turn it off if a match was
       *  found or if we cannot use positioning
       */ /* no bsr => match all */