提交 f0a55af3 编写于 作者: D Daniel P. Berrange

Improve logging of shutdown inhibitor

The log category for virnetdaemon.c was mistakenly set
to rpc.netserver. Some useful info about the inhibitor
file descriptor was also never logged.
Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
上级 3e03d1bd
......@@ -47,7 +47,7 @@
#define VIR_FROM_THIS VIR_FROM_RPC
VIR_LOG_INIT("rpc.netserver");
VIR_LOG_INIT("rpc.netdaemon");
typedef struct _virNetDaemonSignal virNetDaemonSignal;
typedef virNetDaemonSignal *virNetDaemonSignalPtr;
......@@ -460,8 +460,10 @@ virNetDaemonGotInhibitReply(DBusPendingCall *pending,
DBUS_TYPE_INVALID)) {
if (dmn->autoShutdownInhibitions) {
dmn->autoShutdownInhibitFd = fd;
VIR_DEBUG("Got inhibit FD %d", fd);
} else {
/* We stopped the last VM since we made the inhibit call */
VIR_DEBUG("Closing inhibit FD %d", fd);
VIR_FORCE_CLOSE(fd);
}
}
......@@ -550,8 +552,10 @@ virNetDaemonRemoveShutdownInhibition(virNetDaemonPtr dmn)
VIR_DEBUG("dmn=%p inhibitions=%zu", dmn, dmn->autoShutdownInhibitions);
if (dmn->autoShutdownInhibitions == 0)
if (dmn->autoShutdownInhibitions == 0) {
VIR_DEBUG("Closing inhibit FD %d", dmn->autoShutdownInhibitFd);
VIR_FORCE_CLOSE(dmn->autoShutdownInhibitFd);
}
virObjectUnlock(dmn);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册