Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 267251
b: refs/heads/master
c: 4d5077f
h: refs/heads/master
i:
  267249: 2429cac
  267247: b381619
v: v3
  • Loading branch information
Aneesh Kumar K.V authored and Eric Van Hensbergen committed Oct 24, 2011
1 parent 947c74c commit 9b6fafb
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 15 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5635fd0ccf4ce90a9ecf8fa48f5f031f5f73e6f5
refs/heads/master: 4d5077f1b2aa502a0ca98b450d1b16fbccfe9c63
33 changes: 26 additions & 7 deletions trunk/fs/9p/v9fs.c
Original file line number Diff line number Diff line change
Expand Up @@ -132,34 +132,53 @@ static int v9fs_parse_options(struct v9fs_session_info *v9ses, char *opts)
options = tmp_options;

while ((p = strsep(&options, ",")) != NULL) {
int token;
int token, r;
if (!*p)
continue;
token = match_token(p, tokens, args);
if (token < Opt_uname) {
int r = match_int(&args[0], &option);
switch (token) {
case Opt_debug:
r = match_int(&args[0], &option);
if (r < 0) {
P9_DPRINTK(P9_DEBUG_ERROR,
"integer field, but no integer?\n");
"integer field, but no integer?\n");
ret = r;
continue;
}
}
switch (token) {
case Opt_debug:
v9ses->debug = option;
#ifdef CONFIG_NET_9P_DEBUG
p9_debug_level = option;
#endif
break;

case Opt_dfltuid:
r = match_int(&args[0], &option);
if (r < 0) {
P9_DPRINTK(P9_DEBUG_ERROR,
"integer field, but no integer?\n");
ret = r;
continue;
}
v9ses->dfltuid = option;
break;
case Opt_dfltgid:
r = match_int(&args[0], &option);
if (r < 0) {
P9_DPRINTK(P9_DEBUG_ERROR,
"integer field, but no integer?\n");
ret = r;
continue;
}
v9ses->dfltgid = option;
break;
case Opt_afid:
r = match_int(&args[0], &option);
if (r < 0) {
P9_DPRINTK(P9_DEBUG_ERROR,
"integer field, but no integer?\n");
ret = r;
continue;
}
v9ses->afid = option;
break;
case Opt_uname:
Expand Down
12 changes: 5 additions & 7 deletions trunk/net/9p/client.c
Original file line number Diff line number Diff line change
Expand Up @@ -123,21 +123,19 @@ static int parse_opts(char *opts, struct p9_client *clnt)
options = tmp_options;

while ((p = strsep(&options, ",")) != NULL) {
int token;
int token, r;
if (!*p)
continue;
token = match_token(p, tokens, args);
if (token < Opt_trans) {
int r = match_int(&args[0], &option);
switch (token) {
case Opt_msize:
r = match_int(&args[0], &option);
if (r < 0) {
P9_DPRINTK(P9_DEBUG_ERROR,
"integer field, but no integer?\n");
"integer field, but no integer?\n");
ret = r;
continue;
}
}
switch (token) {
case Opt_msize:
clnt->msize = option;
break;
case Opt_trans:
Expand Down

0 comments on commit 9b6fafb

Please sign in to comment.