summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@gmail.com>2022-05-09 23:02:18 -0400
committerKent Overstreet <kent.overstreet@gmail.com>2022-06-19 15:25:57 -0400
commitee13d01106d88a62faaa59b359a8b430bb959281 (patch)
tree02f83987981d37212dc83bb54497b639a3ab2f9e
parent66a9fe56b2f95e09483fac683c1b7b30c5516628 (diff)
vsprintf: flags_string() no longer takes printf_spec
We're attempting to consolidate printf_spec and format string handling in the top level vpr_buf(), this changes time_and_date() to not take printf_spec. Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
-rw-r--r--lib/vsprintf.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/vsprintf.c b/lib/vsprintf.c
index affe2b0bcc41..3900f7a1a563 100644
--- a/lib/vsprintf.c
+++ b/lib/vsprintf.c
@@ -1942,12 +1942,12 @@ void format_page_flags(struct printbuf *out, unsigned long flags)
static noinline_for_stack
void flags_string(struct printbuf *out, void *flags_ptr,
- struct printf_spec spec, const char *fmt)
+ const char *fmt)
{
unsigned long flags;
const struct trace_print_flags *names;
- if (check_pointer_spec(out, flags_ptr, spec))
+ if (check_pointer(out, flags_ptr))
return;
switch (fmt[1]) {
@@ -1962,7 +1962,7 @@ void flags_string(struct printbuf *out, void *flags_ptr,
names = gfpflag_names;
break;
default:
- return error_string_spec(out, "(%pG?)", spec);
+ return error_string(out, "(%pG?)");
}
return format_flags(out, flags, names);
@@ -2335,7 +2335,8 @@ void pointer(struct printbuf *out, const char *fmt,
#endif
case 'G':
- return flags_string(out, ptr, spec, fmt);
+ flags_string(out, ptr, fmt);
+ return do_width_precision(out, prev_pos, spec);
case 'O':
return device_node_string(out, ptr, spec, fmt + 1);
case 'f':