lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 29 Jul 2011 14:58:03 -0400
From:	Arnaud Lacombe <lacombar@...il.com>
To:	Randy Dunlap <rdunlap@...otime.net>
Cc:	Michal Marek <mmarek@...e.cz>, linux-kbuild@...r.kernel.org,
	xiyou.wangcong@...il.com, sam@...nborg.org,
	linux-kernel@...r.kernel.org, plagnioj@...osoft.com
Subject: Re: [PATCH] kconfig: Introduce IS_ENABLED(), IS_BUILTIN() and IS_MODULE()

Hi,

On Fri, Jul 29, 2011 at 2:25 PM, Randy Dunlap <rdunlap@...otime.net> wrote:
> On Fri, 29 Jul 2011 15:51:37 +0200 Michal Marek wrote:
>
>> Replace the config_is_*() macros with a variant that allows for grepping
>> for usage of CONFIG_* options in the code. Usage:
>>
>>   if (IS_ENABLED(CONFIG_NUMA))
>>
>> or
>>
>>   #if IS_ENABLED(CONFIG_NUMA)
>>
>> The IS_ENABLED() macro evaluates to 1 if the argument is set (to either 'y'
>> or 'm'), IS_BUILTIN() tests if the option is 'y' and IS_MODULE() test if
>> the option is 'm'. Only boolean and tristate options are supported.
>>
>> Signed-off-by: Michal Marek <mmarek@...e.cz>
>> ---
>>
>> Everybody happy with the above naming?
>
> Yes here.
>
> Acked-by: Randy Dunlap <rdunlap@...otime.net>
>
> These strings are being written to the .config file, right?
>
no, they are written to `include/generated/autoconf.h'

 - Arnaud

>> +             /*
>> +              * Generate the __enabled_CONFIG_* and
>> +              * __enabled_CONFIG_*_MODULE macros for use by the
>> +              * IS_{ENABLED,BUILTIN,MODULE} macros. The _MODULE variant is
>> +              * generated even for booleans so that the IS_ENABLED() macro
>> +              * works.
>> +              */
>> +             fprintf(fp, "#define __enabled_" CONFIG_ "%s %d\n",
>> +                             sym->name, (*value == 'y'));
>> +             fprintf(fp, "#define __enabled_" CONFIG_ "%s_MODULE %d\n",
>> +                             sym->name, (*value == 'm'));
>>               break;
>
>
> ---
> ~Randy
> *** Remember to use Documentation/SubmitChecklist when testing your code ***
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ