
Use the freedesktop inhibition DBus service to prevent host shutdown or session logout while any VMs are running.
+#ifdef HAVE_DBUS +# include <dbus/dbus.h>
Do we really need this header...
No, its obsolete.
Well, I _did_ see some dbus_ calls in this file: +#ifdef HAVE_DBUS +static void virNetServerGotInhibitReply(DBusPendingCall *pending, + void *opaque) +{ + + reply = dbus_pending_call_steal_reply(pending);
...or is this local header sufficient? (That is, should you rework this patch to put the raw dbus_* calls isolated into virdbus.[ch], rathar than having this file have to use conditional compilation)?
Correct.
So I'm assuming here I should wait for you to post a v2 that actually does this refactoring.
+ VIR_DEBUG("srv=%p inhibitions=%zu", srv, srv->autoShutdownInhibitions);
Again, should this debug be hoisted into an earlier patch?
I don't think it really matters - this patch is the first time that it is interesting to see the debug info :-)
Fair enough on this point, though :)