Re: [RFC] Trimming modules noop functions

From: Greg KH (gregat_private)
Date: Wed Oct 16 2002 - 00:51:10 PDT

  • Next message: Chris Wright: "Re: [RFC] Trimming modules noop functions"

    On Wed, Oct 16, 2002 at 12:25:58AM -0700, Chris Wright wrote:
    > I've posted something similar to this before (I believe it used inline
    > functions which have the nasty side effect of code bloat for multiple
    > modules) to trim down the module to supply only the code it cares about.
    > This preserves the module's ability to explicitly implement each hook
    > (IOW, no magic defaults).
    
    I like this.  I really hate those empty functions, this is much nicer.
    
    > The patch below exports two new functions.  The (void *) cast-o-rama is
    > to kill compiler warnings.  If we really wanted to bother Greg, we could
    > create a series of typedefs for casting ;-)
    > 
    > typedef int (*sethostname_t) (char *hostname);
    > 
    > 	.sethostname =		(sethostname_t)lsm_return_ok,
    
    Oh don't even think of doing that!  :)
    
    greg k-h
    _______________________________________________
    linux-security-module mailing list
    linux-security-moduleat_private
    http://mail.wirex.com/mailman/listinfo/linux-security-module
    



    This archive was generated by hypermail 2b30 : Wed Oct 16 2002 - 00:52:23 PDT