On Wed, Aug 29, 2012 at 4:28 AM, Lukáš Nykrýn <[email protected]> wrote:
> I have here a request that systemd should not refuse to start service because 
> of "start request repeated too quickly" when service is started manually.
> I have prepared a patch, but I am not sure about my approach.

It may be just an issue of taste, but I tend to consider bitfields
once multiple boolean parameters start appearing in the function
definition. When it's a good fit, it makes function calls easier to
read versus counting commas and referencing the function definition.
It makes further changes less disruptive, too. In this case, it makes
sense to pair the "force" option in a bitfield with an option that
overrides the start request repeat timer. They're both overrides for
protection behavior that might stop the request from being carried
out.

I also think "user_start" ought to just be "skip_start_repeat_check"
or similar. This is because the call should specify what's being
requested (no repeat check) rather than who's doing the requesting.
It's plausible that code other than that invoked by a user utility
might want to skip that check. It's also possible that a script may
call systemctl and not want to skip the check. Logic that changes
behavior because a user is directly invoking something should be on
the user utility side, not in the invoked code (which has no real
reason to know a user requested the invocation).

-- 
David Strauss
   | [email protected]
_______________________________________________
systemd-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/systemd-devel

Reply via email to