From: Eric Bollengier Date: Wed, 21 Jul 2010 09:15:49 +0000 (+0200) Subject: Implement %f %b to get JobFiles, JobBytes in a RunScript X-Git-Tag: Release-7.0.0~1664 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=6701efd572f981dfc55c9f300034abee440cd52a;p=bacula%2Fbacula Implement %f %b to get JobFiles, JobBytes in a RunScript --- diff --git a/bacula/src/lib/util.c b/bacula/src/lib/util.c index e7bb7aa496..22eff208c3 100644 --- a/bacula/src/lib/util.c +++ b/bacula/src/lib/util.c @@ -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; @@ -803,6 +805,12 @@ 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->getJobType());