Skip to content
Snippets Groups Projects
user avatar
Glauber Costa authored
The main problem with supporting the setmntent function is not the code per se
- which is itself quite trivial. Rather, one expects that if this function (and
addmntent, for instance) is being used, somebody is about to make changes to the
system's initial mount points. We can make this all volatile, but I suspect users
would be frustrated to find out that the modifications made won't be reflected in
the system.

What this patch does, is that it creates an fstab file that is included in the
main build and contains our currently dynamic mounts for proc and dev.  When
OSv finds such a file, it will proceed mounting them.

The results here should be the same except for people booting using
bootfs.manifest, IOW, our initial build. Since we can build fine without those
pseudo filesystems, I didn't really bother doing anything about it.

I know this patch can be a bit polemic, since dynamically building a filesystem
list without depending on any file fits our model a bit better towards being
stateless as much as we can. But I believe it to be the right approach since
it will allow all the *mntent functions to write with the correct expectations.

Signed-off-by: default avatarGlauber Costa <glommer@cloudius-systems.com>
CC: Lyor Goldstein <lgoldstein@vmware.com>
Signed-off-by: default avatarPekka Enberg <penberg@cloudius-systems.com>
df9b6df7
History