Source-Changes-D archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: src/sys/dev



On Thu, Dec 01, 2011 at 07:42:49PM +0100, Manuel Bouyer wrote:
> On Thu, Dec 01, 2011 at 05:50:14PM +0000, David Laight wrote:
> > I'd rather the .c file wasn't polluted with #ifdefs.
> > Probably better to #define fss_compat_ioctl(...) EINVAL somewhere.
> > 
> > We ought to sort out a way of making the compat code loadable
> > - in which case this would need to be a real function call
> > (possibly an indirect one).
> 
> I'm not sure bloating the kernel and infrastrucure with functions call,
> functions pointer and others to be able to compile out 4 lines of code
> is worth it.

Use a weak alias, fss_compat_ioctl() -> einval().  Let the compat code
supply a strong symbol for the real implementation.

IIRC, our module loader cannot (yet) load a strong alias over a weak
alias and restore the weak alias when the module containing the strong
alias is unloaded.  That would have been nice to have when bpf was
modularized.

Dave

-- 
David Young
dyoung%pobox.com@localhost    Urbana, IL    (217) 721-9981


Home | Main Index | Thread Index | Old Index