Revert "tracing: Remove precision vsnprintf() check from print event"

This reverts commit 67512a7336.
This commit is contained in:
Ksawlii 2024-11-24 00:22:59 +01:00
parent 615dcf3da9
commit 3447182bc8

View file

@ -1303,11 +1303,12 @@ static enum print_line_t trace_print_print(struct trace_iterator *iter,
{
struct print_entry *field;
struct trace_seq *s = &iter->seq;
int max = iter->ent_size - offsetof(struct print_entry, buf);
trace_assign_type(field, iter->ent);
seq_print_ip_sym(s, field->ip, flags);
trace_seq_printf(s, ": %s", field->buf);
trace_seq_printf(s, ": %.*s", max, field->buf);
return trace_handle_return(s);
}
@ -1316,10 +1317,11 @@ static enum print_line_t trace_print_raw(struct trace_iterator *iter, int flags,
struct trace_event *event)
{
struct print_entry *field;
int max = iter->ent_size - offsetof(struct print_entry, buf);
trace_assign_type(field, iter->ent);
trace_seq_printf(&iter->seq, "# %lx %s", field->ip, field->buf);
trace_seq_printf(&iter->seq, "# %lx %.*s", field->ip, max, field->buf);
return trace_handle_return(&iter->seq);
}