Skip to content

Commit

Permalink
lib: Fix expansion of %B jobcode.
Browse files Browse the repository at this point in the history
We need to add a B suffix to the Job Bytes in human readable format
printing routine.
  • Loading branch information
Marco van Wieringen authored and joergsteffens committed Jul 5, 2016
1 parent 9f8f595 commit ee3e0eb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/lib/util.c
Original file line number Diff line number Diff line change
Expand Up @@ -762,6 +762,7 @@ POOLMEM *edit_job_codes(JCR *jcr, char *omsg, char *imsg, const char *to, job_co
{
char *p, *q;
const char *str;
char ed1[50];
char add[50];
char name[MAX_NAME_LENGTH];
int i;
Expand All @@ -775,7 +776,8 @@ POOLMEM *edit_job_codes(JCR *jcr, char *omsg, char *imsg, const char *to, job_co
str = "%";
break;
case 'B': /* Job Bytes in human readable format */
str = edit_uint64_with_suffix(jcr->JobBytes, add);
bsnprintf(add, sizeof(add), "%sB", edit_uint64_with_suffix(jcr->JobBytes, ed1));
str = add;
break;
case 'F': /* Job Files */
str = edit_uint64(jcr->JobFiles, add);
Expand Down

0 comments on commit ee3e0eb

Please sign in to comment.