src/dird/ua_label.c
static bool is_cleaning_tape(UAContext *ua, MEDIA_DBR *mr, POOL_DBR *pr)
{
   /* Find Pool resource */
   ua->jcr->pool = (POOL *)GetResWithName(R_POOL, pr->Name);
   if (!ua->jcr->pool) {
      ua->error_msg(_("Pool \"%s\" resource not found for volume \"%s\"!\n"),
         pr->Name, mr->VolumeName);
      return false;
   }
   if (ua->jcr->pool->cleaning_prefix == NULL) {
      return false;  /* if no cleaning prefix, this is not a cleaning tape */
   }
   Dmsg4(100, "CLNprefix=%s: Vol=%s: len=%d strncmp=%d\n",
      ua->jcr->pool->cleaning_prefix, mr->VolumeName,
      strlen(ua->jcr->pool->cleaning_prefix),
      strncmp(mr->VolumeName, ua->jcr->pool->cleaning_prefix,
                 (int)strlen(ua->jcr->pool->cleaning_prefix)));
   return strncmp(mr->VolumeName, ua->jcr->pool->cleaning_prefix,
                  strlen(ua->jcr->pool->cleaning_prefix)) == 0;
}
/*
 * Check if this is a cleaning tape by comparing the Volume name
 *  with the Cleaning Prefix. If they match, this is a cleaning
 *  tape.
 */
Check if this is a cleaning tape by comparing the Volume name
with the Cleaning Prefix. If they match, this is a cleaning
tape.
Check if this is a cleaning tape by comparing the Volume name with the Cleaning Prefix . If they match this is a cleaning tape .
static bool is_cleaning_tape(UAContext *ua, MEDIA_DBR *mr, POOL_DBR *pr)
{
   ua->jcr->pool = (POOL *)GetResWithName(R_POOL, pr->Name);
   if (!ua->jcr->pool) {
      ua->error_msg(_("Pool \"%s\" resource not found for volume \"%s\"!\n"),
         pr->Name, mr->VolumeName);
      return false;
   }
   if (ua->jcr->pool->cleaning_prefix == NULL) {
      return false;  
   }
   Dmsg4(100, "CLNprefix=%s: Vol=%s: len=%d strncmp=%d\n",
      ua->jcr->pool->cleaning_prefix, mr->VolumeName,
      strlen(ua->jcr->pool->cleaning_prefix),
      strncmp(mr->VolumeName, ua->jcr->pool->cleaning_prefix,
                 (int)strlen(ua->jcr->pool->cleaning_prefix)));
   return strncmp(mr->VolumeName, ua->jcr->pool->cleaning_prefix,
                  strlen(ua->jcr->pool->cleaning_prefix)) == 0;
}
static bool is_cleaning_tape ( UAContext * ua , MEDIA_DBR * mr , POOL_DBR * pr ) { ua -> jcr -> pool = ( POOL * ) GetResWithName ( R_POOL , pr -> Name ) ; if ( ! ua -> jcr -> pool ) { ua -> error_msg ( _ ( " \" \" \" \" \n " ) , pr -> Name , mr -> VolumeName ) ; return false ; } if ( ua -> jcr -> pool -> cleaning_prefix == NULL ) { return false ; } Dmsg4 ( 100 , " \n " , ua -> jcr -> pool -> cleaning_prefix , mr -> VolumeName , strlen ( ua -> jcr -> pool -> cleaning_prefix ) , strncmp ( mr -> VolumeName , ua -> jcr -> pool -> cleaning_prefix , ( int ) strlen ( ua -> jcr -> pool -> cleaning_prefix ) ) ) ; return strncmp ( mr -> VolumeName , ua -> jcr -> pool -> cleaning_prefix , strlen ( ua -> jcr -> pool -> cleaning_prefix ) ) == 0 ; }
Check if this is a cleaning tape by comparing the Volume name
  with the Cleaning Prefix.
Check if this is a cleaning tape by comparing the Volume name with the Cleaning Prefix .
/* Find Pool resource */ /* if no cleaning prefix, this is not a cleaning tape */