summaryrefslogtreecommitdiffstats
path: root/fs/ceph/super.c
diff options
context:
space:
mode:
authorSage Weil <sage@newdream.net>2009-10-27 10:19:28 -0700
committerSage Weil <sage@newdream.net>2009-10-27 11:17:25 -0700
commite53c2fe075feda1fd4f009956ac026dc24c3a199 (patch)
tree8607bbfb40f6eb1bd9d463b970454faa9623cd0e /fs/ceph/super.c
parent6ca874e92d5e50beb8e351dfd8121947bafc79ec (diff)
ceph: fix, clean up string mount arg parsing
Clearly demark int and string argument options, and do not try to convert string arguments to ints. Signed-off-by: Sage Weil <sage@newdream.net>
Diffstat (limited to 'fs/ceph/super.c')
-rw-r--r--fs/ceph/super.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/fs/ceph/super.c b/fs/ceph/super.c
index 924e6cad0b6..b094f5003ef 100644
--- a/fs/ceph/super.c
+++ b/fs/ceph/super.c
@@ -264,9 +264,11 @@ enum {
Opt_caps_wanted_delay_min,
Opt_caps_wanted_delay_max,
Opt_readdir_max_entries,
+ Opt_last_int,
/* int args above */
Opt_snapdirname,
Opt_secret,
+ Opt_last_string,
/* string args above */
Opt_ip,
Opt_noshare,
@@ -386,14 +388,19 @@ static int parse_mount_args(struct ceph_client *client,
pr_err("bad mount option at '%s'\n", c);
goto out;
}
- if (token < Opt_ip) {
+ if (token < Opt_last_int) {
ret = match_int(&argstr[0], &intval);
if (ret < 0) {
pr_err("bad mount option arg (not int) "
"at '%s'\n", c);
continue;
}
- dout("got token %d intval %d\n", token, intval);
+ dout("got int token %d val %d\n", token, intval);
+ } else if (token > Opt_last_int && token < Opt_last_string) {
+ dout("got string token %d val %s\n", token,
+ argstr[0].from);
+ } else {
+ dout("got token %d\n", token);
}
switch (token) {
case Opt_fsidmajor: