[libvirt] [PATCH 4/5] virinitctl: Expose fifo paths and allow caller to chose one
mprivozn at redhat.com
Thu Feb 7 10:38:34 UTC 2019
On 2/6/19 3:43 PM, Erik Skultety wrote:
> On Fri, Jan 25, 2019 at 02:31:48PM +0100, Michal Privoznik wrote:
>> So far the virInitctlSetRunLevel() is fully automatic. It finds
>> the correct fifo to use to talk to the init and it will set the
>> desired runlevel. Well, callers (so far there is just one) will
>> need to inspect the fifo a bit just before the runlevel is set.
>> Therefore, expose the internal list of fifos and also allow
>> caller to explicitly use one.
>> Signed-off-by: Michal Privoznik <mprivozn at redhat.com>
>> -int virInitctlSetRunLevel(virInitctlRunLevel level);
>> +extern const char *virInitctlFifos;
> I prefer  to prevent compiler from complaining if
> someone adds a new fifo
Problem with this is that then I can't use ARRAY_CARDINALITY() macro in
5/5. As we discussed in person, I'm turning this into a NULL terminated
list and adjusting 5/5 correspondingly.
>> +int virInitctlSetRunLevel(const char *fifo,
>> + virInitctlRunLevel level);
>> #endif /* LIBVIRT_VIRINITCTL_H */
> Reviewed-by: Erik Skultety <eskultet at redhat.com>
More information about the libvir-list