Subject: Re: Where/how is rootvp set in kernel initialisation?
To: None <email@example.com>
From: Chris G. Demetriou <firstname.lastname@example.org>
Date: 09/19/2000 09:15:50
> I have searched through the kernel source, and these are the
> only three places that seem to set rootvp:
> coda_vfsops.c : coda_mount()
> vfs_getcwd.c : sys___getcwd()
> kernfs_vfsops.c : kernfs_unmount()
> Assuming that I haven't stuffed up in my searching,
> which of these is called (indirectly) from init_main(), and why ?
you seem to have stuffed up in your searching. 8-)
in general, this is done via the file system mountroot routines.
e.g. in ffs_mountroot() in ffs_vfsops.c, there's code like:
if (bdevvp(rootdev, &rootvp))
panic("ffs_mountroot: can't setup bdevvp's");