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

Function vfs_getopt

freebsd/kern/vfs_mount.c:2011–2029  ·  view source on GitHub ↗

* Get a mount option by its name. * * Return 0 if the option was found, ENOENT otherwise. * If len is non-NULL it will be filled with the length * of the option. If buf is non-NULL, it will be filled * with the address of the option. */

Source from the content-addressed store, hash-verified

2009 * with the address of the option.
2010 */
2011int
2012vfs_getopt(struct vfsoptlist *opts, const char *name, void **buf, int *len)
2013{
2014 struct vfsopt *opt;
2015
2016 KASSERT(opts != NULL, ("vfs_getopt: caller passed 'opts' as NULL"));
2017
2018 TAILQ_FOREACH(opt, opts, link) {
2019 if (strcmp(name, opt->name) == 0) {
2020 opt->seen = 1;
2021 if (len != NULL)
2022 *len = opt->len;
2023 if (buf != NULL)
2024 *buf = opt->value;
2025 return (0);
2026 }
2027 }
2028 return (ENOENT);
2029}
2030
2031int
2032vfs_getopt_pos(struct vfsoptlist *opts, const char *name)

Callers 9

vfs_optionissetFunction · 0.85
zfs_mountFunction · 0.85
kern_jail_setFunction · 0.85
kern_jail_getFunction · 0.85
vfs_donmountFunction · 0.85
vfs_domount_updateFunction · 0.85
vfs_mount_errorFunction · 0.85
vfs_opterrorFunction · 0.85
vfs_getopt_sizeFunction · 0.85

Calls 1

strcmpFunction · 0.85

Tested by

no test coverage detected