Pmsg1(0, _("Device open failed. ERR=%s\n"), strerror_dev(dev));
}
}
- rewind_dev(dev);
+ dev->rewind(dcr);
write_new_volume_label_to_dev(dcr, cmd, "Default");
Pmsg1(-1, _("Wrote Volume label for volume \"%s\".\n"), cmd);
}
*/
static void rewindcmd()
{
- if (!rewind_dev(dev)) {
+ if (!dev->rewind(dcr)) {
Pmsg1(0, _("Bad status from rewind. ERR=%s\n"), strerror_dev(dev));
clrerror_dev(dev, -1);
} else {
"This is an *essential* feature ...\n\n"));
block = dcr->block;
rec = new_record();
- if (!rewind_dev(dev)) {
+ if (!dev->rewind(dcr)) {
Pmsg1(0, _("Bad status from rewind. ERR=%s\n"), strerror_dev(dev));
goto bail_out;
}
if (dev_cap(dev, CAP_TWOEOF)) {
weofcmd();
}
- if (!rewind_dev(dev)) {
+ if (!dev->rewind(dcr)) {
Pmsg1(0, _("Bad status from rewind. ERR=%s\n"), strerror_dev(dev));
goto bail_out;
} else {
"This is an *essential* feature ...\n\n"));
empty_block(block);
rec = new_record();
- if (!rewind_dev(dev)) {
+ if (!dev->rewind(dcr)) {
Pmsg1(0, _("Bad status from rewind. ERR=%s\n"), strerror_dev(dev));
goto bail_out;
}
if (dev_cap(dev, CAP_TWOEOF)) {
weofcmd();
}
- if (!rewind_dev(dev)) {
+ if (!dev->rewind(dcr)) {
Pmsg1(0, _("Bad status from rewind. ERR=%s\n"), strerror_dev(dev));
goto bail_out;
} else {
* a failure.
*/
bmicrosleep(sleep_time, 0);
- if (!rewind_dev(dev) || weof_dev(dev,1) < 0) {
+ if (!dev->rewind(dcr) || weof_dev(dev,1) < 0) {
Pmsg1(0, _("Bad status from rewind. ERR=%s\n"), strerror_dev(dev));
clrerror_dev(dev, -1);
Pmsg0(-1, _("\nThe test failed, probably because you need to put\n"
dev->min_block_size = dev->max_block_size;
set_volume_name("TestVolume1", 1);
- if (!dev->rewind()) {
+ if (!dev->rewind(dcr)) {
Pmsg0(000, _("Rewind failed.\n"));
}
if (!dev->weof()) {
* Note, re-reading last block may have caused us to
* loose track of where we are (block number unknown).
*/
- if (!rewind_dev(dev)) { /* get to a known place on tape */
+ Pmsg0(-1, _("Rewinding.\n"));
+ if (!dev->rewind(dcr)) { /* get to a known place on tape */
goto bail_out;
}
/* Read the first 10000 records */
- Pmsg0(-1, _("Reading the first 10000 records.\n"));
+ Pmsg2(-1, _("Reading the first 10000 records from %u:%u.\n"),
+ dev->file, dev->block_num);
quickie_count = 0;
read_records(dcr, quickie_cb, my_mount_next_read_volume);
Pmsg4(-1, _("Reposition from %u:%u to %u:%u\n"), dev->file, dev->block_num,
static bool quickie_cb(DCR *dcr, DEV_RECORD *rec)
{
DEVICE *dev = dcr->dev;
- if (dev->file != 0) {
- Pmsg3(-1, _("ERROR! device at %d:%d count=%d\n"), dev->file, dev->block_num,
- quickie_count);
- return false;
- }
quickie_count++;
if (quickie_count == 10000) {
- Pmsg2(-1, _("1000 records read now at %d:%d\n"), dev->file, dev->block_num);
+ Pmsg2(-1, _("10000 records read now at %d:%d\n"), dev->file, dev->block_num);
}
return quickie_count < 10000;
}