lock_last_jobs_list();
struct s_last_job *je;
bsendmsg(ua, _("\nTerminated Jobs:\n"));
- bsendmsg(ua, _(" JobId Level Files Bytes Status Finished Name \n"));
+ bsendmsg(ua, _(" JobId Level Files Bytes Status Finished Name \n"));
bsendmsg(ua, _("======================================================================\n"));
foreach_dlist(je, last_jobs) {
char JobName[MAX_NAME_LENGTH];
/*
* Read the file data
*/
- while ((sd->msglen=bread(&ff_pkt->bfd, rbuf, rsize)) > 0) {
+ while ((sd->msglen=(uint32_t)bread(&ff_pkt->bfd, rbuf, rsize)) > 0) {
int sparseBlock = 0;
/* Check for sparse blocks */
static int verify_file(FF_PKT *ff_pkt, void *pkt)
{
char attribs[MAXSTRING];
- int32_t n;
+ int64_t n;
int stat;
BFILE bfd;
struct MD5Context md5c;
if ((sfd = open(mp_chr(fname), O_RDONLY, 0)) < 0 ||
read(sfd, &hdr, sizeof(hdr)) < 0 ||
hdr.version != state_hdr.version) {
+ Dmsg2(000, "Could not open or read state file. sfd=%d: ERR=%s\n",
+ sfd, strerror(errno));
goto bail_out;
}
hdr.id[13] = 0;
if (strcmp(hdr.id, state_hdr.id) != 0) {
+ Dmsg0(000, "State file header invalid.\n");
goto bail_out;
}
read_last_jobs_list(sfd, hdr.last_jobs_addr);
*buf = 0;
for (i=0; i<5; i++) {
- times = val / mult[i];
+ times = (uint32_t)(val / mult[i]);
if (times > 0) {
val = val - (utime_t)times * mult[i];
sprintf(mybuf, "%d %s%s ", times, mod[i], times>1?"s":"");