Some times ago, vfs_getopts() was changed, so that it would set error to

ENOENT if the option wasn't provided, instead of setting it to 0.
xfs however didn't catch up on this, so it assumed something went bad if
vfs_getopts() sets the error to non-zero, and just returns the error.
Unbreak xfs mount by just ignoring the error if vfs_getopts() sets the
error to ENOENT, as we should have sane defaults.

Reviewed by:    kan
Approved by:    re (rwatson)
Tested by:      rpaulo
This commit is contained in:
Olivier Houchard 2007-08-20 15:33:22 +00:00
parent d239bd3ccc
commit 7dd9c45f26
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=171905

View File

@ -131,25 +131,25 @@ _xfs_param_copyin(struct mount *mp, struct thread *td)
args->logbufsize = -1;
parse_int(mp, "flags", &args->flags, &error);
if (error != 0)
if (error != 0 && error != ENOENT)
return error;
args->flags |= XFSMNT_32BITINODES;
parse_int(mp, "sunit", &args->sunit, &error);
if (error != 0)
if (error != 0 && error != ENOENT)
return error;
parse_int(mp, "swidth", &args->swidth, &error);
if (error != 0)
if (error != 0 && error != ENOENT)
return error;
parse_int(mp, "logbufs", &args->logbufs, &error);
if (error != 0)
if (error != 0 && error != ENOENT)
return error;
parse_int(mp, "logbufsize", &args->logbufsize, &error);
if (error != 0)
if (error != 0 && error != ENOENT)
return error;
fsname = vfs_getopts(mp->mnt_optnew, "from", &error);