[Click] [PATCH 04/12] Configury: prepend net_device namespace for NETREG_REGISTERED

Eddie Kohler kohler at cs.ucla.edu
Sun Jan 16 17:36:09 EST 2011


My patch for this will shift the enum definitions out of the net_device 
scope, so the constants are still global.

THANKS AGAIN!!
Eddie


On 10/3/10 8:09 PM, Joonwoo Park wrote:
> Hi Eddie,
>
> I believe we cannot put beginning and end of line markers.
> Please see netdev_name() from include/linux/netdevice.h.  (presumably
> only in 2.6.35+?)
>
> --
> static inline const char *netdev_name(const struct net_device *dev)
> {
>          if (dev->reg_state != NETREG_REGISTERED)
>                  return "(unregistered net_device)";
>          return dev->name;
> }
> --
>
> Thanks,
> Joonwoo
>
> On Wed, Sep 29, 2010 at 4:06 PM, Eddie Kohler<kohler at cs.ucla.edu>  wrote:
>> Should the before portion of the s{} have beginning-of-line and end-of-line
>> markers?  And can you include in the message an example of an offending
>> line?
>>
>> Eddie
>>
>>
>> On 09/25/2010 10:29 PM, Joonwoo Park wrote:
>>>
>>> eliminate syntax error below:
>>> error: ‘NETREG_REGISTERED’ was not declared in this scope
>>>
>>> Signed-off-by: Joonwoo Park<joonwpark81 at gmail.com>
>>> ---
>>>   linuxmodule/fixincludes.pl |    3 +++
>>>   1 files changed, 3 insertions(+), 0 deletions(-)
>>>
>>> diff --git a/linuxmodule/fixincludes.pl b/linuxmodule/fixincludes.pl
>>> index 5553d9a..4088643 100755
>>> --- a/linuxmodule/fixincludes.pl
>>> +++ b/linuxmodule/fixincludes.pl
>>> @@ -211,6 +211,9 @@ sub one_includeroot ($$) {
>>>             if ($d eq "kobject.h") {
>>>                 s{(^\#include \<linux\/sysfs.h\>(.*\n)*)(^enum
>>> kobj_ns_type\s\{\n([^\}].*\n)*\}\;)((.*\n)*)}{"$3\n$1\/*\n$3\n*\/$5"}emg;
>>>             }
>>> +           if ($d eq "netdevice.h") {
>>> +               s{(.*)(\(.*\b)(NETREG_.+)(\b\))}{#ifdef
>>> __cplusplus\n$1$2net_device::$3$4\n#else\n$1$2$3$4\n#endif}g;
>>> +           }
>>>
>>>             # unquote.
>>>             $_ = sunprotect($_);
>>



More information about the click mailing list