[libvirt] [PATCH 4/5] virinitctl: Expose fifo paths and allow caller to chose one

Erik Skultety eskultet at redhat.com
Wed Feb 6 14:43:38 UTC 2019


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[3];

                            I prefer [] to prevent compiler from complaining if
someone adds a new fifo

> +
> +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 mailing list