diff --git a/dmidecode.c b/dmidecode.c index 3551637..59f4fe0 100644 --- a/dmidecode.c +++ b/dmidecode.c @@ -5195,7 +5195,7 @@ static void dmi_table_decode(u8 *buf, u32 len, u16 num, u16 ver, u32 flags) if ((unsigned long)(next - buf) > len) { if (display && !(opt.flags & FLAG_QUIET)) - printf("\t\n"); + pr_struct_err(""); pr_sep(); data = next; break; diff --git a/dmioutput.c b/dmioutput.c index ef1c41b..42f8d32 100644 --- a/dmioutput.c +++ b/dmioutput.c @@ -123,3 +123,15 @@ void pr_sep(void) { printf("\n"); } + +void pr_struct_err(const char *format, ...) +{ + va_list args; + + printf("\t"); + + va_start(args, format); + vprintf(format, args); + va_end(args); + printf("\n"); +} diff --git a/dmioutput.h b/dmioutput.h index 6b5f0e0..a492ec0 100644 --- a/dmioutput.h +++ b/dmioutput.h @@ -31,3 +31,4 @@ void pr_list_start(const char *name, const char *format, ...); void pr_list_item(const char *format, ...); void pr_list_end(void); void pr_sep(void); +void pr_struct_err(const char *format, ...);