Subject: Re: Using common code for alternate path checks
To: Emmanuel Dreyfus <>
From: Bill Studenmund <>
List: tech-kern
Date: 12/09/2002 14:43:50
On Mon, 9 Dec 2002, Emmanuel Dreyfus wrote:

> > It would make LKMs a bit more painful. I'd say if it's ain't broken,
> > don't fix it. Also, there is different issue that not all the emuls
> > really would use all the functions provided by compat_file.c, so
> > it would perhaps bring a bit more unnecessary code into custom
> > kernels.
> You can ifdef out anything that you don't use. Of course theses function
> would not go in a module, but I'm not sure it matters: it's not likely
> that you will need to change theses functions: they are just plain
> stubs.

I think (assuming I'm understanding everything right) that Jaromir's point
was that darwin and freebsd and aout and ..  emulations will need these
routines. So they will either need to be in a module that the compat
options depend on, or they will need to be in the kernel for the lkms to

It's the same situation as the layer_ routines for layered file systems.

> However it would have been nice to have this discussion when I proposed
> the change last week.

I think it's a good change. Do it.

Look at how we handle things for the layer_ routines in miscfs/genfs/..
and how routines get added to a kernel if LKM is defined. I think it's not
the best thing to do, but the easiest thing to do for now. Oh, don't
forget to copy any, "We should fix this," comments. :-)

Take care,