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 <[email protected]>
---

...

-int virInitctlSetRunLevel(virInitctlRunLevel level);
+
+extern const char *virInitctlFifos[3];

                             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 <[email protected]>


Michal

--
libvir-list mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/libvir-list

Reply via email to