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

Function reroot_conf

freebsd/kern/kern_shutdown.c:278–290  ·  view source on GitHub ↗

* The only reason this exists is to create the /dev/reroot/ directory, * used by reroot code in init(8) as a mountpoint for tmpfs. */

Source from the content-addressed store, hash-verified

276 * used by reroot code in init(8) as a mountpoint for tmpfs.
277 */
278static void
279reroot_conf(void *unused)
280{
281 int error;
282 struct cdev *cdev;
283
284 error = make_dev_p(MAKEDEV_CHECKNAME | MAKEDEV_WAITOK, &cdev,
285 &reroot_cdevsw, NULL, UID_ROOT, GID_WHEEL, 0600, "reroot/reroot");
286 if (error != 0) {
287 printf("%s: failed to create device node, error %d",
288 __func__, error);
289 }
290}
291
292SYSINIT(reroot_conf, SI_SUB_DEVFS, SI_ORDER_ANY, reroot_conf, NULL);
293

Callers

nothing calls this directly

Calls 2

make_dev_pFunction · 0.85
printfFunction · 0.70

Tested by

no test coverage detected