There was the bug after using vfprintf().
for reusing va_list arguments, va_copy should be invoked.
Change-Id: I34abdbb5069ba9c18915871537883eb6cb7a5a9c
Signed-off-by: Jihye Won <jihye.won1@samsung.com>
// We are wating for '\n'
if (message[message_len - 1] == '\n') {
- fprintf(stderr, "%s", message);
#ifdef CONFIG_QT
if (display_type == DT_MARU_QT_ONSCREEN ||
display_type == DT_MARU_QT_OFFSCREEN) {
if (cur_mon && !monitor_cur_is_qmp()) {
monitor_vprintf(cur_mon, fmt, ap);
} else {
- vfprintf(stderr, fmt, ap);
#ifdef CONFIG_MARU
+ va_list ap_copy;
+ va_copy(ap_copy, ap);
+ vfprintf(stderr, fmt, ap_copy);
+ va_end(ap_copy);
report_to_clients(fmt, ap);
+#else
+ vfprintf(stderr, fmt, ap);
#endif
}
}