diff options
author | Eric Van Hensbergen <ericvh@gmail.com> | 2007-01-26 03:57:06 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-01-26 16:51:00 -0500 |
commit | e540eb45a5254873245fd377f2fe3afc47bd33c1 (patch) | |
tree | 09d9fa5d75df5bafeb4c9f56fd54338c24bd3cd4 /fs/9p/error.c | |
parent | da977b2c7eb4d6312f063a7b486f2aad99809710 (diff) |
[PATCH] 9p: null terminate error strings for debug print
We weren't properly NULL terminating protocol error strings for our debug
printk resulting in garbage being included in the output when debug was
enabled.
Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/9p/error.c')
-rw-r--r-- | fs/9p/error.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/9p/error.c b/fs/9p/error.c index ae91555c1558..0d7fa4e08812 100644 --- a/fs/9p/error.c +++ b/fs/9p/error.c | |||
@@ -83,6 +83,7 @@ int v9fs_errstr2errno(char *errstr, int len) | |||
83 | 83 | ||
84 | if (errno == 0) { | 84 | if (errno == 0) { |
85 | /* TODO: if error isn't found, add it dynamically */ | 85 | /* TODO: if error isn't found, add it dynamically */ |
86 | errstr[len] = 0; | ||
86 | printk(KERN_ERR "%s: errstr :%s: not found\n", __FUNCTION__, | 87 | printk(KERN_ERR "%s: errstr :%s: not found\n", __FUNCTION__, |
87 | errstr); | 88 | errstr); |
88 | errno = 1; | 89 | errno = 1; |