[Pm-utils] unify boolean config variables

Victor Lowther victor.lowther at gmail.com
Wed Jun 17 07:32:52 PDT 2009


On Jun 14, 2009, at 11:35 AM, Michael Biebl <mbiebl at gmail.com> wrote:

> Looks good.
>
> But I'd prefer if we also would use a set of boolean variables
> consistently in our code and documentation (like say true and false).
> I.e. we should be strict and consistent in the code and documentation,
> but permissive on user input/configuration.

Sounds good. Patch?

>
>
> Currently we have yes/no, true/false, set/unset
>
> 2009/6/14 Victor Lowther <victor.lowther at gmail.com>:
>> On Sat, 2009-06-13 at 17:00 +0200, Michael Biebl wrote:
>>> Any news on this?
>>
>> Yeah -- I coded that up a month ago, then never pushed it.
>>
>> Anyways, the branch at
>> http://cgit.freedesktop.org/~vlowther/pm-utils/log/ has the unified
>> boolean checking -- take a look and let me know what you think.
>>
>>> 2009/5/4 Victor Lowther <victor.lowther at gmail.com>:
>>>> On Thu, 2009-04-30 at 06:59 +0200, Michael Biebl wrote:
>>>>> Hi,
>>>>>
>>>>> currently our man pages and config variables are not very  
>>>>> consistent
>>>>> with regard to boolean variables.
>>>>>
>>>>> The majority uses true/false,
>>>>> there is HIBERNATE_RESUME_POST_VIDEO which is yes/no
>>>>> and NEED_CLOCK_SYNC, where anything else then "" is treated as  
>>>>> true
>>>>> (see 90clock).
>>>>>
>>>>> I'd like to use true/false for all boolean values and update the
>>>>> manpages for HIBERNATE_RESUME_POST_VIDEO and NEED_CLOCK_SYNC and  
>>>>> also
>>>>> the check in 90clock, to test explictly [ "$NEED_CLOCK_SYNC" =  
>>>>> "true"
>>>>> ] || ...
>>>>>
>>>>> Any objections? Do you think this would pose upgrade problems for
>>>>> users who already set
>>>>> HIBERNATE_RESUME_POST_VIDEO to yes or no ( I could check both  
>>>>> values
>>>>> (yes/no,true/false))
>>>>
>>>> I will encapsulate it in a function.  It will be along the lines  
>>>> of "if
>>>> $whatever is any of the commonly used values that mean yes,  
>>>> return true,
>>>> otherwise return false".
>>>>
>>>>
>>>>> Cheers,
>>>>> Michael
>>>>>
>>>> --
>>>> Victor Lowther
>>>> RHCE# 805008539634727
>>>> LPIC-2# LPI000140019
>>>>
>>>>
>>>
>>>
>>>
>> --
>> Victor Lowther
>> RHCE# 805008539634727
>> LPIC-2# LPI000140019
>>
>>
>
>
>
> -- 
> Why is it that all of the instruments seeking intelligent life in the
> universe are pointed away from Earth?


More information about the Pm-utils mailing list