lkml.org 
[lkml]   [2000]   [Feb]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Odd code in sysrq.c
My initial thought would be that having both the ifdef
and the variable allows you to either not include SYSRQ
support (ifdef is false), or to have SYSRQ support (ifdef
is true) which defaults to being turned on (variable is
true) but can be turned off using some method (/proc/<something>
or a kernel debugger or something else). If you didn't
want the ability to turn it on and off, I agree that
having the variable on top of the ifdef is definitely
redundant.


tw


On 02/26/2000 02:47 -0500, Mike A. Harris wrote:
>> The following is found in sysrq.c
>>
>> #ifdef CONFIG_MAGIC_SYSRQ
>> int sysrq_enabled = 1;
>> #endif
>>
>>
>> Can someone explain why? I mean, if CONFIG_MAGIC_SYSRQ is not
>> enabled at all, then sysrq.c isn't compiled at all - correct?
>>
>> So if it isn't compiled then the above ifdef will never get
>> seen. If however CONFIG_MAGIC_SYSRQ *IS* defined, then the
>> feature is enabled, sysrq.c gets compiled, and the ifdef block
>> above is automatically going to be true.
>>
>> So the ifdef is pointless and redundant no?
>>
>> If not, please explain why.
>>
>> TTYL
>>
>> --
>> Mike A. Harris Linux advocate
>> Computer Consultant GNU advocate
>> Capslock Consulting Open Source advocate
>>
>> Suspicious Anagram #4:
>> Word: PRESIDENT CLINTON OF THE USA
>> Anagram: TO COPULATE HE FINDS INTERNS
>>
>>
>> -
>> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
>> the body of a message to majordomo@vger.rutgers.edu
>> Please read the FAQ at http://www.tux.org/lkml/
End of included message



--
+--------------------------+------------------------------+
| Tim Walberg | tewalberg@mediaone.net |
| 828 Marshall Ct. | www.concentric.net/~twalberg |
| Palatine, IL 60074 | |
+--------------------------+------------------------------+
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2005-03-22 13:56    [W:0.142 / U:0.280 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site