On 03/05/2011 07:15 AM, Maheswara Reddy C - ERS, HCL Tech wrote:
> Hi,
>
> I am successfully upgraded the linux kernel 2.6.34.1 with namespace enable.
> I have add few socket options in setsockopt() fun in net/core/sock.c and
> code is put under
>
> Ifdef NAMESPACE_PATCH
>
> ///modified code
>
> #endif
>
> Where to define the NAMESPACE_PATCH ?
>
> I have seen in makefile and some other .h , but not clear, could someone help
> me out.
You should add a section where you enable your code in the proper
Kconfig file (eg. net/Kconfig)
config NSPATCH
...
...
...
In net/core/sock.c use:
#if CONFIG_NSPATCH
#endif
By the way, patches with ifdef in the .c files are not accepted in
mainline. You should create in the corresponding header file:
#ifdef CONFIG_NSPATCH
int nspatch_function(int dummy);
#else
static inline int nspatch_function(int dummy)
{
return 0;
}
#endif
Please refer to the CodingStyle file in the Documentation directory for
more informations.
Thanks
-- Daniel
------------------------------------------------------------------------------
What You Don't Know About Data Connectivity CAN Hurt You
This paper provides an overview of data connectivity, details
its effect on application quality, and explores various alternative
solutions. http://p.sf.net/sfu/progress-d2d
_______________________________________________
Lxc-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/lxc-devel