[PATCH 4/5] upstart: add UpstartJob= to service desktop files
Will Thompson
will.thompson at collabora.co.uk
Fri Dec 24 06:53:32 PST 2010
On 23/12/10 19:03, Scott James Remnant wrote:
> On Thu, Dec 23, 2010 at 1:22 PM, Will Thompson
> <will.thompson at collabora.co.uk> wrote:
>> On 23/12/10 11:35, Lennart Poettering wrote:
>>>
>>> On Wed, 22.12.10 15:27, Scott James Remnant (scott at netsplit.com) wrote:
>>>
>>>> + {
>>>> + if (strchr ("YyTt", upstart_job_raw[0]))
>>>> + upstart_job = TRUE;
>>>> + }
>>>> +
>>>
>>> I can't say I am a particular fan of parsing booleans like that, where
>>> every thinkable string is acceptable without error/warning message
>>> including
>>> the empty string.
>>
>> FWIW,
>> http://standards.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html#value-types
>> documents that the only legal values of type boolean are "true" or "false".
>>
> Thanks for the catch; do you think it would be appropriate behaviour
> for the code to error if neither of these values is given?
I would personally probably go for issuing a warning of some form and
then treating it as if "false" was given.
--
Will
More information about the dbus
mailing list