diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-05-14 22:30:13 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-05-14 22:30:51 -0400 |
commit | 8f40f672e6bb071812f61bfbd30efc3fc1263ad1 (patch) | |
tree | 8dcdbbb7adc68647267794c4e3a4686afd94ad65 /net/9p/error.c | |
parent | 8978a318837d7acefca82645017c0534aeba5a36 (diff) | |
parent | 887b3ece65be7b643dfdae0d433c91a26a3f437d (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ericvh/v9fs
* 'for-linus' of ssh://master.kernel.org/pub/scm/linux/kernel/git/ericvh/v9fs:
9p: fix error path during early mount
9p: make cryptic unknown error from server less scary
9p: fix flags length in net
9p: Correct fidpool creation failure in p9_client_create
9p: use struct mutex instead of struct semaphore
9p: propagate parse_option changes to client and transports
fs/9p/v9fs.c (v9fs_parse_options): Handle kstrdup and match_strdup failure.
9p: Documentation updates
add match_strlcpy() us it to make v9fs make uname and remotename parsing more robust
Diffstat (limited to 'net/9p/error.c')
-rw-r--r-- | net/9p/error.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/net/9p/error.c b/net/9p/error.c index 64104b9cb422..fdebe4314062 100644 --- a/net/9p/error.c +++ b/net/9p/error.c | |||
@@ -33,6 +33,13 @@ | |||
33 | #include <linux/errno.h> | 33 | #include <linux/errno.h> |
34 | #include <net/9p/9p.h> | 34 | #include <net/9p/9p.h> |
35 | 35 | ||
36 | /** | ||
37 | * struct errormap - map string errors from Plan 9 to Linux numeric ids | ||
38 | * @name: string sent over 9P | ||
39 | * @val: numeric id most closely representing @name | ||
40 | * @namelen: length of string | ||
41 | * @list: hash-table list for string lookup | ||
42 | */ | ||
36 | struct errormap { | 43 | struct errormap { |
37 | char *name; | 44 | char *name; |
38 | int val; | 45 | int val; |
@@ -177,8 +184,7 @@ static struct errormap errmap[] = { | |||
177 | }; | 184 | }; |
178 | 185 | ||
179 | /** | 186 | /** |
180 | * p9_error_init - preload | 187 | * p9_error_init - preload mappings into hash list |
181 | * @errstr: error string | ||
182 | * | 188 | * |
183 | */ | 189 | */ |
184 | 190 | ||
@@ -206,6 +212,7 @@ EXPORT_SYMBOL(p9_error_init); | |||
206 | /** | 212 | /** |
207 | * errstr2errno - convert error string to error number | 213 | * errstr2errno - convert error string to error number |
208 | * @errstr: error string | 214 | * @errstr: error string |
215 | * @len: length of error string | ||
209 | * | 216 | * |
210 | */ | 217 | */ |
211 | 218 | ||
@@ -230,8 +237,8 @@ int p9_errstr2errno(char *errstr, int len) | |||
230 | if (errno == 0) { | 237 | if (errno == 0) { |
231 | /* TODO: if error isn't found, add it dynamically */ | 238 | /* TODO: if error isn't found, add it dynamically */ |
232 | errstr[len] = 0; | 239 | errstr[len] = 0; |
233 | printk(KERN_ERR "%s: errstr :%s: not found\n", __func__, | 240 | printk(KERN_ERR "%s: server reported unknown error %s\n", |
234 | errstr); | 241 | __func__, errstr); |
235 | errno = 1; | 242 | errno = 1; |
236 | } | 243 | } |
237 | 244 | ||