Skip to content

Commit

Permalink
remove vtape autodetection in init_dev
Browse files Browse the repository at this point in the history
Annoyingly, the vtape code was automatically
activated in init_dev without any notice if
device->device_name was a regular file.

We now deactivated that so that you explicitly
have to set

   "DeviceType = Vtape"

if you wish to use vtape instead of the stupid
autodetection.

Signed-off-by: Marco van Wieringen <marco.van.wieringen@bareos.com>
  • Loading branch information
pstorz authored and Marco van Wieringen committed Feb 28, 2014
1 parent b3cb88f commit 1cb318d
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions src/stored/dev.c
Expand Up @@ -149,13 +149,6 @@ m_init_dev(JCR *jcr, DEVRES *device, bool new_init)
device->dev_type = B_TAPE_DEV;
} else if (S_ISFIFO(statp.st_mode)) {
device->dev_type = B_FIFO_DEV;
#ifdef USE_VTAPE
/*
* Must set DeviceType = Vtape in normal mode, autodetection is disabled
*/
} else if (S_ISREG(statp.st_mode)) {
device->dev_type = B_VTAPE_DEV;
#endif
} else if (!(device->cap_bits & CAP_REQMOUNT)) {
Jmsg2(jcr, M_ERROR, 0,
_("%s is an unknown device type. Must be tape or directory, st_mode=%x\n"),
Expand Down

0 comments on commit 1cb318d

Please sign in to comment.