Exemple #1
0
/*
 * Allocate and initialize the DEVICE structure
 * Note, if dev is non-NULL, it is already allocated,
 * thus we neither allocate it nor free it. This allows
 * the caller to put the packet in shared memory.
 *
 * Note, for a tape, the device->device_name is the device name
 * (e.g. /dev/nst0), and for a file, the device name
 * is the directory in which the file will be placed.
 */
DEVICE *init_dev(JCR *jcr, DEVRES *device)
{
   DEVICE *dev;

   dev = m_init_dev(jcr, device, false);
   return dev;
}
Exemple #2
0
/*
 * Allocate and initialize the DEVICE structure
 * Note, if dev is non-NULL, it is already allocated,
 * thus we neither allocate it nor free it. This allows
 * the caller to put the packet in shared memory.
 *
 *  Note, for a tape, the device->device_name is the device name
 *     (e.g. /dev/nst0), and for a file, the device name
 *     is the directory in which the file will be placed.
 *
 */
DEVICE *init_dev(JCR *jcr, DEVRES *device)
{
   generate_global_plugin_event(bsdGlobalEventDeviceInit, device);
   DEVICE *dev = m_init_dev(jcr, device);
   return dev;
}