Skip to content

Commit

Permalink
sd: adding error message when drive number not found
Browse files Browse the repository at this point in the history
  • Loading branch information
alaaeddineelamri authored and pstorz committed Jun 9, 2021
1 parent 9903256 commit e8f3bfd
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions core/src/stored/dir_cmd.cc
Expand Up @@ -933,6 +933,13 @@ static DeviceControlRecord* FindDevice(JobControlRecord* jcr,
}
Dmsg3(100, "Device %s drive wrong: want=%hd got=%hd skipping\n",
devname.c_str(), drive, device_resource->dev->drive);

if (changer->device_resources->current()
== changer->device_resources->size()) {
Jmsg(jcr, M_ERROR, 0,
_("Drive number \"%d\" for device \"%s\" not found.\n"), drive,
devname.c_str());
}
}
break; /* we found it but could not open a device */
}
Expand Down

0 comments on commit e8f3bfd

Please sign in to comment.