From 6701efd572f981dfc55c9f300034abee440cd52a Mon Sep 17 00:00:00 2001 From: Eric Bollengier Date: Wed, 21 Jul 2010 11:15:49 +0200 Subject: [PATCH] Implement %f %b to get JobFiles, JobBytes in a RunScript --- bacula/src/lib/util.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) 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()); -- 2.39.5