src/stored/scan.c
static bool is_volume_name_legal(char *name)
{
   int len;
   const char *p;
   const char *accept = ":.-_";

   /* Restrict the characters permitted in the Volume name */
   for (p=name; *p; p++) {
      if (B_ISALPHA(*p) || B_ISDIGIT(*p) || strchr(accept, (int)(*p))) {
         continue;
      }
      return false;
   }
   len = strlen(name);
   if (len >= MAX_NAME_LENGTH) {
      return false;
   }
   if (len == 0) {
      return false;
   }
   return true;
}
/*
 * Check if the Volume name has legal characters
 * If ua is non-NULL send the message
 */
Check if the Volume name has legal characters
If ua is non-NULL send the message
Check if the Volume name has legal characters If ua is non - NULL send the message
static bool is_volume_name_legal(char *name)
{
   int len;
   const char *p;
   const char *accept = ":.-_";
   for (p=name; *p; p++) {
      if (B_ISALPHA(*p) || B_ISDIGIT(*p) || strchr(accept, (int)(*p))) {
         continue;
      }
      return false;
   }
   len = strlen(name);
   if (len >= MAX_NAME_LENGTH) {
      return false;
   }
   if (len == 0) {
      return false;
   }
   return true;
}
static bool is_volume_name_legal ( char * name ) { int len ; const char * p ; const char * accept = " " ; for ( p = name ; * p ; p ++ ) { if ( B_ISALPHA ( * p ) || B_ISDIGIT ( * p ) || strchr ( accept , ( int ) ( * p ) ) ) { continue ; } return false ; } len = strlen ( name ) ; if ( len >= MAX_NAME_LENGTH ) { return false ; } if ( len == 0 ) { return false ; } return true ; }
Check if the Volume name has legal characters
 If ua is non-NULL send the message
Check if the Volume name has legal characters If ua is non - NULL send the message
/* Restrict the characters permitted in the Volume name */