From 4b6ccca701ef5977d0ffbc2c932430dea88b38b6 Mon Sep 17 00:00:00 2001 From: Al Viro Date: Tue, 3 Sep 2013 12:00:44 -0400 Subject: add formats for dentry/file pathnames New formats: %p[dD][234]?. The next pointer is interpreted as struct dentry * or struct file * resp. ('d' => dentry, 'D' => file) and the last component(s) of pathname are printed (%pd => just the last one, %pd2 => the last two, etc.) Signed-off-by: Al Viro --- Documentation/printk-formats.txt | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'Documentation/printk-formats.txt') diff --git a/Documentation/printk-formats.txt b/Documentation/printk-formats.txt index 3e8cb73ac43c..9552a3299ec9 100644 --- a/Documentation/printk-formats.txt +++ b/Documentation/printk-formats.txt @@ -168,6 +168,15 @@ UUID/GUID addresses: Where no additional specifiers are used the default little endian order with lower case hex characters will be printed. +dentry names: + %pd{,2,3,4} + %pD{,2,3,4} + + For printing dentry name; if we race with d_move(), the name might be + a mix of old and new ones, but it won't oops. %pd dentry is a safer + equivalent of %s dentry->d_name.name we used to use, %pd prints + n last components. %pD does the same thing for struct file. + struct va_format: %pV -- cgit v1.2.3