From 01a063916d63cbc122bdafa4624eabfad677a4bc Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Tue, 22 Mar 2005 20:49:06 +0000 Subject: [PATCH] Change set_label() to set_labeled() -- a bit clearer git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@1897 91ce42f0-d328-0410-95d8-f526ca767f89 --- bacula/src/stored/acquire.c | 2 +- bacula/src/stored/dev.h | 4 ++-- bacula/src/stored/label.c | 10 +++++----- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/bacula/src/stored/acquire.c b/bacula/src/stored/acquire.c index ed5d1c5591..8595dd5d42 100644 --- a/bacula/src/stored/acquire.c +++ b/bacula/src/stored/acquire.c @@ -227,7 +227,7 @@ DCR *acquire_device_for_read(JCR *jcr, DEVICE *dev) dev->num_parts = dcr->VolCatInfo.VolCatParts; for (i=0; i<5; i++) { - dev->clear_label(); /* force reread of label */ + dev->clear_labeled(); /* force reread of label */ if (job_canceled(jcr)) { Mmsg1(dev->errmsg, _("Job %d canceled.\n"), jcr->JobId); goto get_out; /* error return */ diff --git a/bacula/src/stored/dev.h b/bacula/src/stored/dev.h index 886b53be07..eef16d4d14 100644 --- a/bacula/src/stored/dev.h +++ b/bacula/src/stored/dev.h @@ -281,12 +281,12 @@ public: void set_eof(); /* in dev.c */ void set_eot(); /* in dev.c */ void set_append() { state |= ST_APPEND; }; - void set_label() { state |= ST_LABEL; }; + void set_labeled() { state |= ST_LABEL; }; void set_read() { state |= ST_READ; }; void set_offline() { state |= ST_OFFLINE; }; void clear_append() { state &= ~ST_APPEND; }; void clear_read() { state &= ~ST_READ; }; - void clear_label() { state &= ~ST_LABEL; }; + void clear_labeled() { state &= ~ST_LABEL; }; void clear_offline() { state &= ~ST_OFFLINE; }; void clear_eot() { state &= ~ST_EOT; }; }; diff --git a/bacula/src/stored/label.c b/bacula/src/stored/label.c index 68a2ba08f0..9ac06c2cea 100644 --- a/bacula/src/stored/label.c +++ b/bacula/src/stored/label.c @@ -161,7 +161,7 @@ int read_dev_volume_label(DCR *dcr) if (!ok) { if (forge_on || jcr->ignore_label_errors) { - dev->set_label(); /* set has Bacula label */ + dev->set_labeled(); /* set has Bacula label */ Jmsg(jcr, M_ERROR, 0, "%s", jcr->errmsg); return VOL_OK; } @@ -201,7 +201,7 @@ int read_dev_volume_label(DCR *dcr) return VOL_LABEL_ERROR; } - dev->set_label(); /* set has Bacula label */ + dev->set_labeled(); /* set has Bacula label */ /* Compare Volume Names */ Dmsg2(30, "Compare Vol names: VolName=%s hdr=%s\n", VolName?VolName:"*", dev->VolHdr.VolName); @@ -308,7 +308,7 @@ int read_dev_volume_label_guess(DCR *dcr, bool write) */ if (vol_label_status != VOL_NAME_ERROR) { Dmsg0(100, "Leave read_dev_volume_label_guess (open_guess_name_dev && !VOL_NAME_ERROR)\n"); - dev->clear_label(); + dev->clear_labeled(); return read_dev_volume_label(dcr); } else { Dmsg0(100, "Leave read_dev_volume_label_guess (open_guess_name_dev && VOL_NAME_ERROR)\n"); @@ -416,7 +416,7 @@ bool write_new_volume_label_to_dev(DCR *dcr, const char *VolName, const char *Po Dmsg0(99, " Wrote block to device\n"); if (weof_dev(dev, 1) == 0) { - dev->set_label(); + dev->set_labeled(); write_ansi_ibm_labels(dcr, ANSI_EOF_LABEL, dev->VolHdr.VolName); } @@ -621,7 +621,7 @@ void create_volume_label(DEVICE *dev, const char *VolName, const char *PoolName) bstrncpy(dev->VolHdr.LabelProg, my_name, sizeof(dev->VolHdr.LabelProg)); sprintf(dev->VolHdr.ProgVersion, "Ver. %s %s", VERSION, BDATE); sprintf(dev->VolHdr.ProgDate, "Build %s %s", __DATE__, __TIME__); - dev->set_label(); /* set has Bacula label */ + dev->set_labeled(); /* set has Bacula label */ if (debug_level >= 90) { dump_volume_label(dev); } -- 2.39.5