src/stored/bls.c
static bool record_cb(DCR *dcr, DEV_RECORD *rec)
{
   if (verbose && rec->FileIndex < 0) {
      dump_label_record(dcr->dev, rec, verbose, false);
      return true;
   }

   /* File Attributes stream */
   if (rec->maskedStream == STREAM_UNIX_ATTRIBUTES ||
       rec->maskedStream == STREAM_UNIX_ATTRIBUTES_EX) {
      if (!unpack_attributes_record(jcr, rec->Stream, rec->data, rec->data_len, attr)) {
         if (!forge_on) {
            Emsg0(M_ERROR_TERM, 0, _("Cannot continue.\n"));
         } else {
            Emsg0(M_ERROR, 0, _("Attrib unpack error!\n"));
         }
         num_files++;
         return true;
      }

      attr->data_stream = decode_stat(attr->attr, &attr->statp, sizeof(attr->statp), &attr->LinkFI);
      build_attr_output_fnames(jcr, attr);

      if (file_is_included(ff, attr->fname) && !file_is_excluded(ff, attr->fname)) {
         if (verbose) {
            Pmsg5(000, _("FileIndex=%d VolSessionId=%d VolSessionTime=%d Stream=%d DataLen=%d\n"),
                  rec->FileIndex, rec->VolSessionId, rec->VolSessionTime, rec->Stream, rec->data_len);
         }
         print_ls_output(jcr, attr);
         num_files++;
      }
   } else if (rec->maskedStream == STREAM_PLUGIN_NAME) {
      char data[100];
      int len = MIN(rec->data_len+1, sizeof(data));
      bstrncpy(data, rec->data, len);
      Dmsg1(100, "Plugin data: %s\n", data);
   } else if (rec->maskedStream == STREAM_RESTORE_OBJECT) {
      Dmsg0(100, "Restore Object record\n");
   } else if (rec->maskedStream == STREAM_ADATA_BLOCK_HEADER) {
      Dmsg0(000, "Adata block header\n");
   } else if (rec->maskedStream == STREAM_ADATA_RECORD_HEADER) {
      Dmsg0(000, "Adata record header\n");
   }

   return true;
}
/*
 * Called here for each record from read_records()
 */
Called here for each record from read_records()
Called here for each record from read_records ()
static bool record_cb(DCR *dcr, DEV_RECORD *rec)
{
   if (verbose && rec->FileIndex < 0) {
      dump_label_record(dcr->dev, rec, verbose, false);
      return true;
   }
   if (rec->maskedStream == STREAM_UNIX_ATTRIBUTES ||
       rec->maskedStream == STREAM_UNIX_ATTRIBUTES_EX) {
      if (!unpack_attributes_record(jcr, rec->Stream, rec->data, rec->data_len, attr)) {
         if (!forge_on) {
            Emsg0(M_ERROR_TERM, 0, _("Cannot continue.\n"));
         } else {
            Emsg0(M_ERROR, 0, _("Attrib unpack error!\n"));
         }
         num_files++;
         return true;
      }
      attr->data_stream = decode_stat(attr->attr, &attr->statp, sizeof(attr->statp), &attr->LinkFI);
      build_attr_output_fnames(jcr, attr);
      if (file_is_included(ff, attr->fname) && !file_is_excluded(ff, attr->fname)) {
         if (verbose) {
            Pmsg5(000, _("FileIndex=%d VolSessionId=%d VolSessionTime=%d Stream=%d DataLen=%d\n"),
                  rec->FileIndex, rec->VolSessionId, rec->VolSessionTime, rec->Stream, rec->data_len);
         }
         print_ls_output(jcr, attr);
         num_files++;
      }
   } else if (rec->maskedStream == STREAM_PLUGIN_NAME) {
      char data[100];
      int len = MIN(rec->data_len+1, sizeof(data));
      bstrncpy(data, rec->data, len);
      Dmsg1(100, "Plugin data: %s\n", data);
   } else if (rec->maskedStream == STREAM_RESTORE_OBJECT) {
      Dmsg0(100, "Restore Object record\n");
   } else if (rec->maskedStream == STREAM_ADATA_BLOCK_HEADER) {
      Dmsg0(000, "Adata block header\n");
   } else if (rec->maskedStream == STREAM_ADATA_RECORD_HEADER) {
      Dmsg0(000, "Adata record header\n");
   }
   return true;
}
static bool record_cb ( DCR * dcr , DEV_RECORD * rec ) { if ( verbose && rec -> FileIndex < 0 ) { dump_label_record ( dcr -> dev , rec , verbose , false ) ; return true ; } if ( rec -> maskedStream == STREAM_UNIX_ATTRIBUTES || rec -> maskedStream == STREAM_UNIX_ATTRIBUTES_EX ) { if ( ! unpack_attributes_record ( jcr , rec -> Stream , rec -> data , rec -> data_len , attr ) ) { if ( ! forge_on ) { Emsg0 ( M_ERROR_TERM , 0 , _ ( " \n " ) ) ; } else { Emsg0 ( M_ERROR , 0 , _ ( " \n " ) ) ; } num_files ++ ; return true ; } attr -> data_stream = decode_stat ( attr -> attr , & attr -> statp , sizeof ( attr -> statp ) , & attr -> LinkFI ) ; build_attr_output_fnames ( jcr , attr ) ; if ( file_is_included ( ff , attr -> fname ) && ! file_is_excluded ( ff , attr -> fname ) ) { if ( verbose ) { Pmsg5 ( 000 , _ ( " \n " ) , rec -> FileIndex , rec -> VolSessionId , rec -> VolSessionTime , rec -> Stream , rec -> data_len ) ; } print_ls_output ( jcr , attr ) ; num_files ++ ; } } else if ( rec -> maskedStream == STREAM_PLUGIN_NAME ) { char data [ 100 ] ; int len = MIN ( rec -> data_len + 1 , sizeof ( data ) ) ; bstrncpy ( data , rec -> data , len ) ; Dmsg1 ( 100 , " \n " , data ) ; } else if ( rec -> maskedStream == STREAM_RESTORE_OBJECT ) { Dmsg0 ( 100 , " \n " ) ; } else if ( rec -> maskedStream == STREAM_ADATA_BLOCK_HEADER ) { Dmsg0 ( 000 , " \n " ) ; } else if ( rec -> maskedStream == STREAM_ADATA_RECORD_HEADER ) { Dmsg0 ( 000 , " \n " ) ; } return true ; }
Called here for each record from read_records()
Called here for each record from read_records ()
/* File Attributes stream */