Subject: Re: /emul/xxx for all/other /sys/compat/xxx?
To: None <tech-kern@NetBSD.ORG>
From: Christos Zoulas <christos@deshaw.com>
List: tech-kern
Date: 03/06/1995 16:44:14
In article <199503061006.AA01130@orca.fwi.uva.nl> frank@fwi.uva.nl (Frank van der Linden) writes:
>
>Actually, I took the Linux compat code one step further in the 
>alternate root handling (perhaps too far due to a misunderstanding
>with Christos):
>
>- relative pathnames are untouched.
>- opening a file for reading (in various forms) checks if the file
>  exists under /emul/linux
>- creating a file (including symlink() and rename()) checks if the directory
>  that it should be created in exists in /emul/linux and then attempts
>  to create it there.
>
>The last point is not done in the svr4 emul code, only in the Linux code
>currently.
>
>
>Before we make /emul directories the default, we should agree on the semantics.
>What are the objections to what I did? It seemed better to me, because
>it made things like the Linux version of ldconfig work correctly. Any
>examples of where this would break?

Let me just try to explain the reason why I chose the following semantics:

- relative pathnames are untouched.
- opening a file (in various forms) checks if the file 
  exists under /emul/xxx

The alternate root is provided as a means to programs to find and update
their own configuration files, shared libraries etc. Creating files should
work normally. Consider running the svr4 ksh and doing 'echo > foo' in /
as Charles said. Notice that the ldconfig example will work properly,
if the ld.so.cache already exists in /emul/linux/etc.

christos