From: Andy Shevchenko Date: Thu, 12 Feb 2015 23:02:29 +0000 (-0800) Subject: hexdump: make it return number of bytes placed in buffer X-Git-Tag: omap-for-v4.1/prcm-dts-mfd-syscon-fix~99^2~19 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=114fc1afb2de7dec40da137dc2a55cd38fc220f2;p=pandora-kernel.git hexdump: make it return number of bytes placed in buffer This patch makes hexdump return the number of bytes placed in the buffer excluding trailing NUL. In the case of overflow it returns the desired amount of bytes to produce the entire dump. Thus, it mimics snprintf(). This will be useful for users that would like to repeat with a bigger buffer. [akpm@linux-foundation.org: fix printk warning] Signed-off-by: Andy Shevchenko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed