On Fri, Jul 3, 2020 at 3:57 AM Steven Rostedt <[email protected]> wrote: > > From: "Tzvetomir Stoyanov (VMware)" <[email protected]> > > The printk format specifiers used in event's print format files extend > the standard printf formats. There are a lot of new options related to > printing pointers and kernel specific structures. Currently trace-cmd > does not support many of them. > > Support for these new printk specifiers is added to the pretty_print() > function: > - UUID/GUID address: %pU[bBlL] > - Raw buffer as a hex string: %*ph[CDN] > > These are improved: > - MAC address: %pMF, %pM and %pmR > - IPv4 adderss: %p[Ii]4[hnbl] > > Function pretty_print() is refactored. The logic for printing pointers > %p[...] is moved to its own function. > > Link: > https://lore.kernel.org/linux-trace-devel/[email protected] > Link: > http://lore.kernel.org/linux-trace-devel/[email protected] > > Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=207605 > Reported-by: Johannes Berg <[email protected]> > Signed-off-by: Tzvetomir Stoyanov (VMware) <[email protected]> > Signed-off-by: Steven Rostedt (VMware) <[email protected]> > --- [SNIP] > +static int parse_ip4_print_args(struct tep_handle *tep, > + const char *ptr, bool *reverse) > +{ > + int ret = 0; > + > + *reverse = false; > + > + /* hnbl */ > + switch (*ptr) { > + case 'h': > + if (tep->file_bigendian) > + *reverse = false; > + else > + *reverse = true; > + ret++; > + break;
Indentation is broken.. > + case 'l': > + *reverse = true; > + ret++; > + break; Ditto. Thanks Namhyung > + case 'n': > + case 'b': > + ret++; > + /* fall through */ > + default: > + *reverse = false; > + break; > + } > + > + return ret; > }

