MCPcopy Create free account
hub / github.com/F-Stack/f-stack / vfs_copyopt

Function vfs_copyopt

freebsd/kern/vfs_mount.c:2223–2240  ·  view source on GitHub ↗

* Find and copy a mount option. * * The size of the buffer has to be specified * in len, if it is not the same length as the * mount option, EINVAL is returned. * Returns ENOENT if the option is not found. */

Source from the content-addressed store, hash-verified

2221 * Returns ENOENT if the option is not found.
2222 */
2223int
2224vfs_copyopt(struct vfsoptlist *opts, const char *name, void *dest, int len)
2225{
2226 struct vfsopt *opt;
2227
2228 KASSERT(opts != NULL, ("vfs_copyopt: caller passed 'opts' as NULL"));
2229
2230 TAILQ_FOREACH(opt, opts, link) {
2231 if (strcmp(name, opt->name) == 0) {
2232 opt->seen = 1;
2233 if (len != opt->len)
2234 return (EINVAL);
2235 bcopy(opt->value, dest, opt->len);
2236 return (0);
2237 }
2238 }
2239 return (ENOENT);
2240}
2241
2242int
2243__vfs_statfs(struct mount *mp, struct statfs *sbp)

Callers 9

shm_prison_checkFunction · 0.85
shm_prison_setFunction · 0.85
kern_jail_setFunction · 0.85
kern_jail_getFunction · 0.85
sem_prison_checkFunction · 0.85
sem_prison_setFunction · 0.85
msg_prison_checkFunction · 0.85
msg_prison_setFunction · 0.85
vfs_domount_updateFunction · 0.85

Calls 1

strcmpFunction · 0.85

Tested by

no test coverage detected