src/findlib/find_one.c
static int accept_drivetype(FF_PKT *ff, void *dummy) {
   int i;
   char dt[100];
   bool accept = true;

   if (ff->drivetypes.size()) {
      accept = false;
      if (!drivetype(ff->fname, dt, sizeof(dt))) {
         Dmsg1(50, "Cannot determine drive type for \"%s\"\n", ff->fname);
      } else {
         for (i = 0; i < ff->drivetypes.size(); ++i) {
            if (strcmp(dt, (char *)ff->drivetypes.get(i)) == 0) {
               Dmsg2(100, "Accepting drive type %s for \"%s\"\n", dt, ff->fname);
               accept = true;
               break;
            }
            Dmsg3(200, "drive type %s for \"%s\" does not match %s\n", dt,
                  ff->fname, ff->drivetypes.get(i));
         }
      }
   }
   return accept;
}
/*
 * Check to see if we allow the drive type of a file or directory.
 * If we do not have a list of drive types, we accept anything.
 */
Check to see if we allow the drive type of a file or directory.
If we do not have a list of drive types, we accept anything.
Check to see if we allow the drive type of a file or directory . If we do not have a list of drive types we accept anything .
static int accept_drivetype(FF_PKT *ff, void *dummy) {
   int i;
   char dt[100];
   bool accept = true;
   if (ff->drivetypes.size()) {
      accept = false;
      if (!drivetype(ff->fname, dt, sizeof(dt))) {
         Dmsg1(50, "Cannot determine drive type for \"%s\"\n", ff->fname);
      } else {
         for (i = 0; i < ff->drivetypes.size(); ++i) {
            if (strcmp(dt, (char *)ff->drivetypes.get(i)) == 0) {
               Dmsg2(100, "Accepting drive type %s for \"%s\"\n", dt, ff->fname);
               accept = true;
               break;
            }
            Dmsg3(200, "drive type %s for \"%s\" does not match %s\n", dt,
                  ff->fname, ff->drivetypes.get(i));
         }
      }
   }
   return accept;
}
static int accept_drivetype ( FF_PKT * ff , void * dummy ) { int i ; char dt [ 100 ] ; bool accept = true ; if ( ff -> drivetypes . size ( ) ) { accept = false ; if ( ! drivetype ( ff -> fname , dt , sizeof ( dt ) ) ) { Dmsg1 ( 50 , " \" \" \n " , ff -> fname ) ; } else { for ( i = 0 ; i < ff -> drivetypes . size ( ) ; ++ i ) { if ( strcmp ( dt , ( char * ) ff -> drivetypes . get ( i ) ) == 0 ) { Dmsg2 ( 100 , " \" \" \n " , dt , ff -> fname ) ; accept = true ; break ; } Dmsg3 ( 200 , " \" \" \n " , dt , ff -> fname , ff -> drivetypes . get ( i ) ) ; } } } return accept ; }
Check to see if we allow the drive type of a file or directory.
Check to see if we allow the drive type of a file or directory .