Subject: Re: Where/how is rootvp set in kernel initialisation?
To: None <nigel@ind.tansu.com.au>
From: Chris G. Demetriou <cgd@sibyte.com>
List: tech-kern
Date: 09/19/2000 09:15:50
nigel@ind.tansu.com.au writes:
> 	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");


cgd