summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/kern/vfs_subr.c17
-rw-r--r--sys/sys/mount.h2
2 files changed, 8 insertions, 11 deletions
diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c
index ae250e4..f4a9150 100644
--- a/sys/kern/vfs_subr.c
+++ b/sys/kern/vfs_subr.c
@@ -523,19 +523,18 @@ vfs_getopt(opts, name, buf, len)
/*
* Find and copy a mount option.
+ *
* The size of the buffer has to be specified
- * in len, if it is not big enough, EINVAL is
- * returned. Returns ENOENT if the option is
- * not found. Otherwise, the number of bytes
- * actually copied are put in done if it's
- * non-NULL and 0 is returned.
+ * in len, if it is not the same length as the
+ * mount option, EINVAL is returned.
+ * Returns ENOENT if the option is not found.
*/
int
-vfs_copyopt(opts, name, dest, len, done)
+vfs_copyopt(opts, name, dest, len)
struct vfsoptlist *opts;
const char *name;
void *dest;
- int len, *done;
+ int len;
{
struct vfsopt *opt;
int i;
@@ -544,11 +543,9 @@ vfs_copyopt(opts, name, dest, len, done)
opt = opts->opt;
while (i++ < opts->optcnt) {
if (strcmp(name, opt->name) == 0) {
- if (len < opt->len)
+ if (len != opt->len)
return (EINVAL);
bcopy(opt->value, dest, opt->len);
- if (done != NULL)
- *done = opt->len;
return (0);
}
opt++;
diff --git a/sys/sys/mount.h b/sys/sys/mount.h
index 9dd5b45..2c47491 100644
--- a/sys/sys/mount.h
+++ b/sys/sys/mount.h
@@ -440,7 +440,7 @@ int dounmount(struct mount *, int, struct thread *td);
int kernel_mount(struct iovec *iovp, unsigned int iovcnt, int flags);
int kernel_vmount(int flags, ...);
int vfs_getopt(struct vfsoptlist *, const char *, void **, int *);
-int vfs_copyopt(struct vfsoptlist *, const char *, void *, int, int *);
+int vfs_copyopt(struct vfsoptlist *, const char *, void *, int);
int vfs_mount(struct thread *td, const char *type, char *path,
int flags, void *data);
int vfs_setpublicfs /* set publicly exported fs */
OpenPOWER on IntegriCloud