X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=bacula%2Fsrc%2Fstored%2Fdircmd.c;h=a463802c8cad427050eae8da9fff26a7be75188d;hb=55593b396948f86a7a05827573755ef47f531faa;hp=6a02f9d861c307db16b1117bb9616ae61aade30d;hpb=87466d9a71f09a71db034482e6e1834ffe2c0262;p=bacula%2Fbacula diff --git a/bacula/src/stored/dircmd.c b/bacula/src/stored/dircmd.c index 6a02f9d861..a463802c8c 100644 --- a/bacula/src/stored/dircmd.c +++ b/bacula/src/stored/dircmd.c @@ -416,7 +416,7 @@ static bool do_label(JCR *jcr, int relabel) dcr = find_device(jcr, dev_name, drive); if (dcr) { dev = dcr->dev; - dev->dlock(); /* Use P to avoid indefinite block */ + dev->Lock(); /* Use P to avoid indefinite block */ if (!dev->is_open() && !dev->is_busy()) { Dmsg1(400, "Can %slabel. Device is not open\n", relabel?"re":""); label_volume_if_ok(dcr, oldname, newname, poolname, slot, relabel); @@ -431,7 +431,7 @@ static bool do_label(JCR *jcr, int relabel) Dmsg0(400, "Can relabel. device not used\n"); label_volume_if_ok(dcr, oldname, newname, poolname, slot, relabel); } - dev->dunlock(); + dev->Unlock(); free_dcr(dcr); } else { dir->fsend(_("3999 Device \"%s\" not found or could not be opened.\n"), dev_name.c_str()); @@ -684,7 +684,7 @@ static bool mount_cmd(JCR *jcr) dcr = find_device(jcr, devname, drive); if (dcr) { dev = dcr->dev; - dev->dlock(); /* Use P to avoid indefinite block */ + dev->Lock(); /* Use P to avoid indefinite block */ Dmsg2(100, "mount cmd blocked=%d must_unload=%d\n", dev->blocked(), dev->must_unload()); switch (dev->blocked()) { /* device blocked? */ @@ -806,7 +806,7 @@ static bool mount_cmd(JCR *jcr) dir->fsend(_("3905 Unknown wait state %d\n"), dev->blocked()); break; } - dev->dunlock(); + dev->Unlock(); free_dcr(dcr); } else { dir->fsend(_("3999 Device \"%s\" not found or could not be opened.\n"), devname.c_str()); @@ -834,7 +834,7 @@ static bool unmount_cmd(JCR *jcr) dcr = find_device(jcr, devname, drive); if (dcr) { dev = dcr->dev; - dev->dlock(); /* Use P to avoid indefinite block */ + dev->Lock(); /* Use P to avoid indefinite block */ if (!dev->is_open()) { if (!dev->is_busy()) { unload_autochanger(dcr, -1); @@ -898,7 +898,7 @@ static bool unmount_cmd(JCR *jcr) dev->print_name()); } } - dev->dunlock(); + dev->Unlock(); free_dcr(dcr); } else { dir->fsend(_("3999 Device \"%s\" not found or could not be opened.\n"), devname.c_str()); @@ -971,7 +971,7 @@ static bool release_cmd(JCR *jcr) dcr = find_device(jcr, devname, drive); if (dcr) { dev = dcr->dev; - dev->dlock(); /* Use P to avoid indefinite block */ + dev->Lock(); /* Use P to avoid indefinite block */ if (!dev->is_open()) { if (!dev->is_busy()) { unload_autochanger(dcr, -1); @@ -1009,7 +1009,7 @@ static bool release_cmd(JCR *jcr) dir->fsend(_("3022 Device \"%s\" released.\n"), dev->print_name()); } - dev->dunlock(); + dev->Unlock(); free_dcr(dcr); } else { dir->fsend(_("3999 Device \"%s\" not found or could not be opened.\n"), devname.c_str()); @@ -1119,7 +1119,7 @@ static bool changer_cmd(JCR *jcr) dcr = find_device(jcr, devname, -1); if (dcr) { dev = dcr->dev; - dev->dlock(); /* Use P to avoid indefinite block */ + dev->Lock(); /* Use P to avoid indefinite block */ if (!dev->device->changer_res) { dir->fsend(_("3998 Device \"%s\" is not an autochanger.\n"), dev->print_name()); @@ -1131,7 +1131,7 @@ static bool changer_cmd(JCR *jcr) } else { /* device not being used */ autochanger_cmd(dcr, dir, cmd); } - dev->dunlock(); + dev->Unlock(); free_dcr(dcr); } else { dir->fsend(_("3999 Device \"%s\" not found or could not be opened.\n"), devname.c_str()); @@ -1161,7 +1161,7 @@ static bool readlabel_cmd(JCR *jcr) dcr = find_device(jcr, devname, drive); if (dcr) { dev = dcr->dev; - dev->dlock(); /* Use P to avoid indefinite block */ + dev->Lock(); /* Use P to avoid indefinite block */ if (!dev->is_open()) { read_volume_label(jcr, dcr, dev, Slot); dev->close(); @@ -1173,7 +1173,7 @@ static bool readlabel_cmd(JCR *jcr) } else { /* device not being used */ read_volume_label(jcr, dcr, dev, Slot); } - dev->dunlock(); + dev->Unlock(); free_dcr(dcr); } else { dir->fsend(_("3999 Device \"%s\" not found or could not be opened.\n"), devname.c_str());