Skip to content

Commit

Permalink
lib/vsprintf.c: document more vsnprintf extensions
Browse files Browse the repository at this point in the history
These were added in

9ac6e44 (lib/vsprintf.c: add %pU to print UUID/GUIDs)
c7dabef (vsprintf: use %pR, %pr instead of %pRt, %pRf)
8a27f7c (lib/vsprintf.c: Add "%pI6c" - print pointer as compressed ipv6 address)
4aa9960 (printk: add %I4, %I6, %i4, %i6 format specifiers)
dd45c9c (printk: add %pM format specifier for MAC addresses)

but only added comments to pointer() not vsnprintf() that is refered to by
printk's comments.

Signed-off-by: Uwe Kleine-König <[email protected]>
Cc: Harvey Harrison <[email protected]>
Cc: David S. Miller <[email protected]>
Cc: Joe Perches <[email protected]>
Cc: Jens Rosenboom <[email protected]>
Cc: David S. Miller <[email protected]>
Cc: Bjorn Helgaas <[email protected]>
Cc: Jesse Barnes <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Uwe Kleine-König authored and torvalds committed Dec 17, 2009
1 parent 5d0bb2c commit 8a79503
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion lib/vsprintf.c
Original file line number Diff line number Diff line change
Expand Up @@ -1179,7 +1179,18 @@ static int format_decode(const char *fmt, struct printf_spec *spec)
* %ps output the name of a text symbol without offset
* %pF output the name of a function pointer with its offset
* %pf output the name of a function pointer without its offset
* %pR output the address range in a struct resource
* %pR output the address range in a struct resource with decoded flags
* %pr output the address range in a struct resource with raw flags
* %pM output a 6-byte MAC address with colons
* %pm output a 6-byte MAC address without colons
* %pI4 print an IPv4 address without leading zeros
* %pi4 print an IPv4 address with leading zeros
* %pI6 print an IPv6 address with colons
* %pi6 print an IPv6 address without colons
* %pI6c print an IPv6 address as specified by
* http://www.ietf.org/id/draft-kawamura-ipv6-text-representation-03.txt
* %pU[bBlL] print a UUID/GUID in big or little endian using lower or upper
* case.
* %n is ignored
*
* The return value is the number of characters which would
Expand Down

0 comments on commit 8a79503

Please sign in to comment.