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

Function vfs_byname_kld

freebsd/kern/vfs_init.c:139–166  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

137}
138
139struct vfsconf *
140vfs_byname_kld(const char *fstype, struct thread *td, int *error)
141{
142 struct vfsconf *vfsp;
143 int fileid, loaded;
144
145 vfsp = vfs_byname(fstype);
146 if (vfsp != NULL)
147 return (vfsp);
148
149 /* Try to load the respective module. */
150 *error = kern_kldload(td, fstype, &fileid);
151 loaded = (*error == 0);
152 if (*error == EEXIST)
153 *error = 0;
154 if (*error)
155 return (NULL);
156
157 /* Look up again to see if the VFS was loaded. */
158 vfsp = vfs_byname(fstype);
159 if (vfsp == NULL) {
160 if (loaded)
161 (void)kern_kldunload(td, fileid, LINKER_UNLOAD_FORCE);
162 *error = ENODEV;
163 return (NULL);
164 }
165 return (vfsp);
166}
167
168static int
169vfs_mount_sigdefer(struct mount *mp)

Callers 3

mount_snapshotFunction · 0.85
sys_mountFunction · 0.85
vfs_domountFunction · 0.85

Calls 3

vfs_bynameFunction · 0.85
kern_kldloadFunction · 0.85
kern_kldunloadFunction · 0.85

Tested by

no test coverage detected