Diff for /xfs-cmds/xfsdump/invutil/invutil.c between versions 1.17 and 1.18

version 1.17, 2006/05/24 06:08:55 version 1.18, 2008/02/08 03:12:26
Line 821  CheckAndPruneStObjFile( bool_t checkonly Line 821  CheckAndPruneStObjFile( bool_t checkonly
 }  }
   
 /* If any of the media objects have a label which matches the one supplied  /* If any of the media objects have a label which matches the one supplied
  * by the user, or if none is supplied, say the session is prunable.   * by the user, or if none is supplied, or if the session has no media
    * objects, say the session is prunable.
  * Otherwise, say it should be bypassed.   * Otherwise, say it should be bypassed.
  */   */
   
Line 833  uses_specified_mf_label( Line 834  uses_specified_mf_label(
         char *r_mf_label)          char *r_mf_label)
 {  {
     int                 s, m;      int                 s, m;
       int                 num_media_objects = 0;
     invt_stream_t       *StObjstrm;      invt_stream_t       *StObjstrm;
     invt_mediafile_t    *StObjmed;      invt_mediafile_t    *StObjmed;
   
Line 842  uses_specified_mf_label( Line 844  uses_specified_mf_label(
     for ( s = 0; s < (int) StObjses->s_cur_nstreams; s++ ) {      for ( s = 0; s < (int) StObjses->s_cur_nstreams; s++ ) {
         StObjstrm = (invt_stream_t *)          StObjstrm = (invt_stream_t *)
             (temp + StObjhdr->sh_streams_off + (s * sizeof(invt_stream_t)));              (temp + StObjhdr->sh_streams_off + (s * sizeof(invt_stream_t)));
         for ( m = 0; m < StObjstrm->st_nmediafiles; m++) {          for ( m = 0; m < StObjstrm->st_nmediafiles; m++, num_media_objects++) {
             StObjmed = (invt_mediafile_t *)              StObjmed = (invt_mediafile_t *)
                 (temp + StObjstrm->st_firstmfile + (m * sizeof(invt_mediafile_t)));                  (temp + StObjstrm->st_firstmfile + (m * sizeof(invt_mediafile_t)));
             if (!strncmp(StObjmed->mf_label, r_mf_label,               if (!strncmp(StObjmed->mf_label, r_mf_label, 
Line 854  uses_specified_mf_label( Line 856  uses_specified_mf_label(
             }              }
         }          }
     }      }
   
       if (!num_media_objects)
               return 1; /* prune */
   
     return 0;   /* don't prune */      return 0;   /* don't prune */
 }  }
   

Removed from v.1.17  
changed lines
  Added in v.1.18


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>