X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=bacula%2Fsrc%2Flib%2Futil.c;h=8a3e56453cb491e77b648bdc581bbe39db81ccfe;hb=4132c9f33642f579d89700f36caced609d374d51;hp=430f44b89ab2c2543e8dad83dd0d0d8c69d39634;hpb=26f13d56607943bc8177507b213dbb0c3013fb3a;p=bacula%2Fbacula diff --git a/bacula/src/lib/util.c b/bacula/src/lib/util.c index 430f44b89a..8a3e56453c 100644 --- a/bacula/src/lib/util.c +++ b/bacula/src/lib/util.c @@ -6,7 +6,7 @@ The main author of Bacula is Kern Sibbald, with contributions from many others, a complete list can be found in the file AUTHORS. This program is Free Software; you can redistribute it and/or - modify it under the terms of version two of the GNU General Public + modify it under the terms of version three of the GNU Affero General Public License as published by the Free Software Foundation and included in the file LICENSE. @@ -15,7 +15,7 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Affero General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. @@ -397,9 +397,9 @@ const char *job_type_to_str(int type) /* Convert ActionOnPurge to string (Truncate, Erase, Destroy) */ -char *aop_to_str(int aop, POOL_MEM &ret) +char *action_on_purge_to_string(int aop, POOL_MEM &ret) { - if (aop & AOP_TRUNCATE) { + if (aop & ON_PURGE_TRUNCATE) { pm_strcpy(ret, _("Truncate")); } if (!aop) { @@ -718,6 +718,8 @@ void decode_session_key(char *decode, char *session, char *key, int maxlen) * %t = Job type (Backup, ...) * %r = Recipients * %v = Volume name + * %b = Job Bytes + * %f = Job Files * * omsg = edited output message * imsg = input string containing edit codes (%x) @@ -728,7 +730,7 @@ POOLMEM *edit_job_codes(JCR *jcr, char *omsg, char *imsg, const char *to, job_co { char *p, *q; const char *str; - char add[20]; + char add[50]; char name[MAX_NAME_LENGTH]; int i; @@ -774,7 +776,7 @@ POOLMEM *edit_job_codes(JCR *jcr, char *omsg, char *imsg, const char *to, job_co break; case 'l': if (jcr) { - str = job_level_to_str(jcr->get_JobLevel()); + str = job_level_to_str(jcr->getJobLevel()); } else { str = _("*none*"); } @@ -803,9 +805,15 @@ POOLMEM *edit_job_codes(JCR *jcr, char *omsg, char *imsg, const char *to, job_co str = _("*none*"); } break; + case 'f': /* Job Files */ + str = edit_uint64(jcr->JobFiles, add); + break; + case 'b': /* Job Bytes */ + str = edit_uint64(jcr->JobBytes, add); + break; case 't': if (jcr) { - str = job_type_to_str(jcr->get_JobType()); + str = job_type_to_str(jcr->getJobType()); } else { str = _("*none*"); }