hexdump: remove the trailing space
authorLi Zefan <lizf@cn.fujitsu.com>
Tue, 16 Jun 2009 22:33:45 +0000 (15:33 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 17 Jun 2009 02:47:51 +0000 (19:47 -0700)
commitc67ae69b661f3c2fe1a9c8259bc948c68b082166
tree81ad71329c162167f2af11fbfea60062db0ced3b
parenta9c569539312cfd3c820b38036679a9d72c55331
hexdump: remove the trailing space

For example:
        hex_dump_to_buffer("AB", 2, 16, 1, buf, 100, 0);
        pr_info("[%s]\n", buf);

I'd expect the output to be "[41 42]", but actually it's "[41 42 ]"

This patch also makes the required buf to be minimum.  To print the hex
format of "AB", a buf with size 6 should be sufficient, but
hex_dump_to_buffer() required at least 8.

Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Acked-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
lib/hexdump.c