Fix exports.

This commit is contained in:
Poul-Henning Kamp 2004-12-07 15:13:35 +00:00
parent f21cc2cafc
commit 5c83b5551c
2 changed files with 8 additions and 12 deletions

View File

@ -151,13 +151,11 @@ cd9660_mount(struct mount *mp, struct thread *td)
* read/write; if there is no device name, that's all we do.
*/
if (mp->mnt_flag & MNT_UPDATE) {
if (fspec == NULL) {
error = vfs_getopt(mp->mnt_optnew,
"export", (void **)&export, &len);
if (error || len != sizeof *export)
return (EINVAL);
error = vfs_getopt(mp->mnt_optnew,
"export", (void **)&export, &len);
if (error == 0 && len == sizeof *export && export.ex_flags)
return (vfs_export(mp, export));
}
}
}
/*
* Not an update, or updating the name: look up the name

View File

@ -151,13 +151,11 @@ cd9660_mount(struct mount *mp, struct thread *td)
* read/write; if there is no device name, that's all we do.
*/
if (mp->mnt_flag & MNT_UPDATE) {
if (fspec == NULL) {
error = vfs_getopt(mp->mnt_optnew,
"export", (void **)&export, &len);
if (error || len != sizeof *export)
return (EINVAL);
error = vfs_getopt(mp->mnt_optnew,
"export", (void **)&export, &len);
if (error == 0 && len == sizeof *export && export.ex_flags)
return (vfs_export(mp, export));
}
}
}
/*
* Not an update, or updating the name: look up the name