src/stored/vol_mgr.c
static VOLRES *new_vol_item(DCR *dcr, const char *VolumeName)
{
   VOLRES *vol;
   vol = (VOLRES *)malloc(sizeof(VOLRES));
   memset(vol, 0, sizeof(VOLRES));
   vol->vol_name = bstrdup(VolumeName);
   if (dcr) {
      vol->dev = dcr->dev;
      Dmsg4(dbglvl, "new Vol=%s slot=%d at %p dev=%s\n",
            VolumeName, vol->get_slot(), vol->vol_name, vol->dev->print_name());
   }
   vol->init_mutex();
   vol->inc_use_count();
   return vol;
}
/*
 * Create a Volume item to put in the Volume list
 *   Ensure that the device points to it.
 */
Create a Volume item to put in the Volume list
Ensure that the device points to it.
Create a Volume item to put in the Volume list Ensure that the device points to it .
static VOLRES *new_vol_item(DCR *dcr, const char *VolumeName)
{
   VOLRES *vol;
   vol = (VOLRES *)malloc(sizeof(VOLRES));
   memset(vol, 0, sizeof(VOLRES));
   vol->vol_name = bstrdup(VolumeName);
   if (dcr) {
      vol->dev = dcr->dev;
      Dmsg4(dbglvl, "new Vol=%s slot=%d at %p dev=%s\n",
            VolumeName, vol->get_slot(), vol->vol_name, vol->dev->print_name());
   }
   vol->init_mutex();
   vol->inc_use_count();
   return vol;
}
static VOLRES * new_vol_item ( DCR * dcr , const char * VolumeName ) { VOLRES * vol ; vol = ( VOLRES * ) malloc ( sizeof ( VOLRES ) ) ; memset ( vol , 0 , sizeof ( VOLRES ) ) ; vol -> vol_name = bstrdup ( VolumeName ) ; if ( dcr ) { vol -> dev = dcr -> dev ; Dmsg4 ( dbglvl , " \n " , VolumeName , vol -> get_slot ( ) , vol -> vol_name , vol -> dev -> print_name ( ) ) ; } vol -> init_mutex ( ) ; vol -> inc_use_count ( ) ; return vol ; }
Create a Volume item to put in the Volume list
   Ensure that the device points to it.
Create a Volume item to put in the Volume list Ensure that the device points to it .