if (strcmp(argk[1], "string") == 0) {
str = argv[1];
} else {
- senditf("Unable to encode the given string \"%s\". Try to use @encode string=\"yourstring\"\n", argk[1]);
+ senditf("Unable to encode the given string. Try to use @encode string=\"yourstring\"\n");
return 1;
}
}
if (ini->jcr) { /* called from core */
Jmsg(ini->jcr, M_ERROR, 0, _("Config file error: %s\n"
- " : Line %d, col %d of file %s\n%s\n"),
- buf, lc->line_no, lc->col_no, lc->fname, lc->line);
+ " : Line %d, col %d of file %s\n"),
+ buf, lc->line_no, lc->col_no, lc->fname);
// } else if (ini->ctx) { /* called from plugin */
// ini->bfuncs->JobMessage(ini->ctx, __FILE__, __LINE__, M_FATAL, 0,
// _("Config file error: %s\n"
-// " : Line %d, col %d of file %s\n%s\n"),
-// buf, lc->line_no, lc->col_no, lc->fname, lc->line);
+// " : Line %d, col %d of file %s\n"),
+// buf, lc->line_no, lc->col_no, lc->fname);
//
} else { /* called from ??? */
e_msg(file, line, M_ERROR, 0,
if (dev->can_read()) {
Mmsg2(jcr->errmsg, "Want to append but %s device %s is busy reading.\n",
dev->print_type(), dev->print_name());
- Jmsg(jcr, M_FATAL, 0, jcr->errmsg);
- Dmsg0(50, jcr->errmsg);
+ Jmsg(jcr, M_FATAL, 0, "%s", jcr->errmsg);
+ Dmsg1(50, "%s", jcr->errmsg);
goto get_out;
}
/* Reduce "noise" -- don't print if job canceled */
Mmsg2(jcr->errmsg, _("Could not ready %s device %s for append.\n"),
dev->print_type(), dev->print_name());
- Jmsg(jcr, M_FATAL, 0, jcr->errmsg);
- Dmsg0(50, jcr->errmsg);
+ Jmsg(jcr, M_FATAL, 0, "%s", jcr->errmsg);
+ Dmsg1(50, "%s", jcr->errmsg);
}
dev->Lock();
unblock_device(dev);
if (generate_plugin_event(jcr, bsdEventDeviceOpen, dcr) != bRC_OK) {
Mmsg0(jcr->errmsg, _("generate_plugin_event(bsdEventDeviceOpen) Failed\n"));
- Jmsg(jcr, M_FATAL, 0, jcr->errmsg);
- Dmsg0(50, jcr->errmsg);
+ Jmsg(jcr, M_FATAL, 0, "%s", jcr->errmsg);
+ Dmsg1(50, "%s", jcr->errmsg);
goto get_out;
}
if (!job_canceled(jcr) && !jcr->is_incomplete()) {
strip_trailing_junk(fd->msg);
char buf[64];
- if (jcr->errmsg[0]) {
- strip_trailing_junk(jcr->errmsg);
- Jmsg2(jcr, M_FATAL, 0, _("Command error with FD msg=\"%s\", SD hanging up. ERR=%s\n"),
- asciidump(fd->msg, fd->msglen, buf, sizeof(buf)),
- jcr->errmsg);
- } else {
- Jmsg1(jcr, M_FATAL, 0, _("Command error with FD msg=\"%s\", SD hanging up.\n"),
- asciidump(fd->msg, fd->msglen, buf, sizeof(buf)));
- }
+ strip_trailing_junk(jcr->errmsg);
+ Dmsg2(50, _("Command error with FD msg=\"%s\", SD hanging up. ERR=%s\n"),
+ asciidump(fd->msg, fd->msglen, buf, sizeof(buf)),
+ jcr->errmsg);
+ Jmsg1(jcr, M_FATAL, 0, _("Command error with FD, SD hanging up. ERR=%s\n"),
+ jcr->errmsg);
jcr->setJobStatus(JS_ErrorTerminated);
}
quit = true;
}
if (!found) { /* command not found */
if (!job_canceled(jcr)) {
- Jmsg1(jcr, M_FATAL, 0, _("FD command not found: %s\n"), fd->msg);
+ Jmsg0(jcr, M_FATAL, 0, _("FD command not found\n"));
Dmsg1(110, "<filed: Command not found: %s\n", fd->msg);
}
fd->fsend(ferrmsg);
dcr->VolumeName,
edit_uint64_with_commas(size, ed1),
edit_uint64_with_commas(VolCatInfo.VolCatBytes, ed2));
- Jmsg(jcr, M_ERROR, 0, jcr->errmsg);
- Dmsg0(100, jcr->errmsg);
+ Jmsg(jcr, M_ERROR, 0, "%s", jcr->errmsg);
+ Dmsg1(100, "%s", jcr->errmsg);
dcr->mark_volume_in_error();
return false;
}
if (jcr) {
Jmsg(jcr, M_FATAL, 0, _("Bootstrap file error: %s\n"
-" : Line %d, col %d of file %s\n%s\n"),
- buf, lc->line_no, lc->col_no, lc->fname, lc->line);
+" : Line %d, col %d of file %s\n"),
+ buf, lc->line_no, lc->col_no, lc->fname);
} else {
e_msg(file, line, M_FATAL, 0, _("Bootstrap file error: %s\n"
-" : Line %d, col %d of file %s\n%s\n"),
- buf, lc->line_no, lc->col_no, lc->fname, lc->line);
+" : Line %d, col %d of file %s\n"),
+ buf, lc->line_no, lc->col_no, lc->fname);
}
lc->last_result = -1;