Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
string[s_idx++] = '%';
break;
default:
+ BUG_WARN_MSG(f[f_idx], "Unsupported printf directive '%c'\n", f[f_idx]);
va_arg(args, char*);
string[s_idx++] = '%';
if (s_idx < size - 1)
read_log_msg(logmsg);
assert(strcmp(logmsg, "(EE) test a\n") == 0);
+ /* something unsupported % */
+ LogMessageVerbSigSafe(X_ERROR, -1, "test %Q\n");
+ read_log_msg(logmsg);
+ assert(strstr(logmsg, "BUG") != NULL);
+ LogMessageVerbSigSafe(X_ERROR, -1, "\n");
+ fseek(f, 0, SEEK_END);
+
/* string substitution */
LogMessageVerbSigSafe(X_ERROR, -1, "%s\n", "substituted string");
read_log_msg(logmsg);