if (!raw) {
dfprintk(MOUNT, "NFS: mount options string was NULL.\n");
@@ -1092,77 +1092,77 @@ static int nfs_parse_mount_options(char *raw,
case Opt_port:
if (match_int(args, &option) ||
option < 0 || option > USHORT_MAX) {
- errors++;
+ invalid_values++;
nfs_parse_invalid_value("port");
} else
mnt->nfs_server.port = option;
break;
case Opt_rsize:
if (match_int(args, &option) || option < 0) {
- errors++;
+ invalid_values++;
nfs_parse_invalid_value("rsize");
} else
mnt->rsize = option;
break;
case Opt_wsize:
if (match_int(args, &option) || option < 0) {
- errors++;
+ invalid_values++;
nfs_parse_invalid_value("wsize");
} else
mnt->wsize = option;
break;
case Opt_bsize:
if (match_int(args, &option) || option < 0) {
- errors++;
+ invalid_values++;
nfs_parse_invalid_value("bsize");
} else
mnt->bsize = option;
break;
case Opt_timeo:
if (match_int(args, &option) || option <= 0) {
- errors++;
+ invalid_values++;
nfs_parse_invalid_value("timeo");
} else
mnt->timeo = option;
break;
case Opt_retrans:
if (match_int(args, &option) || option <= 0) {
- errors++;
+ invalid_values++;
nfs_parse_invalid_value("retrans");
} else
mnt->retrans = option;
break;
case Opt_acregmin:
if (match_int(args, &option) || option < 0) {
- errors++;
+ invalid_values++;
nfs_parse_invalid_value("acregmin");
} else
mnt->acregmin = option;
break;
case Opt_acregmax:
if (match_int(args, &option) || option < 0) {
- errors++;
+ invalid_values++;
nfs_parse_invalid_value("acregmax");
} else
mnt->acregmax = option;
break;
case Opt_acdirmin:
if (match_int(args, &option) || option < 0) {
- errors++;
+ invalid_values++;
nfs_parse_invalid_value("acdirmin");
} else
mnt->acdirmin = option;
break;
case Opt_acdirmax:
if (match_int(args, &option) || option < 0) {
- errors++;
+ invalid_values++;
nfs_parse_invalid_value("acdirmax");
} else
mnt->acdirmax = option;
break;
case Opt_actimeo:
if (match_int(args, &option) || option < 0) {
- errors++;
+ invalid_values++;
nfs_parse_invalid_value("actimeo");
} else
mnt->acregmin = mnt->acregmax =
@@ -1170,7 +1170,7 @@ static int nfs_parse_mount_options(char *raw,
break;
case Opt_namelen:
if (match_int(args, &option) || option < 0) {
- errors++;
+ invalid_values++;
nfs_parse_invalid_value("namlen");
} else
mnt->namlen = option;
@@ -1178,7 +1178,7 @@ static int nfs_parse_mount_options(char *raw,
case Opt_mountport:
if (match_int(args, &option) ||
option < 0 || option > USHORT_MAX) {
- errors++;
+ invalid_values++;
nfs_parse_invalid_value("mountport");
} else
mnt->mount_server.port = option;
@@ -1187,14 +1187,14 @@ static int nfs_parse_mount_options(char *raw,
if (match_int(args, &option) ||
option < NFS_MNT_VERSION ||
option > NFS_MNT3_VERSION) {
- errors++;
+ invalid_values++;
nfs_parse_invalid_value("mountvers");
} else
mnt->mount_server.version = option;
break;
case Opt_nfsvers:
if (match_int(args, &option)) {
- errors++;
+ invalid_values++;
nfs_parse_invalid_value("nfsvers");
break;
}
@@ -1206,7 +1206,7 @@ static int nfs_parse_mount_options(char *raw,
mnt->flags |= NFS_MOUNT_VER3;
break;
default:
- errors++;
+ invalid_values++;
nfs_parse_invalid_value("nfsvers");
}
break;
@@ -1221,7 +1221,7 @@ static int nfs_parse_mount_options(char *raw,
rc = nfs_parse_security_flavors(string, mnt);
kfree(string);
if (!rc) {
- errors++;
+ invalid_values++;
dfprintk(MOUNT, "NFS: unrecognized "
"security flavor\n");
}
@@ -1249,7 +1249,7 @@ static int nfs_parse_mount_options(char *raw,
xprt_load_transport(string);
break;
default:
- errors++;
+ invalid_values++;
dfprintk(MOUNT, "NFS: unrecognized "
"transport protocol\n");
}
@@ -1272,7 +1272,7 @@ static int nfs_parse_mount_options(char *raw,
break;
case Opt_xprt_rdma: /* not used for side protocols */
default:
- errors++;
+ invalid_values++;
dfprintk(MOUNT, "NFS: unrecognized "
"transport protocol\n");
}
@@ -1330,7 +1330,7 @@ static int nfs_parse_mount_options(char *raw,
mnt->flags |= NFS_MOUNT_LOOKUP_CACHE_NONEG|
NFS_MOUNT_LOOKUP_CACHE_NONE;
break;
default:
- errors++;
+ invalid_values++;
dfprintk(MOUNT, "NFS: invalid "
"lookupcache argument\n");
};
@@ -1350,15 +1350,22 @@ static int nfs_parse_mount_options(char *raw,
break;
default:
- errors++;
+ invalid_options++;
dfprintk(MOUNT, "NFS: unrecognized mount option "
"'%s'\n", p);
}
}
- if (errors > 0) {
- dfprintk(MOUNT, "NFS: parsing encountered %d error%s\n",
- errors, (errors == 1 ? "" : "s"));
+ if (invalid_values > 0) {
+ dfprintk(MOUNT, "NFS: parsing encountered %d invalid value%s\n",
+ invalid_values,
+ invalid_values == 1 ? "" : "s");
+ return 0;
+ }
+ if (invalid_options > 0) {
+ dfprintk(MOUNT, "NFS: parsing encountered %d invalid option%s\n",
+ invalid_options,
+ invalid_options == 1 ? "" : "s");
if (!sloppy)
return 0;
}
--
To unsubscribe from this list: send the line "unsubscribe linux-
nfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html