Files
xen/docs/misc/printk-formats.txt
T
Andrew Cooper 3d26674d08 printk: introduce separator modifiers for the %ph custom format
The printk formats %*ph{C,D,N} are chosen to be compatible with their Linux
counterparts.

Sample:

  (XEN) buf: 00 01 03 07 78 65 6e 00
  (XEN) buf: 00:01:03:07:78:65:6e:00
  (XEN) buf: 00-01-03-07-78-65-6e-00
  (XEN) buf: 0001030778656e00

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
2016-02-26 12:31:11 +01:00

33 lines
1.0 KiB
Plaintext

Xen custom %p format options. A subset, borrowed from Linux.
All parameters to a %p option should be compatible with void*. Regular
pointers are fine. Numbers should make use of the _p() macro.
Raw buffer as hex string:
%*ph 00 01 02 ... 3f
%*phC 00:01:02: ... :3f
%*phD 00-01-02- ... -3f
%*phN 000102 ... 3f
Up to 64 characters. Buffer length expected via the field_width
paramter. i.e. printk("%*ph", 8, buffer);
Symbol/Function pointers:
%ps Symbol name with condition offset and size (iff offset != 0)
e.g. printk
default_idle+0x78/0x7d
%pS Symbol name with unconditional offset and size
e.g. printk+0/0x48
default_idle+0x78/0x7d
In the case that an appropriate symbol name can't be found, %p[sS] will
fall back to '%p' and print the address in hex.
Domain and vCPU information:
%pv Domain and vCPU ID from a 'struct vcpu *' (printed as
"d<domid>v<vcpuid>")