mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 05:35:25 +00:00
maint: kill all remaining uses of old DEBUG macro
Done mechanically with: $ git grep -l '\bDEBUG0\? *(' | xargs -L1 sed -i 's/\bDEBUG0\? *(/VIR_&/' followed by manual deletion of qemudDebug in daemon/libvirtd.c, along with a single 'make syntax-check' fallout in the same file, and the actual deletion in src/util/logging.h. * src/util/logging.h (DEBUG, DEBUG0): Delete. * daemon/libvirtd.h (qemudDebug): Likewise. * global: Change remaining clients over to VIR_DEBUG counterpart.
This commit is contained in:
parent
03ba07cb73
commit
994e7567b6
@ -141,7 +141,7 @@ remoteSerializeError(struct qemud_client *client,
|
||||
unsigned int len;
|
||||
struct qemud_client_message *msg = NULL;
|
||||
|
||||
DEBUG("prog=%d ver=%d proc=%d type=%d serial=%d, msg=%s",
|
||||
VIR_DEBUG("prog=%d ver=%d proc=%d type=%d serial=%d, msg=%s",
|
||||
program, version, procedure, type, serial,
|
||||
rerr->message ? *rerr->message : "(none)");
|
||||
|
||||
@ -372,7 +372,7 @@ remoteDispatchClientRequest(struct qemud_server *server,
|
||||
remote_error rerr;
|
||||
bool qemu_call;
|
||||
|
||||
DEBUG("prog=%d ver=%d type=%d status=%d serial=%d proc=%d",
|
||||
VIR_DEBUG("prog=%d ver=%d type=%d status=%d serial=%d proc=%d",
|
||||
msg->hdr.prog, msg->hdr.vers, msg->hdr.type,
|
||||
msg->hdr.status, msg->hdr.serial, msg->hdr.proc);
|
||||
|
||||
@ -631,7 +631,7 @@ remoteSendStreamData(struct qemud_client *client,
|
||||
struct qemud_client_message *msg;
|
||||
XDR xdr;
|
||||
|
||||
DEBUG("client=%p stream=%p data=%p len=%d", client, stream, data, len);
|
||||
VIR_DEBUG("client=%p stream=%p data=%p len=%d", client, stream, data, len);
|
||||
|
||||
if (VIR_ALLOC(msg) < 0) {
|
||||
return -1;
|
||||
@ -682,7 +682,7 @@ remoteSendStreamData(struct qemud_client *client,
|
||||
|
||||
xdr_destroy (&xdr);
|
||||
|
||||
DEBUG("Total %d", msg->bufferOffset);
|
||||
VIR_DEBUG("Total %d", msg->bufferOffset);
|
||||
}
|
||||
if (data)
|
||||
msg->streamTX = 1;
|
||||
|
@ -37,7 +37,7 @@
|
||||
#include "util.h"
|
||||
#include "ignore-value.h"
|
||||
|
||||
#define EVENT_DEBUG(fmt, ...) DEBUG(fmt, __VA_ARGS__)
|
||||
#define EVENT_DEBUG(fmt, ...) VIR_DEBUG(fmt, __VA_ARGS__)
|
||||
|
||||
static int virEventInterruptLocked(void);
|
||||
|
||||
@ -390,7 +390,7 @@ static int virEventDispatchTimeouts(void) {
|
||||
int i;
|
||||
/* Save this now - it may be changed during dispatch */
|
||||
int ntimeouts = eventLoop.timeoutsCount;
|
||||
DEBUG("Dispatch %d", ntimeouts);
|
||||
VIR_DEBUG("Dispatch %d", ntimeouts);
|
||||
|
||||
if (gettimeofday(&tv, NULL) < 0) {
|
||||
return -1;
|
||||
@ -435,7 +435,7 @@ static int virEventDispatchTimeouts(void) {
|
||||
*/
|
||||
static int virEventDispatchHandles(int nfds, struct pollfd *fds) {
|
||||
int i, n;
|
||||
DEBUG("Dispatch %d", nfds);
|
||||
VIR_DEBUG("Dispatch %d", nfds);
|
||||
|
||||
/* NB, use nfds not eventLoop.handlesCount, because new
|
||||
* fds might be added on end of list, and they're not
|
||||
@ -449,7 +449,7 @@ static int virEventDispatchHandles(int nfds, struct pollfd *fds) {
|
||||
if (i == eventLoop.handlesCount)
|
||||
break;
|
||||
|
||||
DEBUG("i=%d w=%d", i, eventLoop.handles[i].watch);
|
||||
VIR_DEBUG("i=%d w=%d", i, eventLoop.handles[i].watch);
|
||||
if (eventLoop.handles[i].deleted) {
|
||||
EVENT_DEBUG("Skip deleted n=%d w=%d f=%d", i,
|
||||
eventLoop.handles[i].watch, eventLoop.handles[i].fd);
|
||||
@ -480,7 +480,7 @@ static int virEventDispatchHandles(int nfds, struct pollfd *fds) {
|
||||
static int virEventCleanupTimeouts(void) {
|
||||
int i;
|
||||
size_t gap;
|
||||
DEBUG("Cleanup %zu", eventLoop.timeoutsCount);
|
||||
VIR_DEBUG("Cleanup %zu", eventLoop.timeoutsCount);
|
||||
|
||||
/* Remove deleted entries, shuffling down remaining
|
||||
* entries as needed to form contiguous series
|
||||
@ -523,7 +523,7 @@ static int virEventCleanupTimeouts(void) {
|
||||
static int virEventCleanupHandles(void) {
|
||||
int i;
|
||||
size_t gap;
|
||||
DEBUG("Cleanup %zu", eventLoop.handlesCount);
|
||||
VIR_DEBUG("Cleanup %zu", eventLoop.handlesCount);
|
||||
|
||||
/* Remove deleted entries, shuffling down remaining
|
||||
* entries as needed to form contiguous series
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* libvirtd.c: daemon start of day, guest process & i/o management
|
||||
*
|
||||
* Copyright (C) 2006-2010 Red Hat, Inc.
|
||||
* Copyright (C) 2006-2011 Red Hat, Inc.
|
||||
* Copyright (C) 2006 Daniel P. Berrange
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
@ -310,7 +310,7 @@ remoteInitializeGnuTLS (void)
|
||||
if (remoteCheckCertFile("CA certificate", ca_file) < 0)
|
||||
return -1;
|
||||
|
||||
qemudDebug ("loading CA cert from %s", ca_file);
|
||||
VIR_DEBUG("loading CA cert from %s", ca_file);
|
||||
err = gnutls_certificate_set_x509_trust_file (x509_cred, ca_file,
|
||||
GNUTLS_X509_FMT_PEM);
|
||||
if (err < 0) {
|
||||
@ -324,7 +324,7 @@ remoteInitializeGnuTLS (void)
|
||||
if (remoteCheckCertFile("CA revocation list", crl_file) < 0)
|
||||
return -1;
|
||||
|
||||
DEBUG("loading CRL from %s", crl_file);
|
||||
VIR_DEBUG("loading CRL from %s", crl_file);
|
||||
err = gnutls_certificate_set_x509_crl_file (x509_cred, crl_file,
|
||||
GNUTLS_X509_FMT_PEM);
|
||||
if (err < 0) {
|
||||
@ -339,7 +339,7 @@ remoteInitializeGnuTLS (void)
|
||||
return -1;
|
||||
if (remoteCheckCertFile("server key", key_file) < 0)
|
||||
return -1;
|
||||
DEBUG("loading cert and key from %s and %s", cert_file, key_file);
|
||||
VIR_DEBUG("loading cert and key from %s and %s", cert_file, key_file);
|
||||
err =
|
||||
gnutls_certificate_set_x509_key_file (x509_cred,
|
||||
cert_file, key_file,
|
||||
@ -1150,7 +1150,7 @@ remoteCheckDN (const char *dname)
|
||||
}
|
||||
|
||||
/* Print the client's DN. */
|
||||
DEBUG(_("remoteCheckDN: failed: client DN is %s"), dname);
|
||||
VIR_DEBUG("remoteCheckDN: failed: client DN is %s", dname);
|
||||
|
||||
return 0; /* Not found. */
|
||||
}
|
||||
@ -1531,7 +1531,7 @@ void qemudDispatchClientFailure(struct qemud_client *client) {
|
||||
|
||||
for (i = 0 ; i < VIR_DOMAIN_EVENT_ID_LAST ; i++) {
|
||||
if (client->domainEventCallbackID[i] != -1) {
|
||||
DEBUG("Deregistering to relay remote events %d", i);
|
||||
VIR_DEBUG("Deregistering to relay remote events %d", i);
|
||||
virConnectDomainEventDeregisterAny(client->conn,
|
||||
client->domainEventCallbackID[i]);
|
||||
}
|
||||
@ -1678,7 +1678,7 @@ static ssize_t qemudClientReadBuf(struct qemud_client *client,
|
||||
return -1;
|
||||
}
|
||||
|
||||
/*qemudDebug ("qemudClientRead: len = %d", len);*/
|
||||
/* VIR_DEBUG("qemudClientRead: len = %d", len);*/
|
||||
|
||||
if (!client->tlssession) {
|
||||
char ebuf[1024];
|
||||
@ -1812,7 +1812,7 @@ static ssize_t qemudClientRead(struct qemud_client *client) {
|
||||
*/
|
||||
static void qemudDispatchClientRead(struct qemud_server *server,
|
||||
struct qemud_client *client) {
|
||||
/*qemudDebug ("qemudDispatchClientRead: mode = %d", client->mode);*/
|
||||
/* VIR_DEBUG("qemudDispatchClientRead: mode = %d", client->mode);*/
|
||||
|
||||
readmore:
|
||||
if (qemudClientRead(client) < 0)
|
||||
@ -1830,14 +1830,14 @@ readmore:
|
||||
|
||||
if (!xdr_u_int(&x, &len)) {
|
||||
xdr_destroy (&x);
|
||||
DEBUG0("Failed to decode packet length");
|
||||
VIR_DEBUG0("Failed to decode packet length");
|
||||
qemudDispatchClientFailure(client);
|
||||
return;
|
||||
}
|
||||
xdr_destroy (&x);
|
||||
|
||||
if (len < REMOTE_MESSAGE_HEADER_XDR_LEN) {
|
||||
DEBUG("Packet length %u too small", len);
|
||||
VIR_DEBUG("Packet length %u too small", len);
|
||||
qemudDispatchClientFailure(client);
|
||||
return;
|
||||
}
|
||||
@ -1846,7 +1846,7 @@ readmore:
|
||||
len -= REMOTE_MESSAGE_HEADER_XDR_LEN;
|
||||
|
||||
if (len > REMOTE_MESSAGE_MAX) {
|
||||
DEBUG("Packet length %u too large", len);
|
||||
VIR_DEBUG("Packet length %u too large", len);
|
||||
qemudDispatchClientFailure(client);
|
||||
return;
|
||||
}
|
||||
@ -2283,10 +2283,10 @@ static void qemudInactiveTimer(int timerid, void *data) {
|
||||
|
||||
if (virStateActive() ||
|
||||
server->clients) {
|
||||
DEBUG0("Timer expired but still active, not shutting down");
|
||||
VIR_DEBUG0("Timer expired but still active, not shutting down");
|
||||
virEventUpdateTimeoutImpl(timerid, -1);
|
||||
} else {
|
||||
DEBUG0("Timer expired and inactive, shutting down");
|
||||
VIR_DEBUG0("Timer expired and inactive, shutting down");
|
||||
server->quitEventThread = 1;
|
||||
}
|
||||
}
|
||||
@ -2357,14 +2357,14 @@ static void *qemudRunLoop(void *opaque) {
|
||||
if (timeout > 0) {
|
||||
if (timerActive) {
|
||||
if (server->clients) {
|
||||
DEBUG("Deactivating shutdown timer %d", timerid);
|
||||
VIR_DEBUG("Deactivating shutdown timer %d", timerid);
|
||||
virEventUpdateTimeoutImpl(timerid, -1);
|
||||
timerActive = 0;
|
||||
}
|
||||
} else {
|
||||
if (!virStateActive() &&
|
||||
!server->clients) {
|
||||
DEBUG("Activating shutdown timer %d", timerid);
|
||||
VIR_DEBUG("Activating shutdown timer %d", timerid);
|
||||
virEventUpdateTimeoutImpl(timerid, timeout * 1000);
|
||||
timerActive = 1;
|
||||
}
|
||||
@ -2374,7 +2374,7 @@ static void *qemudRunLoop(void *opaque) {
|
||||
virMutexUnlock(&server->lock);
|
||||
if (qemudOneLoop() < 0) {
|
||||
virMutexLock(&server->lock);
|
||||
DEBUG0("Loop iteration error, exiting");
|
||||
VIR_DEBUG0("Loop iteration error, exiting");
|
||||
break;
|
||||
}
|
||||
virMutexLock(&server->lock);
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* libvirtd.h: daemon data structure definitions
|
||||
*
|
||||
* Copyright (C) 2006-2010 Red Hat, Inc.
|
||||
* Copyright (C) 2006-2011 Red Hat, Inc.
|
||||
* Copyright (C) 2006 Daniel P. Berrange
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
@ -128,8 +128,6 @@
|
||||
# endif
|
||||
# endif
|
||||
|
||||
# define qemudDebug DEBUG
|
||||
|
||||
/* Whether we're passing reads & writes through a sasl SSF */
|
||||
enum qemud_sasl_ssf {
|
||||
QEMUD_SASL_SSF_NONE = 0,
|
||||
|
@ -42,7 +42,7 @@
|
||||
#include "event.h"
|
||||
#include "memory.h"
|
||||
|
||||
#define AVAHI_DEBUG(fmt, ...) DEBUG(fmt, __VA_ARGS__)
|
||||
#define AVAHI_DEBUG(fmt, ...) VIR_DEBUG(fmt, __VA_ARGS__)
|
||||
|
||||
struct libvirtd_mdns_entry {
|
||||
char *type;
|
||||
|
@ -62,7 +62,7 @@
|
||||
#include "libvirt/libvirt-qemu.h"
|
||||
|
||||
#define VIR_FROM_THIS VIR_FROM_REMOTE
|
||||
#define REMOTE_DEBUG(fmt, ...) DEBUG(fmt, __VA_ARGS__)
|
||||
#define REMOTE_DEBUG(fmt, ...) VIR_DEBUG(fmt, __VA_ARGS__)
|
||||
|
||||
static virDomainPtr get_nonnull_domain (virConnectPtr conn, remote_nonnull_domain domain);
|
||||
static virNetworkPtr get_nonnull_network (virConnectPtr conn, remote_nonnull_network network);
|
||||
|
@ -82,7 +82,7 @@ remoteStreamEvent(virStreamPtr st, int events, void *opaque)
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
DEBUG("st=%p events=%d", st, events);
|
||||
VIR_DEBUG("st=%p events=%d", st, events);
|
||||
|
||||
if (events & VIR_STREAM_EVENT_WRITABLE) {
|
||||
if (remoteStreamHandleWrite(client, stream) < 0) {
|
||||
@ -149,7 +149,7 @@ remoteStreamFilter(struct qemud_client *client,
|
||||
if (msg->hdr.serial == stream->serial &&
|
||||
msg->hdr.proc == stream->procedure &&
|
||||
msg->hdr.type == REMOTE_STREAM) {
|
||||
DEBUG("Incoming rx=%p serial=%d proc=%d status=%d",
|
||||
VIR_DEBUG("Incoming rx=%p serial=%d proc=%d status=%d",
|
||||
stream->rx, msg->hdr.proc, msg->hdr.serial, msg->hdr.status);
|
||||
|
||||
/* If there are queued packets, we need to queue all further
|
||||
@ -207,7 +207,7 @@ remoteCreateClientStream(virConnectPtr conn,
|
||||
{
|
||||
struct qemud_client_stream *stream;
|
||||
|
||||
DEBUG("proc=%d serial=%d", hdr->proc, hdr->serial);
|
||||
VIR_DEBUG("proc=%d serial=%d", hdr->proc, hdr->serial);
|
||||
|
||||
if (VIR_ALLOC(stream) < 0)
|
||||
return NULL;
|
||||
@ -241,7 +241,7 @@ void remoteFreeClientStream(struct qemud_client *client,
|
||||
if (!stream)
|
||||
return;
|
||||
|
||||
DEBUG("proc=%d serial=%d", stream->procedure, stream->serial);
|
||||
VIR_DEBUG("proc=%d serial=%d", stream->procedure, stream->serial);
|
||||
|
||||
msg = stream->rx;
|
||||
while (msg) {
|
||||
@ -265,7 +265,7 @@ int remoteAddClientStream(struct qemud_client *client,
|
||||
{
|
||||
struct qemud_client_stream *tmp = client->streams;
|
||||
|
||||
DEBUG("client=%p proc=%d serial=%d", client, stream->procedure, stream->serial);
|
||||
VIR_DEBUG("client=%p proc=%d serial=%d", client, stream->procedure, stream->serial);
|
||||
|
||||
if (virStreamEventAddCallback(stream->st, 0,
|
||||
remoteStreamEvent, client, NULL) < 0)
|
||||
@ -328,7 +328,7 @@ int
|
||||
remoteRemoveClientStream(struct qemud_client *client,
|
||||
struct qemud_client_stream *stream)
|
||||
{
|
||||
DEBUG("client=%p proc=%d serial=%d", client, stream->procedure, stream->serial);
|
||||
VIR_DEBUG("client=%p proc=%d serial=%d", client, stream->procedure, stream->serial);
|
||||
|
||||
struct qemud_client_stream *curr = client->streams;
|
||||
struct qemud_client_stream *prev = NULL;
|
||||
@ -381,7 +381,7 @@ remoteStreamHandleWriteData(struct qemud_client *client,
|
||||
remote_error rerr;
|
||||
int ret;
|
||||
|
||||
DEBUG("stream=%p proc=%d serial=%d len=%d offset=%d",
|
||||
VIR_DEBUG("stream=%p proc=%d serial=%d len=%d offset=%d",
|
||||
stream, msg->hdr.proc, msg->hdr.serial, msg->bufferLength, msg->bufferOffset);
|
||||
|
||||
memset(&rerr, 0, sizeof rerr);
|
||||
@ -426,7 +426,7 @@ remoteStreamHandleFinish(struct qemud_client *client,
|
||||
remote_error rerr;
|
||||
int ret;
|
||||
|
||||
DEBUG("stream=%p proc=%d serial=%d",
|
||||
VIR_DEBUG("stream=%p proc=%d serial=%d",
|
||||
stream, msg->hdr.proc, msg->hdr.serial);
|
||||
|
||||
memset(&rerr, 0, sizeof rerr);
|
||||
@ -460,7 +460,7 @@ remoteStreamHandleAbort(struct qemud_client *client,
|
||||
{
|
||||
remote_error rerr;
|
||||
|
||||
DEBUG("stream=%p proc=%d serial=%d",
|
||||
VIR_DEBUG("stream=%p proc=%d serial=%d",
|
||||
stream, msg->hdr.proc, msg->hdr.serial);
|
||||
|
||||
memset(&rerr, 0, sizeof rerr);
|
||||
@ -495,7 +495,7 @@ remoteStreamHandleWrite(struct qemud_client *client,
|
||||
{
|
||||
struct qemud_client_message *msg, *tmp;
|
||||
|
||||
DEBUG("stream=%p", stream);
|
||||
VIR_DEBUG("stream=%p", stream);
|
||||
|
||||
msg = stream->rx;
|
||||
while (msg && !stream->closed) {
|
||||
@ -550,7 +550,7 @@ remoteStreamHandleRead(struct qemud_client *client,
|
||||
size_t bufferLen = REMOTE_MESSAGE_PAYLOAD_MAX;
|
||||
int ret;
|
||||
|
||||
DEBUG("stream=%p", stream);
|
||||
VIR_DEBUG("stream=%p", stream);
|
||||
|
||||
/* Shouldn't ever be called unless we're marked able to
|
||||
* transmit, but doesn't hurt to check */
|
||||
@ -603,7 +603,7 @@ remoteStreamMessageFinished(struct qemud_client *client,
|
||||
stream = stream->next;
|
||||
}
|
||||
|
||||
DEBUG("Message client=%p stream=%p proc=%d serial=%d", client, stream, msg->hdr.proc, msg->hdr.serial);
|
||||
VIR_DEBUG("Message client=%p stream=%p proc=%d serial=%d", client, stream, msg->hdr.proc, msg->hdr.serial);
|
||||
|
||||
if (stream) {
|
||||
stream->tx = 1;
|
||||
|
@ -62,7 +62,7 @@ index 629d97b..1b39210 100644
|
||||
+ unsigned int flags)
|
||||
+{
|
||||
+ virConnectPtr conn;
|
||||
+ DEBUG("domain=%p, nvcpus=%u, flags=%u", domain, nvcpus, flags);
|
||||
+ VIR_DEBUG("domain=%p, nvcpus=%u, flags=%u", domain, nvcpus, flags);
|
||||
+
|
||||
+ virResetLastError();
|
||||
+
|
||||
@ -125,7 +125,7 @@ index 629d97b..1b39210 100644
|
||||
+virDomainGetVcpusFlags(virDomainPtr domain, unsigned int flags)
|
||||
+{
|
||||
+ virConnectPtr conn;
|
||||
+ DEBUG("domain=%p, flags=%u", domain, flags);
|
||||
+ VIR_DEBUG("domain=%p, flags=%u", domain, flags);
|
||||
+
|
||||
+ virResetLastError();
|
||||
+
|
||||
|
@ -10,9 +10,9 @@
|
||||
# include <sys/poll.h>
|
||||
# include <libvirt/libvirt.h>
|
||||
|
||||
# define DEBUG0(fmt) printf("%s:%d :: " fmt "\n", \
|
||||
# define VIR_DEBUG0(fmt) printf("%s:%d :: " fmt "\n", \
|
||||
__func__, __LINE__)
|
||||
# define DEBUG(fmt, ...) printf("%s:%d: " fmt "\n", \
|
||||
# define VIR_DEBUG(fmt, ...) printf("%s:%d: " fmt "\n", \
|
||||
__func__, __LINE__, __VA_ARGS__)
|
||||
# define STREQ(a,b) (strcmp(a,b) == 0)
|
||||
|
||||
@ -300,7 +300,7 @@ int myEventAddHandleFunc(int fd, int event,
|
||||
void *opaque,
|
||||
virFreeCallback ff)
|
||||
{
|
||||
DEBUG("Add handle %d %d %p %p", fd, event, cb, opaque);
|
||||
VIR_DEBUG("Add handle %d %d %p %p", fd, event, cb, opaque);
|
||||
h_fd = fd;
|
||||
h_event = myEventHandleTypeToPollEvent(event);
|
||||
h_cb = cb;
|
||||
@ -311,14 +311,14 @@ int myEventAddHandleFunc(int fd, int event,
|
||||
|
||||
void myEventUpdateHandleFunc(int fd, int event)
|
||||
{
|
||||
DEBUG("Updated Handle %d %d", fd, event);
|
||||
VIR_DEBUG("Updated Handle %d %d", fd, event);
|
||||
h_event = myEventHandleTypeToPollEvent(event);
|
||||
return;
|
||||
}
|
||||
|
||||
int myEventRemoveHandleFunc(int fd)
|
||||
{
|
||||
DEBUG("Removed Handle %d", fd);
|
||||
VIR_DEBUG("Removed Handle %d", fd);
|
||||
h_fd = 0;
|
||||
if (h_ff)
|
||||
(h_ff)(h_opaque);
|
||||
@ -330,7 +330,7 @@ int myEventAddTimeoutFunc(int timeout,
|
||||
void *opaque,
|
||||
virFreeCallback ff)
|
||||
{
|
||||
DEBUG("Adding Timeout %d %p %p", timeout, cb, opaque);
|
||||
VIR_DEBUG("Adding Timeout %d %p %p", timeout, cb, opaque);
|
||||
t_active = 1;
|
||||
t_timeout = timeout;
|
||||
t_cb = cb;
|
||||
@ -341,13 +341,13 @@ int myEventAddTimeoutFunc(int timeout,
|
||||
|
||||
void myEventUpdateTimeoutFunc(int timer ATTRIBUTE_UNUSED, int timeout)
|
||||
{
|
||||
/*DEBUG("Timeout updated %d %d", timer, timeout);*/
|
||||
/*VIR_DEBUG("Timeout updated %d %d", timer, timeout);*/
|
||||
t_timeout = timeout;
|
||||
}
|
||||
|
||||
int myEventRemoveTimeoutFunc(int timer)
|
||||
{
|
||||
DEBUG("Timeout removed %d", timer);
|
||||
VIR_DEBUG("Timeout removed %d", timer);
|
||||
t_active = 0;
|
||||
if (t_ff)
|
||||
(t_ff)(t_opaque);
|
||||
@ -408,7 +408,7 @@ int main(int argc, char **argv)
|
||||
sigaction(SIGTERM, &action_stop, NULL);
|
||||
sigaction(SIGINT, &action_stop, NULL);
|
||||
|
||||
DEBUG0("Registering domain event cbs");
|
||||
VIR_DEBUG0("Registering domain event cbs");
|
||||
|
||||
/* Add 2 callbacks to prove this works with more than just one */
|
||||
callback1ret = virConnectDomainEventRegister(dconn, myDomainEventCallback1,
|
||||
@ -464,15 +464,15 @@ int main(int argc, char **argv)
|
||||
}
|
||||
|
||||
if (sts == 0) {
|
||||
/* DEBUG0("Poll timeout"); */
|
||||
/* VIR_DEBUG0("Poll timeout"); */
|
||||
continue;
|
||||
}
|
||||
if (sts < 0 ) {
|
||||
DEBUG0("Poll failed");
|
||||
VIR_DEBUG0("Poll failed");
|
||||
continue;
|
||||
}
|
||||
if ( pfd.revents & POLLHUP ) {
|
||||
DEBUG0("Reset by peer");
|
||||
VIR_DEBUG0("Reset by peer");
|
||||
return -1;
|
||||
}
|
||||
|
||||
@ -485,7 +485,7 @@ int main(int argc, char **argv)
|
||||
|
||||
}
|
||||
|
||||
DEBUG0("Deregistering event handlers");
|
||||
VIR_DEBUG0("Deregistering event handlers");
|
||||
virConnectDomainEventDeregister(dconn, myDomainEventCallback1);
|
||||
virConnectDomainEventDeregisterAny(dconn, callback2ret);
|
||||
virConnectDomainEventDeregisterAny(dconn, callback3ret);
|
||||
@ -495,7 +495,7 @@ int main(int argc, char **argv)
|
||||
virConnectDomainEventDeregisterAny(dconn, callback7ret);
|
||||
}
|
||||
|
||||
DEBUG0("Closing connection");
|
||||
VIR_DEBUG0("Closing connection");
|
||||
if( dconn && virConnectClose(dconn)<0 ) {
|
||||
printf("error closing\n");
|
||||
}
|
||||
|
@ -91,7 +91,7 @@ failed:
|
||||
*/
|
||||
static void
|
||||
virReleaseConnect(virConnectPtr conn) {
|
||||
DEBUG("release connection %p", conn);
|
||||
VIR_DEBUG("release connection %p", conn);
|
||||
|
||||
/* make sure to release the connection lock before we call the
|
||||
* close callbacks, otherwise we will deadlock if an error
|
||||
@ -142,7 +142,7 @@ virUnrefConnect(virConnectPtr conn) {
|
||||
return -1;
|
||||
}
|
||||
virMutexLock(&conn->lock);
|
||||
DEBUG("unref connection %p %d", conn, conn->refs);
|
||||
VIR_DEBUG("unref connection %p %d", conn, conn->refs);
|
||||
conn->refs--;
|
||||
refs = conn->refs;
|
||||
if (refs == 0) {
|
||||
@ -235,7 +235,7 @@ virReleaseDomain(virDomainPtr domain) {
|
||||
char uuidstr[VIR_UUID_STRING_BUFLEN];
|
||||
|
||||
virUUIDFormat(domain->uuid, uuidstr);
|
||||
DEBUG("release domain %p %s %s", domain, domain->name, uuidstr);
|
||||
VIR_DEBUG("release domain %p %s %s", domain, domain->name, uuidstr);
|
||||
|
||||
domain->magic = -1;
|
||||
domain->id = -1;
|
||||
@ -243,7 +243,7 @@ virReleaseDomain(virDomainPtr domain) {
|
||||
VIR_FREE(domain);
|
||||
|
||||
if (conn) {
|
||||
DEBUG("unref connection %p %d", conn, conn->refs);
|
||||
VIR_DEBUG("unref connection %p %d", conn, conn->refs);
|
||||
conn->refs--;
|
||||
if (conn->refs == 0) {
|
||||
virReleaseConnect(conn);
|
||||
@ -273,7 +273,7 @@ virUnrefDomain(virDomainPtr domain) {
|
||||
return -1;
|
||||
}
|
||||
virMutexLock(&domain->conn->lock);
|
||||
DEBUG("unref domain %p %s %d", domain, domain->name, domain->refs);
|
||||
VIR_DEBUG("unref domain %p %s %d", domain, domain->name, domain->refs);
|
||||
domain->refs--;
|
||||
refs = domain->refs;
|
||||
if (refs == 0) {
|
||||
@ -366,14 +366,14 @@ virReleaseNetwork(virNetworkPtr network) {
|
||||
char uuidstr[VIR_UUID_STRING_BUFLEN];
|
||||
|
||||
virUUIDFormat(network->uuid, uuidstr);
|
||||
DEBUG("release network %p %s %s", network, network->name, uuidstr);
|
||||
VIR_DEBUG("release network %p %s %s", network, network->name, uuidstr);
|
||||
|
||||
network->magic = -1;
|
||||
VIR_FREE(network->name);
|
||||
VIR_FREE(network);
|
||||
|
||||
if (conn) {
|
||||
DEBUG("unref connection %p %d", conn, conn->refs);
|
||||
VIR_DEBUG("unref connection %p %d", conn, conn->refs);
|
||||
conn->refs--;
|
||||
if (conn->refs == 0) {
|
||||
virReleaseConnect(conn);
|
||||
@ -404,7 +404,7 @@ virUnrefNetwork(virNetworkPtr network) {
|
||||
return -1;
|
||||
}
|
||||
virMutexLock(&network->conn->lock);
|
||||
DEBUG("unref network %p %s %d", network, network->name, network->refs);
|
||||
VIR_DEBUG("unref network %p %s %d", network, network->name, network->refs);
|
||||
network->refs--;
|
||||
refs = network->refs;
|
||||
if (refs == 0) {
|
||||
@ -501,7 +501,7 @@ virGetInterface(virConnectPtr conn, const char *name, const char *mac) {
|
||||
static void
|
||||
virReleaseInterface(virInterfacePtr iface) {
|
||||
virConnectPtr conn = iface->conn;
|
||||
DEBUG("release interface %p %s", iface, iface->name);
|
||||
VIR_DEBUG("release interface %p %s", iface, iface->name);
|
||||
|
||||
iface->magic = -1;
|
||||
VIR_FREE(iface->name);
|
||||
@ -509,7 +509,7 @@ virReleaseInterface(virInterfacePtr iface) {
|
||||
VIR_FREE(iface);
|
||||
|
||||
if (conn) {
|
||||
DEBUG("unref connection %p %d", conn, conn->refs);
|
||||
VIR_DEBUG("unref connection %p %d", conn, conn->refs);
|
||||
conn->refs--;
|
||||
if (conn->refs == 0) {
|
||||
virReleaseConnect(conn);
|
||||
@ -540,7 +540,7 @@ virUnrefInterface(virInterfacePtr iface) {
|
||||
return -1;
|
||||
}
|
||||
virMutexLock(&iface->conn->lock);
|
||||
DEBUG("unref interface %p %s %d", iface, iface->name, iface->refs);
|
||||
VIR_DEBUG("unref interface %p %s %d", iface, iface->name, iface->refs);
|
||||
iface->refs--;
|
||||
refs = iface->refs;
|
||||
if (refs == 0) {
|
||||
@ -636,14 +636,14 @@ virReleaseStoragePool(virStoragePoolPtr pool) {
|
||||
char uuidstr[VIR_UUID_STRING_BUFLEN];
|
||||
|
||||
virUUIDFormat(pool->uuid, uuidstr);
|
||||
DEBUG("release pool %p %s %s", pool, pool->name, uuidstr);
|
||||
VIR_DEBUG("release pool %p %s %s", pool, pool->name, uuidstr);
|
||||
|
||||
pool->magic = -1;
|
||||
VIR_FREE(pool->name);
|
||||
VIR_FREE(pool);
|
||||
|
||||
if (conn) {
|
||||
DEBUG("unref connection %p %d", conn, conn->refs);
|
||||
VIR_DEBUG("unref connection %p %d", conn, conn->refs);
|
||||
conn->refs--;
|
||||
if (conn->refs == 0) {
|
||||
virReleaseConnect(conn);
|
||||
@ -674,7 +674,7 @@ virUnrefStoragePool(virStoragePoolPtr pool) {
|
||||
return -1;
|
||||
}
|
||||
virMutexLock(&pool->conn->lock);
|
||||
DEBUG("unref pool %p %s %d", pool, pool->name, pool->refs);
|
||||
VIR_DEBUG("unref pool %p %s %d", pool, pool->name, pool->refs);
|
||||
pool->refs--;
|
||||
refs = pool->refs;
|
||||
if (refs == 0) {
|
||||
@ -777,7 +777,7 @@ error:
|
||||
static void
|
||||
virReleaseStorageVol(virStorageVolPtr vol) {
|
||||
virConnectPtr conn = vol->conn;
|
||||
DEBUG("release vol %p %s", vol, vol->name);
|
||||
VIR_DEBUG("release vol %p %s", vol, vol->name);
|
||||
|
||||
vol->magic = -1;
|
||||
VIR_FREE(vol->name);
|
||||
@ -785,7 +785,7 @@ virReleaseStorageVol(virStorageVolPtr vol) {
|
||||
VIR_FREE(vol);
|
||||
|
||||
if (conn) {
|
||||
DEBUG("unref connection %p %d", conn, conn->refs);
|
||||
VIR_DEBUG("unref connection %p %d", conn, conn->refs);
|
||||
conn->refs--;
|
||||
if (conn->refs == 0) {
|
||||
virReleaseConnect(conn);
|
||||
@ -816,7 +816,7 @@ virUnrefStorageVol(virStorageVolPtr vol) {
|
||||
return -1;
|
||||
}
|
||||
virMutexLock(&vol->conn->lock);
|
||||
DEBUG("unref vol %p %s %d", vol, vol->name, vol->refs);
|
||||
VIR_DEBUG("unref vol %p %s %d", vol, vol->name, vol->refs);
|
||||
vol->refs--;
|
||||
refs = vol->refs;
|
||||
if (refs == 0) {
|
||||
@ -900,7 +900,7 @@ error:
|
||||
static void
|
||||
virReleaseNodeDevice(virNodeDevicePtr dev) {
|
||||
virConnectPtr conn = dev->conn;
|
||||
DEBUG("release dev %p %s", dev, dev->name);
|
||||
VIR_DEBUG("release dev %p %s", dev, dev->name);
|
||||
|
||||
dev->magic = -1;
|
||||
VIR_FREE(dev->name);
|
||||
@ -908,7 +908,7 @@ virReleaseNodeDevice(virNodeDevicePtr dev) {
|
||||
VIR_FREE(dev);
|
||||
|
||||
if (conn) {
|
||||
DEBUG("unref connection %p %d", conn, conn->refs);
|
||||
VIR_DEBUG("unref connection %p %d", conn, conn->refs);
|
||||
conn->refs--;
|
||||
if (conn->refs == 0) {
|
||||
virReleaseConnect(conn);
|
||||
@ -934,7 +934,7 @@ virUnrefNodeDevice(virNodeDevicePtr dev) {
|
||||
int refs;
|
||||
|
||||
virMutexLock(&dev->conn->lock);
|
||||
DEBUG("unref dev %p %s %d", dev, dev->name, dev->refs);
|
||||
VIR_DEBUG("unref dev %p %s %d", dev, dev->name, dev->refs);
|
||||
dev->refs--;
|
||||
refs = dev->refs;
|
||||
if (refs == 0) {
|
||||
@ -1027,14 +1027,14 @@ virReleaseSecret(virSecretPtr secret) {
|
||||
char uuidstr[VIR_UUID_STRING_BUFLEN];
|
||||
|
||||
virUUIDFormat(secret->uuid, uuidstr);
|
||||
DEBUG("release secret %p %s", secret, uuidstr);
|
||||
VIR_DEBUG("release secret %p %s", secret, uuidstr);
|
||||
|
||||
VIR_FREE(secret->usageID);
|
||||
secret->magic = -1;
|
||||
VIR_FREE(secret);
|
||||
|
||||
if (conn) {
|
||||
DEBUG("unref connection %p %d", conn, conn->refs);
|
||||
VIR_DEBUG("unref connection %p %d", conn, conn->refs);
|
||||
conn->refs--;
|
||||
if (conn->refs == 0) {
|
||||
virReleaseConnect(conn);
|
||||
@ -1063,7 +1063,7 @@ virUnrefSecret(virSecretPtr secret) {
|
||||
return -1;
|
||||
}
|
||||
virMutexLock(&secret->conn->lock);
|
||||
DEBUG("unref secret %p %p %d", secret, secret->uuid, secret->refs);
|
||||
VIR_DEBUG("unref secret %p %p %d", secret, secret->uuid, secret->refs);
|
||||
secret->refs--;
|
||||
refs = secret->refs;
|
||||
if (refs == 0) {
|
||||
@ -1101,12 +1101,12 @@ error:
|
||||
static void
|
||||
virReleaseStream(virStreamPtr st) {
|
||||
virConnectPtr conn = st->conn;
|
||||
DEBUG("release dev %p", st);
|
||||
VIR_DEBUG("release dev %p", st);
|
||||
|
||||
st->magic = -1;
|
||||
VIR_FREE(st);
|
||||
|
||||
DEBUG("unref connection %p %d", conn, conn->refs);
|
||||
VIR_DEBUG("unref connection %p %d", conn, conn->refs);
|
||||
conn->refs--;
|
||||
if (conn->refs == 0) {
|
||||
virReleaseConnect(conn);
|
||||
@ -1121,7 +1121,7 @@ int virUnrefStream(virStreamPtr st) {
|
||||
int refs;
|
||||
|
||||
virMutexLock(&st->conn->lock);
|
||||
DEBUG("unref stream %p %d", st, st->refs);
|
||||
VIR_DEBUG("unref stream %p %d", st, st->refs);
|
||||
st->refs--;
|
||||
refs = st->refs;
|
||||
if (refs == 0) {
|
||||
@ -1217,14 +1217,14 @@ virReleaseNWFilter(virNWFilterPtr nwfilter)
|
||||
char uuidstr[VIR_UUID_STRING_BUFLEN];
|
||||
|
||||
virUUIDFormat(nwfilter->uuid, uuidstr);
|
||||
DEBUG("release nwfilter %p %s %s", nwfilter, nwfilter->name, uuidstr);
|
||||
VIR_DEBUG("release nwfilter %p %s %s", nwfilter, nwfilter->name, uuidstr);
|
||||
|
||||
nwfilter->magic = -1;
|
||||
VIR_FREE(nwfilter->name);
|
||||
VIR_FREE(nwfilter);
|
||||
|
||||
if (conn) {
|
||||
DEBUG("unref connection %p %d", conn, conn->refs);
|
||||
VIR_DEBUG("unref connection %p %d", conn, conn->refs);
|
||||
conn->refs--;
|
||||
if (conn->refs == 0) {
|
||||
virReleaseConnect(conn);
|
||||
@ -1256,7 +1256,8 @@ virUnrefNWFilter(virNWFilterPtr nwfilter)
|
||||
return -1;
|
||||
}
|
||||
virMutexLock(&nwfilter->conn->lock);
|
||||
DEBUG("unref nwfilter %p %s %d", nwfilter, nwfilter->name, nwfilter->refs);
|
||||
VIR_DEBUG("unref nwfilter %p %s %d", nwfilter, nwfilter->name,
|
||||
nwfilter->refs);
|
||||
nwfilter->refs--;
|
||||
refs = nwfilter->refs;
|
||||
if (refs == 0) {
|
||||
@ -1317,14 +1318,14 @@ static void
|
||||
virReleaseDomainSnapshot(virDomainSnapshotPtr snapshot)
|
||||
{
|
||||
virDomainPtr domain = snapshot->domain;
|
||||
DEBUG("release snapshot %p %s", snapshot, snapshot->name);
|
||||
VIR_DEBUG("release snapshot %p %s", snapshot, snapshot->name);
|
||||
|
||||
snapshot->magic = -1;
|
||||
VIR_FREE(snapshot->name);
|
||||
VIR_FREE(snapshot);
|
||||
|
||||
if (domain) {
|
||||
DEBUG("unref domain %p %d", domain, domain->refs);
|
||||
VIR_DEBUG("unref domain %p %d", domain, domain->refs);
|
||||
domain->refs--;
|
||||
if (domain->refs == 0) {
|
||||
virReleaseDomain(domain);
|
||||
@ -1346,7 +1347,7 @@ virUnrefDomainSnapshot(virDomainSnapshotPtr snapshot)
|
||||
}
|
||||
|
||||
virMutexLock(&snapshot->domain->conn->lock);
|
||||
DEBUG("unref snapshot %p %s %d", snapshot, snapshot->name, snapshot->refs);
|
||||
VIR_DEBUG("unref snapshot %p %s %d", snapshot, snapshot->name, snapshot->refs);
|
||||
snapshot->refs--;
|
||||
refs = snapshot->refs;
|
||||
if (refs == 0) {
|
||||
|
@ -53,7 +53,7 @@ virDriverLoadModule(const char *name)
|
||||
if (moddir == NULL)
|
||||
moddir = DEFAULT_DRIVER_DIR;
|
||||
|
||||
DEBUG("Module load %s", name);
|
||||
VIR_DEBUG("Module load %s", name);
|
||||
|
||||
if (virAsprintf(&modfile, "%s/libvirt_driver_%s.so", moddir, name) < 0)
|
||||
return NULL;
|
||||
|
@ -42,7 +42,7 @@ virDomainQemuMonitorCommand(virDomainPtr domain, const char *cmd,
|
||||
{
|
||||
virConnectPtr conn;
|
||||
|
||||
DEBUG("domain=%p, cmd=%s, result=%p, flags=%u", domain, cmd, result, flags);
|
||||
VIR_DEBUG("domain=%p, cmd=%s, result=%p, flags=%u", domain, cmd, result, flags);
|
||||
|
||||
virResetLastError();
|
||||
|
||||
|
398
src/libvirt.c
398
src/libvirt.c
File diff suppressed because it is too large
Load Diff
@ -227,7 +227,7 @@ static int lxcContainerWaitForContinue(int control)
|
||||
}
|
||||
VIR_FORCE_CLOSE(control);
|
||||
|
||||
DEBUG0("Received container continue message");
|
||||
VIR_DEBUG0("Received container continue message");
|
||||
|
||||
return 0;
|
||||
}
|
||||
@ -258,12 +258,12 @@ static int lxcContainerRenameAndEnableInterfaces(unsigned int nveths,
|
||||
goto error_out;
|
||||
}
|
||||
|
||||
DEBUG("Renaming %s to %s", veths[i], newname);
|
||||
VIR_DEBUG("Renaming %s to %s", veths[i], newname);
|
||||
rc = setInterfaceName(veths[i], newname);
|
||||
if (rc < 0)
|
||||
goto error_out;
|
||||
|
||||
DEBUG("Enabling %s", newname);
|
||||
VIR_DEBUG("Enabling %s", newname);
|
||||
rc = vethInterfaceUpOrDown(newname, 1);
|
||||
if (rc < 0)
|
||||
goto error_out;
|
||||
@ -854,18 +854,18 @@ int lxcContainerStart(virDomainDefPtr def,
|
||||
flags = CLONE_NEWPID|CLONE_NEWNS|CLONE_NEWUTS|CLONE_NEWIPC|SIGCHLD;
|
||||
|
||||
if (userns_supported()) {
|
||||
DEBUG0("Enable user namespaces");
|
||||
VIR_DEBUG0("Enable user namespaces");
|
||||
flags |= CLONE_NEWUSER;
|
||||
}
|
||||
|
||||
if (def->nets != NULL) {
|
||||
DEBUG0("Enable network namespaces");
|
||||
VIR_DEBUG0("Enable network namespaces");
|
||||
flags |= CLONE_NEWNET;
|
||||
}
|
||||
|
||||
pid = clone(lxcContainerChild, stacktop, flags, &args);
|
||||
VIR_FREE(stack);
|
||||
DEBUG("clone() completed, new container PID is %d", pid);
|
||||
VIR_DEBUG("clone() completed, new container PID is %d", pid);
|
||||
|
||||
if (pid < 0) {
|
||||
virReportSystemError(errno, "%s",
|
||||
@ -897,7 +897,7 @@ int lxcContainerAvailable(int features)
|
||||
flags |= CLONE_NEWNET;
|
||||
|
||||
if (VIR_ALLOC_N(stack, getpagesize() * 4) < 0) {
|
||||
DEBUG0("Unable to allocate stack");
|
||||
VIR_DEBUG0("Unable to allocate stack");
|
||||
return -1;
|
||||
}
|
||||
|
||||
@ -907,7 +907,7 @@ int lxcContainerAvailable(int features)
|
||||
VIR_FREE(stack);
|
||||
if (cpid < 0) {
|
||||
char ebuf[1024];
|
||||
DEBUG("clone call returned %s, container support is not enabled",
|
||||
VIR_DEBUG("clone call returned %s, container support is not enabled",
|
||||
virStrerror(errno, ebuf, sizeof ebuf));
|
||||
return -1;
|
||||
} else {
|
||||
|
@ -446,7 +446,7 @@ static int lxcControllerMain(int monitor,
|
||||
++numActive;
|
||||
}
|
||||
} else if (epollEvent.events & EPOLLHUP) {
|
||||
DEBUG("EPOLLHUP from fd %d", epollEvent.data.fd);
|
||||
VIR_DEBUG("EPOLLHUP from fd %d", epollEvent.data.fd);
|
||||
continue;
|
||||
} else {
|
||||
lxcError(VIR_ERR_INTERNAL_ERROR,
|
||||
|
@ -979,7 +979,7 @@ static int lxcVmCleanup(lxc_driver_t *driver,
|
||||
vm->pid, waitRc);
|
||||
rc = -1;
|
||||
} else if (WIFEXITED(childStatus)) {
|
||||
DEBUG("container exited with rc: %d", WEXITSTATUS(childStatus));
|
||||
VIR_DEBUG("container exited with rc: %d", WEXITSTATUS(childStatus));
|
||||
rc = -1;
|
||||
}
|
||||
|
||||
@ -1086,18 +1086,18 @@ static int lxcSetupInterfaces(virConnectPtr conn,
|
||||
break;
|
||||
}
|
||||
|
||||
DEBUG("bridge: %s", bridge);
|
||||
VIR_DEBUG("bridge: %s", bridge);
|
||||
if (NULL == bridge) {
|
||||
lxcError(VIR_ERR_INTERNAL_ERROR,
|
||||
"%s", _("Failed to get bridge for interface"));
|
||||
goto error_exit;
|
||||
}
|
||||
|
||||
DEBUG0("calling vethCreate()");
|
||||
VIR_DEBUG0("calling vethCreate()");
|
||||
parentVeth = def->nets[i]->ifname;
|
||||
if (vethCreate(&parentVeth, &containerVeth) < 0)
|
||||
goto error_exit;
|
||||
DEBUG("parentVeth: %s, containerVeth: %s", parentVeth, containerVeth);
|
||||
VIR_DEBUG("parentVeth: %s, containerVeth: %s", parentVeth, containerVeth);
|
||||
|
||||
if (NULL == def->nets[i]->ifname) {
|
||||
def->nets[i]->ifname = parentVeth;
|
||||
|
@ -99,13 +99,13 @@ int vethCreate(char** veth1, char** veth2)
|
||||
int vethDev = 0;
|
||||
bool veth1_alloc = false;
|
||||
|
||||
DEBUG("veth1: %s veth2: %s", NULLSTR(*veth1), NULLSTR(*veth2));
|
||||
VIR_DEBUG("veth1: %s veth2: %s", NULLSTR(*veth1), NULLSTR(*veth2));
|
||||
|
||||
if (*veth1 == NULL) {
|
||||
vethDev = getFreeVethName(veth1, vethDev);
|
||||
if (vethDev < 0)
|
||||
return vethDev;
|
||||
DEBUG("Assigned veth1: %s", *veth1);
|
||||
VIR_DEBUG("Assigned veth1: %s", *veth1);
|
||||
veth1_alloc = true;
|
||||
}
|
||||
argv[3] = *veth1;
|
||||
@ -118,11 +118,11 @@ int vethCreate(char** veth1, char** veth2)
|
||||
VIR_FREE(*veth1);
|
||||
return vethDev;
|
||||
}
|
||||
DEBUG("Assigned veth2: %s", *veth2);
|
||||
VIR_DEBUG("Assigned veth2: %s", *veth2);
|
||||
}
|
||||
argv[8] = *veth2;
|
||||
|
||||
DEBUG("veth1: %s veth2: %s", *veth1, *veth2);
|
||||
VIR_DEBUG("veth1: %s veth2: %s", *veth1, *veth2);
|
||||
rc = virRun(argv, &cmdResult);
|
||||
|
||||
if (rc != 0 ||
|
||||
@ -156,7 +156,7 @@ int vethDelete(const char *veth)
|
||||
const char *argv[] = {"ip", "link", "del", veth, NULL};
|
||||
int cmdResult = 0;
|
||||
|
||||
DEBUG("veth: %s", veth);
|
||||
VIR_DEBUG("veth: %s", veth);
|
||||
|
||||
rc = virRun(argv, &cmdResult);
|
||||
|
||||
|
@ -483,7 +483,7 @@ static void dev_create(const char *udi)
|
||||
return;
|
||||
|
||||
failure:
|
||||
DEBUG("FAILED TO ADD dev %s", name);
|
||||
VIR_DEBUG("FAILED TO ADD dev %s", name);
|
||||
cleanup:
|
||||
VIR_FREE(privData);
|
||||
virNodeDeviceDefFree(def);
|
||||
@ -503,7 +503,7 @@ static void dev_refresh(const char *udi)
|
||||
*/
|
||||
virNodeDeviceObjRemove(&driverState->devs, dev);
|
||||
} else
|
||||
DEBUG("no device named %s", name);
|
||||
VIR_DEBUG("no device named %s", name);
|
||||
nodeDeviceUnlock(driverState);
|
||||
|
||||
if (dev) {
|
||||
@ -514,7 +514,7 @@ static void dev_refresh(const char *udi)
|
||||
static void device_added(LibHalContext *ctx ATTRIBUTE_UNUSED,
|
||||
const char *udi)
|
||||
{
|
||||
DEBUG0(hal_name(udi));
|
||||
VIR_DEBUG0(hal_name(udi));
|
||||
dev_create(udi);
|
||||
}
|
||||
|
||||
@ -527,11 +527,11 @@ static void device_removed(LibHalContext *ctx ATTRIBUTE_UNUSED,
|
||||
|
||||
nodeDeviceLock(driverState);
|
||||
dev = virNodeDeviceFindByName(&driverState->devs,name);
|
||||
DEBUG0(name);
|
||||
VIR_DEBUG0(name);
|
||||
if (dev)
|
||||
virNodeDeviceObjRemove(&driverState->devs, dev);
|
||||
else
|
||||
DEBUG("no device named %s", name);
|
||||
VIR_DEBUG("no device named %s", name);
|
||||
nodeDeviceUnlock(driverState);
|
||||
}
|
||||
|
||||
@ -545,12 +545,12 @@ static void device_cap_added(LibHalContext *ctx,
|
||||
nodeDeviceLock(driverState);
|
||||
dev = virNodeDeviceFindByName(&driverState->devs,name);
|
||||
nodeDeviceUnlock(driverState);
|
||||
DEBUG("%s %s", cap, name);
|
||||
VIR_DEBUG("%s %s", cap, name);
|
||||
if (dev) {
|
||||
(void)gather_capability(ctx, udi, cap, &dev->def->caps);
|
||||
virNodeDeviceObjUnlock(dev);
|
||||
} else {
|
||||
DEBUG("no device named %s", name);
|
||||
VIR_DEBUG("no device named %s", name);
|
||||
}
|
||||
}
|
||||
|
||||
@ -560,7 +560,7 @@ static void device_cap_lost(LibHalContext *ctx ATTRIBUTE_UNUSED,
|
||||
const char *cap)
|
||||
{
|
||||
const char *name = hal_name(udi);
|
||||
DEBUG("%s %s", cap, name);
|
||||
VIR_DEBUG("%s %s", cap, name);
|
||||
|
||||
dev_refresh(udi);
|
||||
}
|
||||
@ -573,7 +573,7 @@ static void device_prop_modified(LibHalContext *ctx ATTRIBUTE_UNUSED,
|
||||
dbus_bool_t is_added ATTRIBUTE_UNUSED)
|
||||
{
|
||||
const char *name = hal_name(udi);
|
||||
DEBUG("%s %s", name, key);
|
||||
VIR_DEBUG("%s %s", name, key);
|
||||
|
||||
dev_refresh(udi);
|
||||
}
|
||||
|
@ -903,7 +903,7 @@ int qemuMonitorEmitGraphics(qemuMonitorPtr mon,
|
||||
int qemuMonitorSetCapabilities(qemuMonitorPtr mon)
|
||||
{
|
||||
int ret;
|
||||
DEBUG("mon=%p", mon);
|
||||
VIR_DEBUG("mon=%p", mon);
|
||||
|
||||
if (!mon) {
|
||||
qemuReportError(VIR_ERR_INVALID_ARG, "%s",
|
||||
@ -924,7 +924,7 @@ qemuMonitorStartCPUs(qemuMonitorPtr mon,
|
||||
virConnectPtr conn)
|
||||
{
|
||||
int ret;
|
||||
DEBUG("mon=%p", mon);
|
||||
VIR_DEBUG("mon=%p", mon);
|
||||
|
||||
if (!mon) {
|
||||
qemuReportError(VIR_ERR_INVALID_ARG, "%s",
|
||||
@ -944,7 +944,7 @@ int
|
||||
qemuMonitorStopCPUs(qemuMonitorPtr mon)
|
||||
{
|
||||
int ret;
|
||||
DEBUG("mon=%p", mon);
|
||||
VIR_DEBUG("mon=%p", mon);
|
||||
|
||||
if (!mon) {
|
||||
qemuReportError(VIR_ERR_INVALID_ARG, "%s",
|
||||
@ -963,7 +963,7 @@ qemuMonitorStopCPUs(qemuMonitorPtr mon)
|
||||
int qemuMonitorSystemPowerdown(qemuMonitorPtr mon)
|
||||
{
|
||||
int ret;
|
||||
DEBUG("mon=%p", mon);
|
||||
VIR_DEBUG("mon=%p", mon);
|
||||
|
||||
if (!mon) {
|
||||
qemuReportError(VIR_ERR_INVALID_ARG, "%s",
|
||||
@ -983,7 +983,7 @@ int qemuMonitorGetCPUInfo(qemuMonitorPtr mon,
|
||||
int **pids)
|
||||
{
|
||||
int ret;
|
||||
DEBUG("mon=%p", mon);
|
||||
VIR_DEBUG("mon=%p", mon);
|
||||
|
||||
if (!mon) {
|
||||
qemuReportError(VIR_ERR_INVALID_ARG, "%s",
|
||||
@ -1002,7 +1002,7 @@ int qemuMonitorGetBalloonInfo(qemuMonitorPtr mon,
|
||||
unsigned long *currmem)
|
||||
{
|
||||
int ret;
|
||||
DEBUG("mon=%p", mon);
|
||||
VIR_DEBUG("mon=%p", mon);
|
||||
|
||||
if (!mon) {
|
||||
qemuReportError(VIR_ERR_INVALID_ARG, "%s",
|
||||
@ -1023,7 +1023,7 @@ int qemuMonitorGetMemoryStats(qemuMonitorPtr mon,
|
||||
unsigned int nr_stats)
|
||||
{
|
||||
int ret;
|
||||
DEBUG("mon=%p stats=%p nstats=%u", mon, stats, nr_stats);
|
||||
VIR_DEBUG("mon=%p stats=%p nstats=%u", mon, stats, nr_stats);
|
||||
|
||||
if (!mon) {
|
||||
qemuReportError(VIR_ERR_INVALID_ARG, "%s",
|
||||
@ -1048,7 +1048,7 @@ int qemuMonitorGetBlockStatsInfo(qemuMonitorPtr mon,
|
||||
long long *errs)
|
||||
{
|
||||
int ret;
|
||||
DEBUG("mon=%p dev=%s", mon, devname);
|
||||
VIR_DEBUG("mon=%p dev=%s", mon, devname);
|
||||
|
||||
if (!mon) {
|
||||
qemuReportError(VIR_ERR_INVALID_ARG, "%s",
|
||||
@ -1074,7 +1074,7 @@ int qemuMonitorGetBlockExtent(qemuMonitorPtr mon,
|
||||
unsigned long long *extent)
|
||||
{
|
||||
int ret;
|
||||
DEBUG("mon=%p, fd=%d, devname=%p",
|
||||
VIR_DEBUG("mon=%p, fd=%d, devname=%p",
|
||||
mon, mon->fd, devname);
|
||||
|
||||
if (mon->json)
|
||||
@ -1090,7 +1090,7 @@ int qemuMonitorSetVNCPassword(qemuMonitorPtr mon,
|
||||
const char *password)
|
||||
{
|
||||
int ret;
|
||||
DEBUG("mon=%p, password=%p",
|
||||
VIR_DEBUG("mon=%p, password=%p",
|
||||
mon, password);
|
||||
|
||||
if (!mon) {
|
||||
@ -1136,7 +1136,7 @@ int qemuMonitorSetPassword(qemuMonitorPtr mon,
|
||||
if (!protocol)
|
||||
return -1;
|
||||
|
||||
DEBUG("mon=%p, protocol=%s, password=%p, action_if_connected=%s",
|
||||
VIR_DEBUG("mon=%p, protocol=%s, password=%p, action_if_connected=%s",
|
||||
mon, protocol, password, action_if_connected);
|
||||
|
||||
if (!mon) {
|
||||
@ -1168,7 +1168,7 @@ int qemuMonitorExpirePassword(qemuMonitorPtr mon,
|
||||
if (!protocol)
|
||||
return -1;
|
||||
|
||||
DEBUG("mon=%p, protocol=%s, expire_time=%s",
|
||||
VIR_DEBUG("mon=%p, protocol=%s, expire_time=%s",
|
||||
mon, protocol, expire_time);
|
||||
|
||||
if (!mon) {
|
||||
@ -1191,7 +1191,7 @@ int qemuMonitorSetBalloon(qemuMonitorPtr mon,
|
||||
unsigned long newmem)
|
||||
{
|
||||
int ret;
|
||||
DEBUG("mon=%p newmem=%lu", mon, newmem);
|
||||
VIR_DEBUG("mon=%p newmem=%lu", mon, newmem);
|
||||
|
||||
if (!mon) {
|
||||
qemuReportError(VIR_ERR_INVALID_ARG, "%s",
|
||||
@ -1210,7 +1210,7 @@ int qemuMonitorSetBalloon(qemuMonitorPtr mon,
|
||||
int qemuMonitorSetCPU(qemuMonitorPtr mon, int cpu, int online)
|
||||
{
|
||||
int ret;
|
||||
DEBUG("mon=%p cpu=%d online=%d", mon, cpu, online);
|
||||
VIR_DEBUG("mon=%p cpu=%d online=%d", mon, cpu, online);
|
||||
|
||||
if (!mon) {
|
||||
qemuReportError(VIR_ERR_INVALID_ARG, "%s",
|
||||
@ -1231,7 +1231,7 @@ int qemuMonitorEjectMedia(qemuMonitorPtr mon,
|
||||
bool force)
|
||||
{
|
||||
int ret;
|
||||
DEBUG("mon=%p devname=%s force=%d", mon, devname, force);
|
||||
VIR_DEBUG("mon=%p devname=%s force=%d", mon, devname, force);
|
||||
|
||||
if (!mon) {
|
||||
qemuReportError(VIR_ERR_INVALID_ARG, "%s",
|
||||
@ -1253,7 +1253,7 @@ int qemuMonitorChangeMedia(qemuMonitorPtr mon,
|
||||
const char *format)
|
||||
{
|
||||
int ret;
|
||||
DEBUG("mon=%p devname=%s newmedia=%s format=%s",
|
||||
VIR_DEBUG("mon=%p devname=%s newmedia=%s format=%s",
|
||||
mon, devname, newmedia, format);
|
||||
|
||||
if (!mon) {
|
||||
@ -1276,7 +1276,7 @@ int qemuMonitorSaveVirtualMemory(qemuMonitorPtr mon,
|
||||
const char *path)
|
||||
{
|
||||
int ret;
|
||||
DEBUG("mon=%p offset=%llu length=%zu path=%s",
|
||||
VIR_DEBUG("mon=%p offset=%llu length=%zu path=%s",
|
||||
mon, offset, length, path);
|
||||
|
||||
if (!mon) {
|
||||
@ -1298,7 +1298,7 @@ int qemuMonitorSavePhysicalMemory(qemuMonitorPtr mon,
|
||||
const char *path)
|
||||
{
|
||||
int ret;
|
||||
DEBUG("mon=%p offset=%llu length=%zu path=%s",
|
||||
VIR_DEBUG("mon=%p offset=%llu length=%zu path=%s",
|
||||
mon, offset, length, path);
|
||||
|
||||
if (!mon) {
|
||||
@ -1319,7 +1319,7 @@ int qemuMonitorSetMigrationSpeed(qemuMonitorPtr mon,
|
||||
unsigned long bandwidth)
|
||||
{
|
||||
int ret;
|
||||
DEBUG("mon=%p bandwidth=%lu", mon, bandwidth);
|
||||
VIR_DEBUG("mon=%p bandwidth=%lu", mon, bandwidth);
|
||||
|
||||
if (!mon) {
|
||||
qemuReportError(VIR_ERR_INVALID_ARG, "%s",
|
||||
@ -1339,7 +1339,7 @@ int qemuMonitorSetMigrationDowntime(qemuMonitorPtr mon,
|
||||
unsigned long long downtime)
|
||||
{
|
||||
int ret;
|
||||
DEBUG("mon=%p downtime=%llu", mon, downtime);
|
||||
VIR_DEBUG("mon=%p downtime=%llu", mon, downtime);
|
||||
|
||||
if (!mon) {
|
||||
qemuReportError(VIR_ERR_INVALID_ARG, "%s",
|
||||
@ -1362,7 +1362,7 @@ int qemuMonitorGetMigrationStatus(qemuMonitorPtr mon,
|
||||
unsigned long long *total)
|
||||
{
|
||||
int ret;
|
||||
DEBUG("mon=%p", mon);
|
||||
VIR_DEBUG("mon=%p", mon);
|
||||
|
||||
if (!mon) {
|
||||
qemuReportError(VIR_ERR_INVALID_ARG, "%s",
|
||||
@ -1390,7 +1390,7 @@ int qemuMonitorMigrateToHost(qemuMonitorPtr mon,
|
||||
int port)
|
||||
{
|
||||
int ret;
|
||||
DEBUG("mon=%p hostname=%s port=%d flags=%u",
|
||||
VIR_DEBUG("mon=%p hostname=%s port=%d flags=%u",
|
||||
mon, hostname, port, flags);
|
||||
|
||||
if (!mon) {
|
||||
@ -1412,7 +1412,7 @@ int qemuMonitorMigrateToCommand(qemuMonitorPtr mon,
|
||||
const char * const *argv)
|
||||
{
|
||||
int ret;
|
||||
DEBUG("mon=%p argv=%p flags=%u",
|
||||
VIR_DEBUG("mon=%p argv=%p flags=%u",
|
||||
mon, argv, flags);
|
||||
|
||||
if (!mon) {
|
||||
@ -1435,7 +1435,7 @@ int qemuMonitorMigrateToFile(qemuMonitorPtr mon,
|
||||
unsigned long long offset)
|
||||
{
|
||||
int ret;
|
||||
DEBUG("mon=%p argv=%p target=%s offset=%llu flags=%u",
|
||||
VIR_DEBUG("mon=%p argv=%p target=%s offset=%llu flags=%u",
|
||||
mon, argv, target, offset, flags);
|
||||
|
||||
if (!mon) {
|
||||
@ -1463,7 +1463,7 @@ int qemuMonitorMigrateToUnix(qemuMonitorPtr mon,
|
||||
const char *unixfile)
|
||||
{
|
||||
int ret;
|
||||
DEBUG("mon=%p, unixfile=%s flags=%u",
|
||||
VIR_DEBUG("mon=%p, unixfile=%s flags=%u",
|
||||
mon, unixfile, flags);
|
||||
|
||||
if (!mon) {
|
||||
@ -1482,7 +1482,7 @@ int qemuMonitorMigrateToUnix(qemuMonitorPtr mon,
|
||||
int qemuMonitorMigrateCancel(qemuMonitorPtr mon)
|
||||
{
|
||||
int ret;
|
||||
DEBUG("mon=%p", mon);
|
||||
VIR_DEBUG("mon=%p", mon);
|
||||
|
||||
if (!mon) {
|
||||
qemuReportError(VIR_ERR_INVALID_ARG, "%s",
|
||||
@ -1501,7 +1501,7 @@ int qemuMonitorAddUSBDisk(qemuMonitorPtr mon,
|
||||
const char *path)
|
||||
{
|
||||
int ret;
|
||||
DEBUG("mon=%p path=%s", mon, path);
|
||||
VIR_DEBUG("mon=%p path=%s", mon, path);
|
||||
|
||||
if (!mon) {
|
||||
qemuReportError(VIR_ERR_INVALID_ARG, "%s",
|
||||
@ -1522,7 +1522,7 @@ int qemuMonitorAddUSBDeviceExact(qemuMonitorPtr mon,
|
||||
int dev)
|
||||
{
|
||||
int ret;
|
||||
DEBUG("mon=%p bus=%d dev=%d", mon, bus, dev);
|
||||
VIR_DEBUG("mon=%p bus=%d dev=%d", mon, bus, dev);
|
||||
|
||||
if (!mon) {
|
||||
qemuReportError(VIR_ERR_INVALID_ARG, "%s",
|
||||
@ -1542,7 +1542,7 @@ int qemuMonitorAddUSBDeviceMatch(qemuMonitorPtr mon,
|
||||
int product)
|
||||
{
|
||||
int ret;
|
||||
DEBUG("mon=%p vendor=%d product=%d",
|
||||
VIR_DEBUG("mon=%p vendor=%d product=%d",
|
||||
mon, vendor, product);
|
||||
|
||||
if (!mon) {
|
||||
@ -1564,7 +1564,7 @@ int qemuMonitorAddPCIHostDevice(qemuMonitorPtr mon,
|
||||
virDomainDevicePCIAddress *guestAddr)
|
||||
{
|
||||
int ret;
|
||||
DEBUG("mon=%p domain=%d bus=%d slot=%d function=%d",
|
||||
VIR_DEBUG("mon=%p domain=%d bus=%d slot=%d function=%d",
|
||||
mon,
|
||||
hostAddr->domain, hostAddr->bus, hostAddr->slot, hostAddr->function);
|
||||
|
||||
@ -1588,7 +1588,7 @@ int qemuMonitorAddPCIDisk(qemuMonitorPtr mon,
|
||||
virDomainDevicePCIAddress *guestAddr)
|
||||
{
|
||||
int ret;
|
||||
DEBUG("mon=%p path=%s bus=%s",
|
||||
VIR_DEBUG("mon=%p path=%s bus=%s",
|
||||
mon, path, bus);
|
||||
|
||||
if (!mon) {
|
||||
@ -1610,7 +1610,7 @@ int qemuMonitorAddPCINetwork(qemuMonitorPtr mon,
|
||||
virDomainDevicePCIAddress *guestAddr)
|
||||
{
|
||||
int ret;
|
||||
DEBUG("mon=%p nicstr=%s", mon, nicstr);
|
||||
VIR_DEBUG("mon=%p nicstr=%s", mon, nicstr);
|
||||
|
||||
if (!mon) {
|
||||
qemuReportError(VIR_ERR_INVALID_ARG, "%s",
|
||||
@ -1630,7 +1630,7 @@ int qemuMonitorRemovePCIDevice(qemuMonitorPtr mon,
|
||||
virDomainDevicePCIAddress *guestAddr)
|
||||
{
|
||||
int ret;
|
||||
DEBUG("mon=%p domain=%d bus=%d slot=%d function=%d",
|
||||
VIR_DEBUG("mon=%p domain=%d bus=%d slot=%d function=%d",
|
||||
mon, guestAddr->domain, guestAddr->bus,
|
||||
guestAddr->slot, guestAddr->function);
|
||||
|
||||
@ -1653,7 +1653,7 @@ int qemuMonitorSendFileHandle(qemuMonitorPtr mon,
|
||||
int fd)
|
||||
{
|
||||
int ret;
|
||||
DEBUG("mon=%p, fdname=%s fd=%d",
|
||||
VIR_DEBUG("mon=%p, fdname=%s fd=%d",
|
||||
mon, fdname, fd);
|
||||
|
||||
if (!mon) {
|
||||
@ -1674,7 +1674,7 @@ int qemuMonitorCloseFileHandle(qemuMonitorPtr mon,
|
||||
const char *fdname)
|
||||
{
|
||||
int ret;
|
||||
DEBUG("mon=%p fdname=%s",
|
||||
VIR_DEBUG("mon=%p fdname=%s",
|
||||
mon, fdname);
|
||||
|
||||
if (!mon) {
|
||||
@ -1695,7 +1695,7 @@ int qemuMonitorAddHostNetwork(qemuMonitorPtr mon,
|
||||
const char *netstr)
|
||||
{
|
||||
int ret;
|
||||
DEBUG("mon=%p netstr=%s",
|
||||
VIR_DEBUG("mon=%p netstr=%s",
|
||||
mon, netstr);
|
||||
|
||||
if (!mon) {
|
||||
@ -1717,7 +1717,7 @@ int qemuMonitorRemoveHostNetwork(qemuMonitorPtr mon,
|
||||
const char *netname)
|
||||
{
|
||||
int ret;
|
||||
DEBUG("mon=%p netname=%s",
|
||||
VIR_DEBUG("mon=%p netname=%s",
|
||||
mon, netname);
|
||||
|
||||
if (!mon) {
|
||||
@ -1738,7 +1738,7 @@ int qemuMonitorAddNetdev(qemuMonitorPtr mon,
|
||||
const char *netdevstr)
|
||||
{
|
||||
int ret;
|
||||
DEBUG("mon=%p netdevstr=%s",
|
||||
VIR_DEBUG("mon=%p netdevstr=%s",
|
||||
mon, netdevstr);
|
||||
|
||||
if (!mon) {
|
||||
@ -1759,7 +1759,7 @@ int qemuMonitorRemoveNetdev(qemuMonitorPtr mon,
|
||||
const char *alias)
|
||||
{
|
||||
int ret;
|
||||
DEBUG("mon=%p alias=%s",
|
||||
VIR_DEBUG("mon=%p alias=%s",
|
||||
mon, alias);
|
||||
|
||||
if (!mon) {
|
||||
@ -1780,7 +1780,7 @@ int qemuMonitorGetPtyPaths(qemuMonitorPtr mon,
|
||||
virHashTablePtr paths)
|
||||
{
|
||||
int ret;
|
||||
DEBUG("mon=%p",
|
||||
VIR_DEBUG("mon=%p",
|
||||
mon);
|
||||
|
||||
if (!mon) {
|
||||
@ -1801,7 +1801,7 @@ int qemuMonitorAttachPCIDiskController(qemuMonitorPtr mon,
|
||||
const char *bus,
|
||||
virDomainDevicePCIAddress *guestAddr)
|
||||
{
|
||||
DEBUG("mon=%p type=%s", mon, bus);
|
||||
VIR_DEBUG("mon=%p type=%s", mon, bus);
|
||||
int ret;
|
||||
|
||||
if (!mon) {
|
||||
@ -1824,7 +1824,7 @@ int qemuMonitorAttachDrive(qemuMonitorPtr mon,
|
||||
virDomainDevicePCIAddress *controllerAddr,
|
||||
virDomainDeviceDriveAddress *driveAddr)
|
||||
{
|
||||
DEBUG("mon=%p drivestr=%s domain=%d bus=%d slot=%d function=%d",
|
||||
VIR_DEBUG("mon=%p drivestr=%s domain=%d bus=%d slot=%d function=%d",
|
||||
mon, drivestr,
|
||||
controllerAddr->domain, controllerAddr->bus,
|
||||
controllerAddr->slot, controllerAddr->function);
|
||||
@ -1847,7 +1847,7 @@ int qemuMonitorAttachDrive(qemuMonitorPtr mon,
|
||||
int qemuMonitorGetAllPCIAddresses(qemuMonitorPtr mon,
|
||||
qemuMonitorPCIAddress **addrs)
|
||||
{
|
||||
DEBUG("mon=%p addrs=%p", mon, addrs);
|
||||
VIR_DEBUG("mon=%p addrs=%p", mon, addrs);
|
||||
int ret;
|
||||
|
||||
if (!mon) {
|
||||
@ -1866,7 +1866,7 @@ int qemuMonitorGetAllPCIAddresses(qemuMonitorPtr mon,
|
||||
int qemuMonitorDriveDel(qemuMonitorPtr mon,
|
||||
const char *drivestr)
|
||||
{
|
||||
DEBUG("mon=%p drivestr=%s", mon, drivestr);
|
||||
VIR_DEBUG("mon=%p drivestr=%s", mon, drivestr);
|
||||
int ret;
|
||||
|
||||
if (!mon) {
|
||||
@ -1885,7 +1885,7 @@ int qemuMonitorDriveDel(qemuMonitorPtr mon,
|
||||
int qemuMonitorDelDevice(qemuMonitorPtr mon,
|
||||
const char *devalias)
|
||||
{
|
||||
DEBUG("mon=%p devalias=%s", mon, devalias);
|
||||
VIR_DEBUG("mon=%p devalias=%s", mon, devalias);
|
||||
int ret;
|
||||
|
||||
if (!mon) {
|
||||
@ -1905,7 +1905,7 @@ int qemuMonitorDelDevice(qemuMonitorPtr mon,
|
||||
int qemuMonitorAddDevice(qemuMonitorPtr mon,
|
||||
const char *devicestr)
|
||||
{
|
||||
DEBUG("mon=%p device=%s", mon, devicestr);
|
||||
VIR_DEBUG("mon=%p device=%s", mon, devicestr);
|
||||
int ret;
|
||||
|
||||
if (!mon) {
|
||||
@ -1924,7 +1924,7 @@ int qemuMonitorAddDevice(qemuMonitorPtr mon,
|
||||
int qemuMonitorAddDrive(qemuMonitorPtr mon,
|
||||
const char *drivestr)
|
||||
{
|
||||
DEBUG("mon=%p drive=%s", mon, drivestr);
|
||||
VIR_DEBUG("mon=%p drive=%s", mon, drivestr);
|
||||
int ret;
|
||||
|
||||
if (!mon) {
|
||||
@ -1945,7 +1945,7 @@ int qemuMonitorSetDrivePassphrase(qemuMonitorPtr mon,
|
||||
const char *alias,
|
||||
const char *passphrase)
|
||||
{
|
||||
DEBUG("mon=%p alias=%s passphrase=%p(value hidden)", mon, alias, passphrase);
|
||||
VIR_DEBUG("mon=%p alias=%s passphrase=%p(value hidden)", mon, alias, passphrase);
|
||||
int ret;
|
||||
|
||||
if (!mon) {
|
||||
@ -1965,7 +1965,7 @@ int qemuMonitorCreateSnapshot(qemuMonitorPtr mon, const char *name)
|
||||
{
|
||||
int ret;
|
||||
|
||||
DEBUG("mon=%p, name=%s",mon,name);
|
||||
VIR_DEBUG("mon=%p, name=%s",mon,name);
|
||||
|
||||
if (!mon) {
|
||||
qemuReportError(VIR_ERR_INVALID_ARG, "%s",
|
||||
@ -1984,7 +1984,7 @@ int qemuMonitorLoadSnapshot(qemuMonitorPtr mon, const char *name)
|
||||
{
|
||||
int ret;
|
||||
|
||||
DEBUG("mon=%p, name=%s",mon,name);
|
||||
VIR_DEBUG("mon=%p, name=%s",mon,name);
|
||||
|
||||
if (!mon) {
|
||||
qemuReportError(VIR_ERR_INVALID_ARG, "%s",
|
||||
@ -2003,7 +2003,7 @@ int qemuMonitorDeleteSnapshot(qemuMonitorPtr mon, const char *name)
|
||||
{
|
||||
int ret;
|
||||
|
||||
DEBUG("mon=%p, name=%s",mon,name);
|
||||
VIR_DEBUG("mon=%p, name=%s",mon,name);
|
||||
|
||||
if (!mon) {
|
||||
qemuReportError(VIR_ERR_INVALID_ARG, "%s",
|
||||
@ -2025,7 +2025,7 @@ int qemuMonitorArbitraryCommand(qemuMonitorPtr mon,
|
||||
{
|
||||
int ret;
|
||||
|
||||
DEBUG("mon=%p, cmd=%s, reply=%p, hmp=%d", mon, cmd, reply, hmp);
|
||||
VIR_DEBUG("mon=%p, cmd=%s, reply=%p, hmp=%d", mon, cmd, reply, hmp);
|
||||
|
||||
if (mon->json)
|
||||
ret = qemuMonitorJSONArbitraryCommand(mon, cmd, reply, hmp);
|
||||
|
@ -2326,7 +2326,7 @@ int qemuMonitorJSONDriveDel(qemuMonitorPtr mon,
|
||||
virJSONValuePtr cmd;
|
||||
virJSONValuePtr reply = NULL;
|
||||
|
||||
DEBUG("JSONDriveDel drivestr=%s", drivestr);
|
||||
VIR_DEBUG("JSONDriveDel drivestr=%s", drivestr);
|
||||
cmd = qemuMonitorJSONMakeCommand("drive_del",
|
||||
"s:id", drivestr,
|
||||
NULL);
|
||||
|
@ -445,7 +445,7 @@ int qemuMonitorTextGetCPUInfo(qemuMonitorPtr mon,
|
||||
if (VIR_REALLOC_N(cpupids, ncpupids+1) < 0)
|
||||
goto error;
|
||||
|
||||
DEBUG("vcpu=%d pid=%d", vcpu, tid);
|
||||
VIR_DEBUG("vcpu=%d pid=%d", vcpu, tid);
|
||||
cpupids[ncpupids++] = tid;
|
||||
lastVcpu = vcpu;
|
||||
|
||||
@ -480,7 +480,7 @@ static int parseMemoryStat(char **text, unsigned int tag,
|
||||
if (STRPREFIX (*text, search)) {
|
||||
*text += strlen(search);
|
||||
if (virStrToLong_ull (*text, &dummy, 10, &value)) {
|
||||
DEBUG ("error reading %s: %s", search, *text);
|
||||
VIR_DEBUG ("error reading %s: %s", search, *text);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -671,21 +671,21 @@ int qemuMonitorTextGetBlockStatsInfo(qemuMonitorPtr mon,
|
||||
if (STRPREFIX (p, "rd_bytes=")) {
|
||||
p += 9;
|
||||
if (virStrToLong_ll (p, &dummy, 10, rd_bytes) == -1)
|
||||
DEBUG ("error reading rd_bytes: %s", p);
|
||||
VIR_DEBUG ("error reading rd_bytes: %s", p);
|
||||
} else if (STRPREFIX (p, "wr_bytes=")) {
|
||||
p += 9;
|
||||
if (virStrToLong_ll (p, &dummy, 10, wr_bytes) == -1)
|
||||
DEBUG ("error reading wr_bytes: %s", p);
|
||||
VIR_DEBUG ("error reading wr_bytes: %s", p);
|
||||
} else if (STRPREFIX (p, "rd_operations=")) {
|
||||
p += 14;
|
||||
if (virStrToLong_ll (p, &dummy, 10, rd_req) == -1)
|
||||
DEBUG ("error reading rd_req: %s", p);
|
||||
VIR_DEBUG ("error reading rd_req: %s", p);
|
||||
} else if (STRPREFIX (p, "wr_operations=")) {
|
||||
p += 14;
|
||||
if (virStrToLong_ll (p, &dummy, 10, wr_req) == -1)
|
||||
DEBUG ("error reading wr_req: %s", p);
|
||||
VIR_DEBUG ("error reading wr_req: %s", p);
|
||||
} else
|
||||
DEBUG ("unknown block stat near %s", p);
|
||||
VIR_DEBUG ("unknown block stat near %s", p);
|
||||
|
||||
/* Skip to next label. */
|
||||
p = strchr (p, ' ');
|
||||
@ -2355,7 +2355,7 @@ int qemuMonitorTextDelDevice(qemuMonitorPtr mon,
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
DEBUG("TextDelDevice devalias=%s", devalias);
|
||||
VIR_DEBUG("TextDelDevice devalias=%s", devalias);
|
||||
if (qemuMonitorCommand(mon, cmd, &reply) < 0) {
|
||||
qemuReportError(VIR_ERR_OPERATION_FAILED,
|
||||
_("cannot detach %s device"), devalias);
|
||||
@ -2477,7 +2477,7 @@ int qemuMonitorTextDriveDel(qemuMonitorPtr mon,
|
||||
char *reply = NULL;
|
||||
char *safedev;
|
||||
int ret = -1;
|
||||
DEBUG("TextDriveDel drivestr=%s", drivestr);
|
||||
VIR_DEBUG("TextDriveDel drivestr=%s", drivestr);
|
||||
|
||||
if (!(safedev = qemuMonitorEscapeArg(drivestr))) {
|
||||
virReportOOMError();
|
||||
|
@ -1086,7 +1086,7 @@ qemuProcessInitCpuAffinity(virDomainObjPtr vm)
|
||||
unsigned char *cpumap;
|
||||
int cpumaplen;
|
||||
|
||||
DEBUG0("Setting CPU affinity");
|
||||
VIR_DEBUG0("Setting CPU affinity");
|
||||
|
||||
if (nodeGetInfo(NULL, &nodeinfo) < 0)
|
||||
return -1;
|
||||
@ -1893,7 +1893,7 @@ int qemuProcessStart(virConnectPtr conn,
|
||||
hookData.vm = vm;
|
||||
hookData.driver = driver;
|
||||
|
||||
DEBUG0("Beginning VM startup process");
|
||||
VIR_DEBUG0("Beginning VM startup process");
|
||||
|
||||
if (virDomainObjIsActive(vm)) {
|
||||
qemuReportError(VIR_ERR_OPERATION_INVALID,
|
||||
@ -1905,18 +1905,18 @@ int qemuProcessStart(virConnectPtr conn,
|
||||
* runtime state to vm->def that won't be persisted. This let's us
|
||||
* report implicit runtime defaults in the XML, like vnc listen/socket
|
||||
*/
|
||||
DEBUG0("Setting current domain def as transient");
|
||||
VIR_DEBUG0("Setting current domain def as transient");
|
||||
if (virDomainObjSetDefTransient(driver->caps, vm, true) < 0)
|
||||
goto cleanup;
|
||||
|
||||
vm->def->id = driver->nextvmid++;
|
||||
|
||||
/* Must be run before security labelling */
|
||||
DEBUG0("Preparing host devices");
|
||||
VIR_DEBUG0("Preparing host devices");
|
||||
if (qemuPrepareHostDevices(driver, vm->def) < 0)
|
||||
goto cleanup;
|
||||
|
||||
DEBUG0("Preparing chr devices");
|
||||
VIR_DEBUG0("Preparing chr devices");
|
||||
if (virDomainChrDefForeach(vm->def,
|
||||
true,
|
||||
qemuProcessPrepareChardevDevice,
|
||||
@ -1925,14 +1925,14 @@ int qemuProcessStart(virConnectPtr conn,
|
||||
|
||||
/* If you are using a SecurityDriver with dynamic labelling,
|
||||
then generate a security label for isolation */
|
||||
DEBUG0("Generating domain security label (if required)");
|
||||
VIR_DEBUG0("Generating domain security label (if required)");
|
||||
if (virSecurityManagerGenLabel(driver->securityManager, vm) < 0) {
|
||||
qemuDomainSecurityLabelAudit(vm, false);
|
||||
goto cleanup;
|
||||
}
|
||||
qemuDomainSecurityLabelAudit(vm, true);
|
||||
|
||||
DEBUG0("Generating setting domain security labels (if required)");
|
||||
VIR_DEBUG0("Generating setting domain security labels (if required)");
|
||||
if (virSecurityManagerSetAllLabel(driver->securityManager,
|
||||
vm, stdin_path) < 0)
|
||||
goto cleanup;
|
||||
@ -1943,7 +1943,7 @@ int qemuProcessStart(virConnectPtr conn,
|
||||
*/
|
||||
struct stat stdin_sb;
|
||||
|
||||
DEBUG0("setting security label on pipe used for migration");
|
||||
VIR_DEBUG0("setting security label on pipe used for migration");
|
||||
|
||||
if (fstat(stdin_fd, &stdin_sb) < 0) {
|
||||
virReportSystemError(errno,
|
||||
@ -1957,7 +1957,7 @@ int qemuProcessStart(virConnectPtr conn,
|
||||
|
||||
/* Ensure no historical cgroup for this VM is lying around bogus
|
||||
* settings */
|
||||
DEBUG0("Ensuring no historical cgroup is lying around");
|
||||
VIR_DEBUG0("Ensuring no historical cgroup is lying around");
|
||||
qemuRemoveCgroup(driver, vm, 1);
|
||||
|
||||
if (vm->def->ngraphics == 1) {
|
||||
@ -2003,17 +2003,17 @@ int qemuProcessStart(virConnectPtr conn,
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
DEBUG0("Creating domain log file");
|
||||
VIR_DEBUG0("Creating domain log file");
|
||||
if ((logfile = qemuProcessLogFD(driver, vm->def->name, false)) < 0)
|
||||
goto cleanup;
|
||||
|
||||
DEBUG0("Determining emulator version");
|
||||
VIR_DEBUG0("Determining emulator version");
|
||||
if (qemuCapsExtractVersionInfo(vm->def->emulator, vm->def->os.arch,
|
||||
NULL,
|
||||
&qemuCmdFlags) < 0)
|
||||
goto cleanup;
|
||||
|
||||
DEBUG0("Setting up domain cgroup (if required)");
|
||||
VIR_DEBUG0("Setting up domain cgroup (if required)");
|
||||
if (qemuSetupCgroup(driver, vm) < 0)
|
||||
goto cleanup;
|
||||
|
||||
@ -2022,7 +2022,7 @@ int qemuProcessStart(virConnectPtr conn,
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
DEBUG0("Preparing monitor state");
|
||||
VIR_DEBUG0("Preparing monitor state");
|
||||
if (qemuProcessPrepareMonitorChr(driver, priv->monConfig, vm->def->name) < 0)
|
||||
goto cleanup;
|
||||
|
||||
@ -2057,7 +2057,7 @@ int qemuProcessStart(virConnectPtr conn,
|
||||
* use in hotplug
|
||||
*/
|
||||
if (qemuCmdFlags & QEMUD_CMD_FLAG_DEVICE) {
|
||||
DEBUG0("Assigning domain PCI addresses");
|
||||
VIR_DEBUG0("Assigning domain PCI addresses");
|
||||
/* Populate cache with current addresses */
|
||||
if (priv->pciaddrs) {
|
||||
qemuDomainPCIAddressSetFree(priv->pciaddrs);
|
||||
@ -2076,7 +2076,7 @@ int qemuProcessStart(virConnectPtr conn,
|
||||
priv->persistentAddrs = 0;
|
||||
}
|
||||
|
||||
DEBUG0("Building emulator command line");
|
||||
VIR_DEBUG0("Building emulator command line");
|
||||
if (!(cmd = qemuBuildCommandLine(conn, driver, vm->def, priv->monConfig,
|
||||
priv->monJSON != 0, qemuCmdFlags,
|
||||
migrateFrom, stdin_fd,
|
||||
@ -2176,27 +2176,27 @@ int qemuProcessStart(virConnectPtr conn,
|
||||
if (ret == -1) /* The VM failed to start */
|
||||
goto cleanup;
|
||||
|
||||
DEBUG0("Waiting for monitor to show up");
|
||||
VIR_DEBUG0("Waiting for monitor to show up");
|
||||
if (qemuProcessWaitForMonitor(driver, vm, pos) < 0)
|
||||
goto cleanup;
|
||||
|
||||
DEBUG0("Detecting VCPU PIDs");
|
||||
VIR_DEBUG0("Detecting VCPU PIDs");
|
||||
if (qemuProcessDetectVcpuPIDs(driver, vm) < 0)
|
||||
goto cleanup;
|
||||
|
||||
DEBUG0("Setting any required VM passwords");
|
||||
VIR_DEBUG0("Setting any required VM passwords");
|
||||
if (qemuProcessInitPasswords(conn, driver, vm, qemuCmdFlags) < 0)
|
||||
goto cleanup;
|
||||
|
||||
/* If we have -device, then addresses are assigned explicitly.
|
||||
* If not, then we have to detect dynamic ones here */
|
||||
if (!(qemuCmdFlags & QEMUD_CMD_FLAG_DEVICE)) {
|
||||
DEBUG0("Determining domain device PCI addresses");
|
||||
VIR_DEBUG0("Determining domain device PCI addresses");
|
||||
if (qemuProcessInitPCIAddresses(driver, vm) < 0)
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
DEBUG0("Setting initial memory amount");
|
||||
VIR_DEBUG0("Setting initial memory amount");
|
||||
qemuDomainObjEnterMonitorWithDriver(driver, vm);
|
||||
if (qemuMonitorSetBalloon(priv->mon, vm->def->mem.cur_balloon) < 0) {
|
||||
qemuDomainObjExitMonitorWithDriver(driver, vm);
|
||||
@ -2205,7 +2205,7 @@ int qemuProcessStart(virConnectPtr conn,
|
||||
qemuDomainObjExitMonitorWithDriver(driver, vm);
|
||||
|
||||
if (!start_paused) {
|
||||
DEBUG0("Starting domain CPUs");
|
||||
VIR_DEBUG0("Starting domain CPUs");
|
||||
/* Allow the CPUS to start executing */
|
||||
if (qemuProcessStartCPUs(driver, vm, conn) < 0) {
|
||||
if (virGetLastError() == NULL)
|
||||
@ -2216,7 +2216,7 @@ int qemuProcessStart(virConnectPtr conn,
|
||||
}
|
||||
|
||||
|
||||
DEBUG0("Writing domain status to disk");
|
||||
VIR_DEBUG0("Writing domain status to disk");
|
||||
if (virDomainSaveStatus(driver->caps, driver->stateDir, vm) < 0)
|
||||
goto cleanup;
|
||||
|
||||
|
@ -515,7 +515,7 @@ doRemoteOpen (virConnectPtr conn,
|
||||
if (!pkipath) goto out_of_memory;
|
||||
var->ignore = 1;
|
||||
} else {
|
||||
DEBUG("passing through variable '%s' ('%s') to remote end",
|
||||
VIR_DEBUG("passing through variable '%s' ('%s') to remote end",
|
||||
var->name, var->value);
|
||||
}
|
||||
}
|
||||
@ -571,7 +571,7 @@ doRemoteOpen (virConnectPtr conn,
|
||||
goto failed;
|
||||
}
|
||||
|
||||
DEBUG("proceeding with name = %s", name);
|
||||
VIR_DEBUG("proceeding with name = %s", name);
|
||||
|
||||
/* For ext transport, command is required. */
|
||||
if (transport == trans_ext && !command) {
|
||||
@ -894,7 +894,7 @@ doRemoteOpen (virConnectPtr conn,
|
||||
goto failed;
|
||||
}
|
||||
|
||||
DEBUG("Auto-probed URI is %s", uriret.uri);
|
||||
VIR_DEBUG("Auto-probed URI is %s", uriret.uri);
|
||||
conn->uri = xmlParseURI(uriret.uri);
|
||||
VIR_FREE(uriret.uri);
|
||||
if (!conn->uri) {
|
||||
@ -913,21 +913,21 @@ doRemoteOpen (virConnectPtr conn,
|
||||
goto failed;
|
||||
}
|
||||
|
||||
DEBUG0("Adding Handler for remote events");
|
||||
VIR_DEBUG0("Adding Handler for remote events");
|
||||
/* Set up a callback to listen on the socket data */
|
||||
if ((priv->watch = virEventAddHandle(priv->sock,
|
||||
VIR_EVENT_HANDLE_READABLE,
|
||||
remoteDomainEventFired,
|
||||
conn, NULL)) < 0) {
|
||||
DEBUG0("virEventAddHandle failed: No addHandleImpl defined."
|
||||
VIR_DEBUG0("virEventAddHandle failed: No addHandleImpl defined."
|
||||
" continuing without events.");
|
||||
} else {
|
||||
|
||||
DEBUG0("Adding Timeout for remote event queue flushing");
|
||||
VIR_DEBUG0("Adding Timeout for remote event queue flushing");
|
||||
if ( (priv->eventFlushTimer = virEventAddTimeout(-1,
|
||||
remoteDomainEventQueueFlush,
|
||||
conn, NULL)) < 0) {
|
||||
DEBUG0("virEventAddTimeout failed: No addTimeoutImpl defined. "
|
||||
VIR_DEBUG0("virEventAddTimeout failed: No addTimeoutImpl defined. "
|
||||
"continuing without events.");
|
||||
virEventRemoveHandle(priv->watch);
|
||||
priv->watch = -1;
|
||||
@ -1076,7 +1076,7 @@ remoteOpen (virConnectPtr conn,
|
||||
(STREQ(conn->uri->path, "/session") ||
|
||||
STRPREFIX(conn->uri->scheme, "test+")) &&
|
||||
getuid() > 0) {
|
||||
DEBUG0("Auto-spawn user daemon instance");
|
||||
VIR_DEBUG0("Auto-spawn user daemon instance");
|
||||
rflags |= VIR_DRV_OPEN_REMOTE_USER;
|
||||
if (!autostart ||
|
||||
STRNEQ(autostart, "0"))
|
||||
@ -1090,10 +1090,10 @@ remoteOpen (virConnectPtr conn,
|
||||
* to the UNIX socket anyway.
|
||||
*/
|
||||
if (!conn->uri) {
|
||||
DEBUG0("Auto-probe remote URI");
|
||||
VIR_DEBUG0("Auto-probe remote URI");
|
||||
#ifndef __sun
|
||||
if (getuid() > 0) {
|
||||
DEBUG0("Auto-spawn user daemon instance");
|
||||
VIR_DEBUG0("Auto-spawn user daemon instance");
|
||||
rflags |= VIR_DRV_OPEN_REMOTE_USER;
|
||||
if (!autostart ||
|
||||
STRNEQ(autostart, "0"))
|
||||
@ -1142,7 +1142,7 @@ check_cert_file(const char *type, const char *file)
|
||||
|
||||
|
||||
static void remote_debug_gnutls_log(int level, const char* str) {
|
||||
DEBUG("%d %s", level, str);
|
||||
VIR_DEBUG("%d %s", level, str);
|
||||
}
|
||||
|
||||
static int
|
||||
@ -1252,7 +1252,7 @@ initialize_gnutls(char *pkipath, int flags)
|
||||
goto error;
|
||||
|
||||
/* Set the trusted CA cert. */
|
||||
DEBUG("loading CA file %s", libvirt_cacert);
|
||||
VIR_DEBUG("loading CA file %s", libvirt_cacert);
|
||||
err =
|
||||
gnutls_certificate_set_x509_trust_file (x509_cred, libvirt_cacert,
|
||||
GNUTLS_X509_FMT_PEM);
|
||||
@ -1264,7 +1264,7 @@ initialize_gnutls(char *pkipath, int flags)
|
||||
}
|
||||
|
||||
/* Set the client certificate and private key. */
|
||||
DEBUG("loading client cert and key from files %s and %s",
|
||||
VIR_DEBUG("loading client cert and key from files %s and %s",
|
||||
libvirt_clientcert, libvirt_clientkey);
|
||||
err =
|
||||
gnutls_certificate_set_x509_key_file (x509_cred,
|
||||
@ -1390,7 +1390,7 @@ negotiate_gnutls_on_connection (virConnectPtr conn,
|
||||
|
||||
/* Verify certificate. */
|
||||
if (verify_certificate (conn, priv, session) == -1) {
|
||||
DEBUG0("failed to verify peer's certificate");
|
||||
VIR_DEBUG0("failed to verify peer's certificate");
|
||||
if (!no_verify) return NULL;
|
||||
}
|
||||
|
||||
@ -7240,7 +7240,7 @@ remoteAuthSASL (virConnectPtr conn, struct private_data *priv, int in_open,
|
||||
int ret = -1;
|
||||
const char *mechlist;
|
||||
|
||||
DEBUG0("Client initialize SASL authentication");
|
||||
VIR_DEBUG0("Client initialize SASL authentication");
|
||||
/* Sets up the SASL library as a whole */
|
||||
err = sasl_client_init(NULL);
|
||||
if (err != SASL_OK) {
|
||||
@ -7305,7 +7305,7 @@ remoteAuthSASL (virConnectPtr conn, struct private_data *priv, int in_open,
|
||||
}
|
||||
ssf *= 8; /* key size is bytes, sasl wants bits */
|
||||
|
||||
DEBUG("Setting external SSF %d", ssf);
|
||||
VIR_DEBUG("Setting external SSF %d", ssf);
|
||||
err = sasl_setprop(saslconn, SASL_SSF_EXTERNAL, &ssf);
|
||||
if (err != SASL_OK) {
|
||||
remoteError(VIR_ERR_INTERNAL_ERROR,
|
||||
@ -7353,7 +7353,7 @@ remoteAuthSASL (virConnectPtr conn, struct private_data *priv, int in_open,
|
||||
}
|
||||
restart:
|
||||
/* Start the auth negotiation on the client end first */
|
||||
DEBUG("Client start negotiation mechlist '%s'", mechlist);
|
||||
VIR_DEBUG("Client start negotiation mechlist '%s'", mechlist);
|
||||
err = sasl_client_start(saslconn,
|
||||
mechlist,
|
||||
&interact,
|
||||
@ -7408,7 +7408,7 @@ remoteAuthSASL (virConnectPtr conn, struct private_data *priv, int in_open,
|
||||
sargs.data.data_val = (char*)clientout;
|
||||
sargs.data.data_len = clientoutlen;
|
||||
sargs.mech = (char*)mech;
|
||||
DEBUG("Server start negotiation with mech %s. Data %d bytes %p", mech, clientoutlen, clientout);
|
||||
VIR_DEBUG("Server start negotiation with mech %s. Data %d bytes %p", mech, clientoutlen, clientout);
|
||||
|
||||
/* Now send the initial auth data to the server */
|
||||
memset (&sret, 0, sizeof sret);
|
||||
@ -7421,7 +7421,7 @@ remoteAuthSASL (virConnectPtr conn, struct private_data *priv, int in_open,
|
||||
/* NB, distinction of NULL vs "" is *critical* in SASL */
|
||||
serverin = sret.nil ? NULL : sret.data.data_val;
|
||||
serverinlen = sret.data.data_len;
|
||||
DEBUG("Client step result complete: %d. Data %d bytes %p",
|
||||
VIR_DEBUG("Client step result complete: %d. Data %d bytes %p",
|
||||
complete, serverinlen, serverin);
|
||||
|
||||
/* Loop-the-loop...
|
||||
@ -7468,7 +7468,7 @@ remoteAuthSASL (virConnectPtr conn, struct private_data *priv, int in_open,
|
||||
}
|
||||
|
||||
VIR_FREE(serverin);
|
||||
DEBUG("Client step result %d. Data %d bytes %p", err, clientoutlen, clientout);
|
||||
VIR_DEBUG("Client step result %d. Data %d bytes %p", err, clientoutlen, clientout);
|
||||
|
||||
/* Previous server call showed completion & we're now locally complete too */
|
||||
if (complete && err == SASL_OK)
|
||||
@ -7480,7 +7480,7 @@ remoteAuthSASL (virConnectPtr conn, struct private_data *priv, int in_open,
|
||||
pargs.nil = clientout ? 0 : 1;
|
||||
pargs.data.data_val = (char*)clientout;
|
||||
pargs.data.data_len = clientoutlen;
|
||||
DEBUG("Server step with %d bytes %p", clientoutlen, clientout);
|
||||
VIR_DEBUG("Server step with %d bytes %p", clientoutlen, clientout);
|
||||
|
||||
memset (&pret, 0, sizeof pret);
|
||||
if (call (conn, priv, in_open, REMOTE_PROC_AUTH_SASL_STEP,
|
||||
@ -7493,7 +7493,7 @@ remoteAuthSASL (virConnectPtr conn, struct private_data *priv, int in_open,
|
||||
serverin = pret.nil ? NULL : pret.data.data_val;
|
||||
serverinlen = pret.data.data_len;
|
||||
|
||||
DEBUG("Client step result complete: %d. Data %d bytes %p",
|
||||
VIR_DEBUG("Client step result complete: %d. Data %d bytes %p",
|
||||
complete, serverinlen, serverin);
|
||||
|
||||
/* This server call shows complete, and earlier client step was OK */
|
||||
@ -7513,7 +7513,7 @@ remoteAuthSASL (virConnectPtr conn, struct private_data *priv, int in_open,
|
||||
goto cleanup;
|
||||
}
|
||||
ssf = *(const int *)val;
|
||||
DEBUG("SASL SSF value %d", ssf);
|
||||
VIR_DEBUG("SASL SSF value %d", ssf);
|
||||
if (ssf < 56) { /* 56 == DES level, good for Kerberos */
|
||||
remoteError(VIR_ERR_AUTH_FAILED,
|
||||
_("negotiation SSF %d was not strong enough"), ssf);
|
||||
@ -7522,7 +7522,7 @@ remoteAuthSASL (virConnectPtr conn, struct private_data *priv, int in_open,
|
||||
priv->is_secure = 1;
|
||||
}
|
||||
|
||||
DEBUG0("SASL authentication complete");
|
||||
VIR_DEBUG0("SASL authentication complete");
|
||||
priv->saslconn = saslconn;
|
||||
ret = 0;
|
||||
|
||||
@ -7548,7 +7548,7 @@ remoteAuthPolkit (virConnectPtr conn, struct private_data *priv, int in_open,
|
||||
virConnectAuthPtr auth ATTRIBUTE_UNUSED)
|
||||
{
|
||||
remote_auth_polkit_ret ret;
|
||||
DEBUG0("Client initialize PolicyKit-1 authentication");
|
||||
VIR_DEBUG0("Client initialize PolicyKit-1 authentication");
|
||||
|
||||
memset (&ret, 0, sizeof ret);
|
||||
if (call (conn, priv, in_open, REMOTE_PROC_AUTH_POLKIT,
|
||||
@ -7557,7 +7557,7 @@ remoteAuthPolkit (virConnectPtr conn, struct private_data *priv, int in_open,
|
||||
return -1; /* virError already set by call */
|
||||
}
|
||||
|
||||
DEBUG0("PolicyKit-1 authentication complete");
|
||||
VIR_DEBUG0("PolicyKit-1 authentication complete");
|
||||
return 0;
|
||||
}
|
||||
# elif HAVE_POLKIT0
|
||||
@ -7577,7 +7577,7 @@ remoteAuthPolkit (virConnectPtr conn, struct private_data *priv, int in_open,
|
||||
NULL,
|
||||
0,
|
||||
};
|
||||
DEBUG0("Client initialize PolicyKit-0 authentication");
|
||||
VIR_DEBUG0("Client initialize PolicyKit-0 authentication");
|
||||
|
||||
if (auth && auth->cb) {
|
||||
/* Check if the necessary credential type for PolicyKit is supported */
|
||||
@ -7587,7 +7587,7 @@ remoteAuthPolkit (virConnectPtr conn, struct private_data *priv, int in_open,
|
||||
}
|
||||
|
||||
if (allowcb) {
|
||||
DEBUG0("Client run callback for PolicyKit authentication");
|
||||
VIR_DEBUG0("Client run callback for PolicyKit authentication");
|
||||
/* Run the authentication callback */
|
||||
if ((*(auth->cb))(&cred, 1, auth->cbdata) < 0) {
|
||||
remoteError(VIR_ERR_AUTH_FAILED, "%s",
|
||||
@ -7595,10 +7595,10 @@ remoteAuthPolkit (virConnectPtr conn, struct private_data *priv, int in_open,
|
||||
return -1;
|
||||
}
|
||||
} else {
|
||||
DEBUG0("Client auth callback does not support PolicyKit");
|
||||
VIR_DEBUG0("Client auth callback does not support PolicyKit");
|
||||
}
|
||||
} else {
|
||||
DEBUG0("No auth callback provided");
|
||||
VIR_DEBUG0("No auth callback provided");
|
||||
}
|
||||
|
||||
memset (&ret, 0, sizeof ret);
|
||||
@ -7608,7 +7608,7 @@ remoteAuthPolkit (virConnectPtr conn, struct private_data *priv, int in_open,
|
||||
return -1; /* virError already set by call */
|
||||
}
|
||||
|
||||
DEBUG0("PolicyKit-0 authentication complete");
|
||||
VIR_DEBUG0("PolicyKit-0 authentication complete");
|
||||
return 0;
|
||||
}
|
||||
# endif /* HAVE_POLKIT0 */
|
||||
@ -8330,7 +8330,7 @@ remoteStreamPacket(virStreamPtr st,
|
||||
const char *data,
|
||||
size_t nbytes)
|
||||
{
|
||||
DEBUG("st=%p status=%d data=%p nbytes=%zu", st, status, data, nbytes);
|
||||
VIR_DEBUG("st=%p status=%d data=%p nbytes=%zu", st, status, data, nbytes);
|
||||
struct private_data *priv = st->conn->privateData;
|
||||
struct private_stream_data *privst = st->privateData;
|
||||
XDR xdr;
|
||||
@ -8475,7 +8475,7 @@ remoteStreamSend(virStreamPtr st,
|
||||
const char *data,
|
||||
size_t nbytes)
|
||||
{
|
||||
DEBUG("st=%p data=%p nbytes=%zu", st, data, nbytes);
|
||||
VIR_DEBUG("st=%p data=%p nbytes=%zu", st, data, nbytes);
|
||||
struct private_data *priv = st->conn->privateData;
|
||||
int rv = -1;
|
||||
|
||||
@ -8504,7 +8504,7 @@ remoteStreamRecv(virStreamPtr st,
|
||||
char *data,
|
||||
size_t nbytes)
|
||||
{
|
||||
DEBUG("st=%p data=%p nbytes=%zu", st, data, nbytes);
|
||||
VIR_DEBUG("st=%p data=%p nbytes=%zu", st, data, nbytes);
|
||||
struct private_data *priv = st->conn->privateData;
|
||||
struct private_stream_data *privst = st->privateData;
|
||||
int rv = -1;
|
||||
@ -8519,7 +8519,7 @@ remoteStreamRecv(virStreamPtr st,
|
||||
int ret;
|
||||
|
||||
if (st->flags & VIR_STREAM_NONBLOCK) {
|
||||
DEBUG0("Non-blocking mode and no data available");
|
||||
VIR_DEBUG0("Non-blocking mode and no data available");
|
||||
rv = -2;
|
||||
goto cleanup;
|
||||
}
|
||||
@ -8549,7 +8549,7 @@ remoteStreamRecv(virStreamPtr st,
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
DEBUG("After IO %d", privst->incomingOffset);
|
||||
VIR_DEBUG("After IO %d", privst->incomingOffset);
|
||||
if (privst->incomingOffset) {
|
||||
int want = privst->incomingOffset;
|
||||
if (want > nbytes)
|
||||
@ -8569,7 +8569,7 @@ remoteStreamRecv(virStreamPtr st,
|
||||
|
||||
remoteStreamEventTimerUpdate(privst);
|
||||
|
||||
DEBUG("Done %d", rv);
|
||||
VIR_DEBUG("Done %d", rv);
|
||||
|
||||
cleanup:
|
||||
if (rv == -1)
|
||||
@ -9818,7 +9818,7 @@ remoteIODecodeMessageLength(struct private_data *priv) {
|
||||
/* Extend our declared buffer length and carry
|
||||
on reading the header + payload */
|
||||
priv->bufferLength += len;
|
||||
DEBUG("Got length, now need %d total (%d more)", priv->bufferLength, len);
|
||||
VIR_DEBUG("Got length, now need %d total (%d more)", priv->bufferLength, len);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -9977,10 +9977,10 @@ processCallDispatchMessage(virConnectPtr conn, struct private_data *priv,
|
||||
/* An async message has come in while we were waiting for the
|
||||
* response. Process it to pull it off the wire, and try again
|
||||
*/
|
||||
DEBUG0("Encountered an event while waiting for a response");
|
||||
VIR_DEBUG0("Encountered an event while waiting for a response");
|
||||
|
||||
if (in_open) {
|
||||
DEBUG("Ignoring bogus event %d received while in open", hdr->proc);
|
||||
VIR_DEBUG("Ignoring bogus event %d received while in open", hdr->proc);
|
||||
return -1;
|
||||
}
|
||||
|
||||
@ -10014,7 +10014,7 @@ processCallDispatchMessage(virConnectPtr conn, struct private_data *priv,
|
||||
break;
|
||||
|
||||
default:
|
||||
DEBUG("Unexpected event proc %d", hdr->proc);
|
||||
VIR_DEBUG("Unexpected event proc %d", hdr->proc);
|
||||
break;
|
||||
}
|
||||
|
||||
@ -10023,7 +10023,7 @@ processCallDispatchMessage(virConnectPtr conn, struct private_data *priv,
|
||||
|
||||
if (virDomainEventQueuePush(priv->domainEvents,
|
||||
event) < 0) {
|
||||
DEBUG0("Error adding event to queue");
|
||||
VIR_DEBUG0("Error adding event to queue");
|
||||
virDomainEventFree(event);
|
||||
}
|
||||
virEventUpdateTimeout(priv->eventFlushTimer, 0);
|
||||
@ -10271,7 +10271,7 @@ remoteIOEventLoop(virConnectPtr conn,
|
||||
|
||||
if (fds[1].revents) {
|
||||
ssize_t s;
|
||||
DEBUG0("Woken up from poll by other thread");
|
||||
VIR_DEBUG0("Woken up from poll by other thread");
|
||||
s = saferead(priv->wakeupReadFD, &ignore, sizeof(ignore));
|
||||
if (s < 0) {
|
||||
virReportSystemError(errno, "%s",
|
||||
@ -10322,7 +10322,7 @@ remoteIOEventLoop(virConnectPtr conn,
|
||||
* we release our mutex a short while
|
||||
* later...
|
||||
*/
|
||||
DEBUG("Waking up sleep %d %p %p", tmp->proc_nr, tmp, priv->waitDispatch);
|
||||
VIR_DEBUG("Waking up sleep %d %p %p", tmp->proc_nr, tmp, priv->waitDispatch);
|
||||
virCondSignal(&tmp->cond);
|
||||
}
|
||||
prev = tmp;
|
||||
@ -10336,11 +10336,11 @@ remoteIOEventLoop(virConnectPtr conn,
|
||||
* remove us
|
||||
*/
|
||||
priv->waitDispatch = thiscall->next;
|
||||
DEBUG("Giving up the buck %d %p %p", thiscall->proc_nr, thiscall, priv->waitDispatch);
|
||||
VIR_DEBUG("Giving up the buck %d %p %p", thiscall->proc_nr, thiscall, priv->waitDispatch);
|
||||
/* See if someone else is still waiting
|
||||
* and if so, then pass the buck ! */
|
||||
if (priv->waitDispatch) {
|
||||
DEBUG("Passing the buck to %d %p", priv->waitDispatch->proc_nr, priv->waitDispatch);
|
||||
VIR_DEBUG("Passing the buck to %d %p", priv->waitDispatch->proc_nr, priv->waitDispatch);
|
||||
virCondSignal(&priv->waitDispatch->cond);
|
||||
}
|
||||
return 0;
|
||||
@ -10357,11 +10357,11 @@ remoteIOEventLoop(virConnectPtr conn,
|
||||
|
||||
error:
|
||||
priv->waitDispatch = thiscall->next;
|
||||
DEBUG("Giving up the buck due to I/O error %d %p %p", thiscall->proc_nr, thiscall, priv->waitDispatch);
|
||||
VIR_DEBUG("Giving up the buck due to I/O error %d %p %p", thiscall->proc_nr, thiscall, priv->waitDispatch);
|
||||
/* See if someone else is still waiting
|
||||
* and if so, then pass the buck ! */
|
||||
if (priv->waitDispatch) {
|
||||
DEBUG("Passing the buck to %d %p", priv->waitDispatch->proc_nr, priv->waitDispatch);
|
||||
VIR_DEBUG("Passing the buck to %d %p", priv->waitDispatch->proc_nr, priv->waitDispatch);
|
||||
virCondSignal(&priv->waitDispatch->cond);
|
||||
}
|
||||
return -1;
|
||||
@ -10408,7 +10408,7 @@ remoteIO(virConnectPtr conn,
|
||||
{
|
||||
int rv;
|
||||
|
||||
DEBUG("Do proc=%d serial=%d length=%d wait=%p",
|
||||
VIR_DEBUG("Do proc=%d serial=%d length=%d wait=%p",
|
||||
thiscall->proc_nr, thiscall->serial,
|
||||
thiscall->bufferLength, priv->waitDispatch);
|
||||
|
||||
@ -10439,7 +10439,7 @@ remoteIO(virConnectPtr conn,
|
||||
return -1;
|
||||
}
|
||||
|
||||
DEBUG("Going to sleep %d %p %p", thiscall->proc_nr, priv->waitDispatch, thiscall);
|
||||
VIR_DEBUG("Going to sleep %d %p %p", thiscall->proc_nr, priv->waitDispatch, thiscall);
|
||||
/* Go to sleep while other thread is working... */
|
||||
if (virCondWait(&thiscall->cond, &priv->lock) < 0) {
|
||||
if (priv->waitDispatch == thiscall) {
|
||||
@ -10458,7 +10458,7 @@ remoteIO(virConnectPtr conn,
|
||||
return -1;
|
||||
}
|
||||
|
||||
DEBUG("Wokeup from sleep %d %p %p", thiscall->proc_nr, priv->waitDispatch, thiscall);
|
||||
VIR_DEBUG("Wokeup from sleep %d %p %p", thiscall->proc_nr, priv->waitDispatch, thiscall);
|
||||
/* Two reasons we can be woken up
|
||||
* 1. Other thread has got our reply ready for us
|
||||
* 2. Other thread is all done, and it is our turn to
|
||||
@ -10482,7 +10482,7 @@ remoteIO(virConnectPtr conn,
|
||||
priv->waitDispatch = thiscall;
|
||||
}
|
||||
|
||||
DEBUG("We have the buck %d %p %p", thiscall->proc_nr, priv->waitDispatch, thiscall);
|
||||
VIR_DEBUG("We have the buck %d %p %p", thiscall->proc_nr, priv->waitDispatch, thiscall);
|
||||
/*
|
||||
* The buck stops here!
|
||||
*
|
||||
@ -10509,7 +10509,7 @@ remoteIO(virConnectPtr conn,
|
||||
return -1;
|
||||
|
||||
cleanup:
|
||||
DEBUG("All done with our call %d %p %p", thiscall->proc_nr,
|
||||
VIR_DEBUG("All done with our call %d %p %p", thiscall->proc_nr,
|
||||
priv->waitDispatch, thiscall);
|
||||
if (thiscall->mode == REMOTE_MODE_ERROR) {
|
||||
/* Interop for virErrorNumber glitch in 0.8.0, if server is
|
||||
@ -10641,10 +10641,10 @@ remoteDomainEventFired(int watch,
|
||||
if (priv->waitDispatch)
|
||||
goto done;
|
||||
|
||||
DEBUG("Event fired %d %d %d %X", watch, fd, event, event);
|
||||
VIR_DEBUG("Event fired %d %d %d %X", watch, fd, event, event);
|
||||
|
||||
if (event & (VIR_EVENT_HANDLE_HANGUP | VIR_EVENT_HANDLE_ERROR)) {
|
||||
DEBUG("%s : VIR_EVENT_HANDLE_HANGUP or "
|
||||
VIR_DEBUG("%s : VIR_EVENT_HANDLE_HANGUP or "
|
||||
"VIR_EVENT_HANDLE_ERROR encountered", __FUNCTION__);
|
||||
virEventRemoveHandle(watch);
|
||||
priv->watch = -1;
|
||||
@ -10658,7 +10658,7 @@ remoteDomainEventFired(int watch,
|
||||
}
|
||||
|
||||
if (remoteIOHandleInput(conn, priv, 0) < 0)
|
||||
DEBUG0("Something went wrong during async message processing");
|
||||
VIR_DEBUG0("Something went wrong during async message processing");
|
||||
|
||||
done:
|
||||
remoteDriverUnlock(priv);
|
||||
|
@ -615,7 +615,7 @@ virSecurityDACSetProcessLabel(virSecurityManagerPtr mgr,
|
||||
{
|
||||
virSecurityDACDataPtr priv = virSecurityManagerGetPrivateData(mgr);
|
||||
|
||||
DEBUG("Dropping privileges of VM to %d:%d", priv->user, priv->group);
|
||||
VIR_DEBUG("Dropping privileges of VM to %d:%d", priv->user, priv->group);
|
||||
|
||||
if (virSetUIDGID(priv->user, priv->group) < 0)
|
||||
return -1;
|
||||
|
@ -475,7 +475,7 @@ virStorageBackendDiskPartBoundries(virStoragePoolObjPtr pool,
|
||||
unsigned long long cylinderSize = dev->geometry.heads *
|
||||
dev->geometry.sectors * SECTOR_SIZE;
|
||||
|
||||
DEBUG("find free area: allocation %llu, cyl size %llu", allocation,
|
||||
VIR_DEBUG("find free area: allocation %llu, cyl size %llu", allocation,
|
||||
cylinderSize);
|
||||
int partType = virStorageBackendDiskPartTypeToCreate(pool);
|
||||
|
||||
@ -529,7 +529,7 @@ virStorageBackendDiskPartBoundries(virStoragePoolObjPtr pool,
|
||||
return -1;
|
||||
}
|
||||
|
||||
DEBUG("aligned alloc %llu", alignedAllocation);
|
||||
VIR_DEBUG("aligned alloc %llu", alignedAllocation);
|
||||
*start = dev->freeExtents[smallestExtent].start;
|
||||
|
||||
if (partType == VIR_STORAGE_VOL_DISK_TYPE_LOGICAL) {
|
||||
@ -545,7 +545,7 @@ virStorageBackendDiskPartBoundries(virStoragePoolObjPtr pool,
|
||||
|
||||
/* counting in byte, we want the last byte of the current sector */
|
||||
*end -= 1;
|
||||
DEBUG("final aligned start %llu, end %llu", *start, *end);
|
||||
VIR_DEBUG("final aligned start %llu, end %llu", *start, *end);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -661,7 +661,7 @@ virStorageBackendDiskDeleteVol(virConnectPtr conn ATTRIBUTE_UNUSED,
|
||||
|
||||
devname = basename(devpath);
|
||||
srcname = basename(pool->def->source.devices[0].path);
|
||||
DEBUG("devname=%s, srcname=%s", devname, srcname);
|
||||
VIR_DEBUG("devname=%s, srcname=%s", devname, srcname);
|
||||
|
||||
isDevMapperDevice = virIsDevMapperDevice(devpath);
|
||||
|
||||
|
@ -1164,7 +1164,7 @@ static virDrvOpenStatus testOpen(virConnectPtr conn,
|
||||
|
||||
if ((privconn->domainEventTimer =
|
||||
virEventAddTimeout(-1, testDomainEventFlush, privconn, NULL)) < 0)
|
||||
DEBUG0("virEventAddTimeout failed: No addTimeoutImpl defined. "
|
||||
VIR_DEBUG0("virEventAddTimeout failed: No addTimeoutImpl defined. "
|
||||
"continuing without events.");
|
||||
testDriverUnlock(privconn);
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* logging.h: internal logging and debugging
|
||||
*
|
||||
* Copyright (C) 2006-2008 Red Hat, Inc.
|
||||
* Copyright (C) 2006-2008, 2011 Red Hat, Inc.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
@ -28,7 +28,7 @@
|
||||
/*
|
||||
* If configured with --enable-debug=yes then library calls
|
||||
* are printed to stderr for debugging or to an appropriate channel
|
||||
* defined at runtime of from the libvirt daemon configuration file
|
||||
* defined at runtime from the libvirt daemon configuration file
|
||||
*/
|
||||
# ifdef ENABLE_DEBUG
|
||||
# define VIR_DEBUG_INT(category, f, l, fmt,...) \
|
||||
@ -62,12 +62,6 @@
|
||||
# define VIR_ERROR0(msg) \
|
||||
VIR_ERROR_INT("file." __FILE__, __func__, __LINE__, "%s", msg)
|
||||
|
||||
/* Legacy compat */
|
||||
# define DEBUG(fmt,...) \
|
||||
VIR_DEBUG_INT("file." __FILE__, __func__, __LINE__, fmt, __VA_ARGS__)
|
||||
# define DEBUG0(msg) \
|
||||
VIR_DEBUG_INT("file." __FILE__, __func__, __LINE__, "%s", msg)
|
||||
|
||||
/*
|
||||
* To be made public
|
||||
*/
|
||||
|
@ -849,7 +849,7 @@ virRunWithHook(const char *const*argv,
|
||||
virReportOOMError();
|
||||
goto error;
|
||||
}
|
||||
DEBUG0(argv_str);
|
||||
VIR_DEBUG0(argv_str);
|
||||
|
||||
if ((execret = __virExec(argv, NULL, NULL,
|
||||
&childpid, -1, &outfd, &errfd,
|
||||
@ -865,9 +865,9 @@ virRunWithHook(const char *const*argv,
|
||||
}
|
||||
|
||||
if (outbuf)
|
||||
DEBUG("Command stdout: %s", outbuf);
|
||||
VIR_DEBUG("Command stdout: %s", outbuf);
|
||||
if (errbuf)
|
||||
DEBUG("Command stderr: %s", errbuf);
|
||||
VIR_DEBUG("Command stderr: %s", errbuf);
|
||||
|
||||
while ((waitret = waitpid(childpid, &exitstatus, 0) == -1) &&
|
||||
errno == EINTR);
|
||||
|
@ -87,7 +87,7 @@ int vboxRegister(void) {
|
||||
|
||||
/* Init the glue and get the API version. */
|
||||
if (VBoxCGlueInit(&uVersion) == 0) {
|
||||
DEBUG("VBoxCGlueInit found API version: %d.%d.%d (%u)",
|
||||
VIR_DEBUG("VBoxCGlueInit found API version: %d.%d.%d (%u)",
|
||||
uVersion / 1000000,
|
||||
uVersion % 1000000 / 1000,
|
||||
uVersion % 1000,
|
||||
@ -98,36 +98,36 @@ int vboxRegister(void) {
|
||||
* number 51, thus the version ranges in the if statements below.
|
||||
*/
|
||||
if (uVersion >= 2001052 && uVersion < 2002051) {
|
||||
DEBUG0("VirtualBox API version: 2.2");
|
||||
VIR_DEBUG0("VirtualBox API version: 2.2");
|
||||
driver = &vbox22Driver;
|
||||
networkDriver = &vbox22NetworkDriver;
|
||||
storageDriver = &vbox22StorageDriver;
|
||||
} else if (uVersion >= 2002051 && uVersion < 3000051) {
|
||||
DEBUG0("VirtualBox API version: 3.0");
|
||||
VIR_DEBUG0("VirtualBox API version: 3.0");
|
||||
driver = &vbox30Driver;
|
||||
networkDriver = &vbox30NetworkDriver;
|
||||
storageDriver = &vbox30StorageDriver;
|
||||
} else if (uVersion >= 3000051 && uVersion < 3001051) {
|
||||
DEBUG0("VirtualBox API version: 3.1");
|
||||
VIR_DEBUG0("VirtualBox API version: 3.1");
|
||||
driver = &vbox31Driver;
|
||||
networkDriver = &vbox31NetworkDriver;
|
||||
storageDriver = &vbox31StorageDriver;
|
||||
} else if (uVersion >= 3001051 && uVersion < 3002051) {
|
||||
DEBUG0("VirtualBox API version: 3.2");
|
||||
VIR_DEBUG0("VirtualBox API version: 3.2");
|
||||
driver = &vbox32Driver;
|
||||
networkDriver = &vbox32NetworkDriver;
|
||||
storageDriver = &vbox32StorageDriver;
|
||||
} else if (uVersion >= 3002051 && uVersion < 4000051) {
|
||||
DEBUG0("VirtualBox API version: 4.0");
|
||||
VIR_DEBUG0("VirtualBox API version: 4.0");
|
||||
driver = &vbox40Driver;
|
||||
networkDriver = &vbox40NetworkDriver;
|
||||
storageDriver = &vbox40StorageDriver;
|
||||
} else {
|
||||
DEBUG0("Unsupport VirtualBox API version");
|
||||
VIR_DEBUG0("Unsupport VirtualBox API version");
|
||||
}
|
||||
|
||||
} else {
|
||||
DEBUG0("VBoxCGlueInit failed, using dummy driver");
|
||||
VIR_DEBUG0("VBoxCGlueInit failed, using dummy driver");
|
||||
}
|
||||
|
||||
if (virRegisterDriver(driver) < 0)
|
||||
|
@ -143,14 +143,14 @@ if (strUtf16) {\
|
||||
\
|
||||
g_pVBoxGlobalData->pFuncs->pfnUtf16ToUtf8(strUtf16, &strUtf8);\
|
||||
if (strUtf8) {\
|
||||
DEBUG("%s: %s", msg, strUtf8);\
|
||||
VIR_DEBUG("%s: %s", msg, strUtf8);\
|
||||
g_pVBoxGlobalData->pFuncs->pfnUtf8Free(strUtf8);\
|
||||
}\
|
||||
}
|
||||
|
||||
#define DEBUGUUID(msg, iid) \
|
||||
{\
|
||||
DEBUG (msg ": {%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}",\
|
||||
VIR_DEBUG (msg ": {%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}",\
|
||||
(unsigned)(iid)->m0,\
|
||||
(unsigned)(iid)->m1,\
|
||||
(unsigned)(iid)->m2,\
|
||||
@ -617,7 +617,7 @@ static char *vboxGenerateMediumName(PRUint32 storageBus,
|
||||
|
||||
name = virIndexToDiskName(total, prefix);
|
||||
|
||||
DEBUG("name=%s, total=%d, storageBus=%u, deviceInst=%d, "
|
||||
VIR_DEBUG("name=%s, total=%d, storageBus=%u, deviceInst=%d, "
|
||||
"devicePort=%d deviceSlot=%d, maxPortPerInst=%u maxSlotPerPort=%u",
|
||||
NULLSTR(name), total, storageBus, deviceInst, devicePort,
|
||||
deviceSlot, maxPortPerInst, maxSlotPerPort);
|
||||
@ -677,7 +677,7 @@ static bool vboxGetDeviceDetails(const char *deviceName,
|
||||
*devicePort = (total % (maxPortPerInst * maxSlotPerPort)) / maxSlotPerPort;
|
||||
*deviceSlot = (total % (maxPortPerInst * maxSlotPerPort)) % maxSlotPerPort;
|
||||
|
||||
DEBUG("name=%s, total=%d, storageBus=%u, deviceInst=%d, "
|
||||
VIR_DEBUG("name=%s, total=%d, storageBus=%u, deviceInst=%d, "
|
||||
"devicePort=%d deviceSlot=%d, maxPortPerInst=%u maxSlotPerPort=%u",
|
||||
deviceName, total, storageBus, *deviceInst, *devicePort,
|
||||
*deviceSlot, maxPortPerInst, maxSlotPerPort);
|
||||
@ -1027,14 +1027,14 @@ static virDrvOpenStatus vboxOpen(virConnectPtr conn,
|
||||
#endif /* !(VBOX_API_VERSION == 2002) */
|
||||
|
||||
conn->privateData = data;
|
||||
DEBUG0("in vboxOpen");
|
||||
VIR_DEBUG0("in vboxOpen");
|
||||
|
||||
return VIR_DRV_OPEN_SUCCESS;
|
||||
}
|
||||
|
||||
static int vboxClose(virConnectPtr conn) {
|
||||
vboxGlobalData *data = conn->privateData;
|
||||
DEBUG("%s: in vboxClose",conn->driver->name);
|
||||
VIR_DEBUG("%s: in vboxClose",conn->driver->name);
|
||||
|
||||
vboxUninitialize(data);
|
||||
conn->privateData = NULL;
|
||||
@ -1044,7 +1044,7 @@ static int vboxClose(virConnectPtr conn) {
|
||||
|
||||
static int vboxGetVersion(virConnectPtr conn, unsigned long *version) {
|
||||
vboxGlobalData *data = conn->privateData;
|
||||
DEBUG("%s: in vboxGetVersion",conn->driver->name);
|
||||
VIR_DEBUG("%s: in vboxGetVersion",conn->driver->name);
|
||||
|
||||
vboxDriverLock(data);
|
||||
*version = data->version;
|
||||
@ -3560,22 +3560,22 @@ vboxSetBootDeviceOrder(virDomainDefPtr def, vboxGlobalData *data,
|
||||
PRUint32 maxBootPosition = 0;
|
||||
int i = 0;
|
||||
|
||||
DEBUG("def->os.type %s", def->os.type);
|
||||
DEBUG("def->os.arch %s", def->os.arch);
|
||||
DEBUG("def->os.machine %s", def->os.machine);
|
||||
DEBUG("def->os.nBootDevs %d", def->os.nBootDevs);
|
||||
DEBUG("def->os.bootDevs[0] %d", def->os.bootDevs[0]);
|
||||
DEBUG("def->os.bootDevs[1] %d", def->os.bootDevs[1]);
|
||||
DEBUG("def->os.bootDevs[2] %d", def->os.bootDevs[2]);
|
||||
DEBUG("def->os.bootDevs[3] %d", def->os.bootDevs[3]);
|
||||
DEBUG("def->os.init %s", def->os.init);
|
||||
DEBUG("def->os.kernel %s", def->os.kernel);
|
||||
DEBUG("def->os.initrd %s", def->os.initrd);
|
||||
DEBUG("def->os.cmdline %s", def->os.cmdline);
|
||||
DEBUG("def->os.root %s", def->os.root);
|
||||
DEBUG("def->os.loader %s", def->os.loader);
|
||||
DEBUG("def->os.bootloader %s", def->os.bootloader);
|
||||
DEBUG("def->os.bootloaderArgs %s", def->os.bootloaderArgs);
|
||||
VIR_DEBUG("def->os.type %s", def->os.type);
|
||||
VIR_DEBUG("def->os.arch %s", def->os.arch);
|
||||
VIR_DEBUG("def->os.machine %s", def->os.machine);
|
||||
VIR_DEBUG("def->os.nBootDevs %d", def->os.nBootDevs);
|
||||
VIR_DEBUG("def->os.bootDevs[0] %d", def->os.bootDevs[0]);
|
||||
VIR_DEBUG("def->os.bootDevs[1] %d", def->os.bootDevs[1]);
|
||||
VIR_DEBUG("def->os.bootDevs[2] %d", def->os.bootDevs[2]);
|
||||
VIR_DEBUG("def->os.bootDevs[3] %d", def->os.bootDevs[3]);
|
||||
VIR_DEBUG("def->os.init %s", def->os.init);
|
||||
VIR_DEBUG("def->os.kernel %s", def->os.kernel);
|
||||
VIR_DEBUG("def->os.initrd %s", def->os.initrd);
|
||||
VIR_DEBUG("def->os.cmdline %s", def->os.cmdline);
|
||||
VIR_DEBUG("def->os.root %s", def->os.root);
|
||||
VIR_DEBUG("def->os.loader %s", def->os.loader);
|
||||
VIR_DEBUG("def->os.bootloader %s", def->os.bootloader);
|
||||
VIR_DEBUG("def->os.bootloaderArgs %s", def->os.bootloaderArgs);
|
||||
|
||||
data->vboxObj->vtbl->GetSystemProperties(data->vboxObj, &systemProperties);
|
||||
if (systemProperties) {
|
||||
@ -3617,17 +3617,17 @@ vboxAttachDrives(virDomainDefPtr def, vboxGlobalData *data, IMachine *machine)
|
||||
return;
|
||||
|
||||
for (i = 0; i < def->ndisks; i++) {
|
||||
DEBUG("disk(%d) type: %d", i, def->disks[i]->type);
|
||||
DEBUG("disk(%d) device: %d", i, def->disks[i]->device);
|
||||
DEBUG("disk(%d) bus: %d", i, def->disks[i]->bus);
|
||||
DEBUG("disk(%d) src: %s", i, def->disks[i]->src);
|
||||
DEBUG("disk(%d) dst: %s", i, def->disks[i]->dst);
|
||||
DEBUG("disk(%d) driverName: %s", i, def->disks[i]->driverName);
|
||||
DEBUG("disk(%d) driverType: %s", i, def->disks[i]->driverType);
|
||||
DEBUG("disk(%d) cachemode: %d", i, def->disks[i]->cachemode);
|
||||
DEBUG("disk(%d) readonly: %s", i, (def->disks[i]->readonly
|
||||
VIR_DEBUG("disk(%d) type: %d", i, def->disks[i]->type);
|
||||
VIR_DEBUG("disk(%d) device: %d", i, def->disks[i]->device);
|
||||
VIR_DEBUG("disk(%d) bus: %d", i, def->disks[i]->bus);
|
||||
VIR_DEBUG("disk(%d) src: %s", i, def->disks[i]->src);
|
||||
VIR_DEBUG("disk(%d) dst: %s", i, def->disks[i]->dst);
|
||||
VIR_DEBUG("disk(%d) driverName: %s", i, def->disks[i]->driverName);
|
||||
VIR_DEBUG("disk(%d) driverType: %s", i, def->disks[i]->driverType);
|
||||
VIR_DEBUG("disk(%d) cachemode: %d", i, def->disks[i]->cachemode);
|
||||
VIR_DEBUG("disk(%d) readonly: %s", i, (def->disks[i]->readonly
|
||||
? "True" : "False"));
|
||||
DEBUG("disk(%d) shared: %s", i, (def->disks[i]->shared
|
||||
VIR_DEBUG("disk(%d) shared: %s", i, (def->disks[i]->shared
|
||||
? "True" : "False"));
|
||||
|
||||
if (def->disks[i]->device == VIR_DOMAIN_DISK_DEVICE_CDROM) {
|
||||
@ -3734,15 +3734,15 @@ vboxAttachDrives(virDomainDefPtr def, vboxGlobalData *data, IMachine *machine)
|
||||
if (def->disks[i]->readonly) {
|
||||
hardDisk->vtbl->SetType(hardDisk,
|
||||
HardDiskType_Immutable);
|
||||
DEBUG0("setting harddisk to readonly");
|
||||
VIR_DEBUG0("setting harddisk to readonly");
|
||||
} else if (!def->disks[i]->readonly) {
|
||||
hardDisk->vtbl->SetType(hardDisk,
|
||||
HardDiskType_Normal);
|
||||
DEBUG0("setting harddisk type to normal");
|
||||
VIR_DEBUG0("setting harddisk type to normal");
|
||||
}
|
||||
if (def->disks[i]->bus == VIR_DOMAIN_DISK_BUS_IDE) {
|
||||
if (STREQ(def->disks[i]->dst, "hdc")) {
|
||||
DEBUG0("Not connecting harddisk to hdc as hdc"
|
||||
VIR_DEBUG0("Not connecting harddisk to hdc as hdc"
|
||||
" is taken by CD/DVD Drive");
|
||||
} else {
|
||||
PRInt32 channel = 0;
|
||||
@ -3896,17 +3896,17 @@ vboxAttachDrives(virDomainDefPtr def, vboxGlobalData *data, IMachine *machine)
|
||||
}
|
||||
|
||||
for (i = 0; i < def->ndisks && !error; i++) {
|
||||
DEBUG("disk(%d) type: %d", i, def->disks[i]->type);
|
||||
DEBUG("disk(%d) device: %d", i, def->disks[i]->device);
|
||||
DEBUG("disk(%d) bus: %d", i, def->disks[i]->bus);
|
||||
DEBUG("disk(%d) src: %s", i, def->disks[i]->src);
|
||||
DEBUG("disk(%d) dst: %s", i, def->disks[i]->dst);
|
||||
DEBUG("disk(%d) driverName: %s", i, def->disks[i]->driverName);
|
||||
DEBUG("disk(%d) driverType: %s", i, def->disks[i]->driverType);
|
||||
DEBUG("disk(%d) cachemode: %d", i, def->disks[i]->cachemode);
|
||||
DEBUG("disk(%d) readonly: %s", i, (def->disks[i]->readonly
|
||||
VIR_DEBUG("disk(%d) type: %d", i, def->disks[i]->type);
|
||||
VIR_DEBUG("disk(%d) device: %d", i, def->disks[i]->device);
|
||||
VIR_DEBUG("disk(%d) bus: %d", i, def->disks[i]->bus);
|
||||
VIR_DEBUG("disk(%d) src: %s", i, def->disks[i]->src);
|
||||
VIR_DEBUG("disk(%d) dst: %s", i, def->disks[i]->dst);
|
||||
VIR_DEBUG("disk(%d) driverName: %s", i, def->disks[i]->driverName);
|
||||
VIR_DEBUG("disk(%d) driverType: %s", i, def->disks[i]->driverType);
|
||||
VIR_DEBUG("disk(%d) cachemode: %d", i, def->disks[i]->cachemode);
|
||||
VIR_DEBUG("disk(%d) readonly: %s", i, (def->disks[i]->readonly
|
||||
? "True" : "False"));
|
||||
DEBUG("disk(%d) shared: %s", i, (def->disks[i]->shared
|
||||
VIR_DEBUG("disk(%d) shared: %s", i, (def->disks[i]->shared
|
||||
? "True" : "False"));
|
||||
|
||||
if (def->disks[i]->type == VIR_DOMAIN_DISK_TYPE_FILE &&
|
||||
@ -4017,10 +4017,10 @@ vboxAttachDrives(virDomainDefPtr def, vboxGlobalData *data, IMachine *machine)
|
||||
if (def->disks[i]->device == VIR_DOMAIN_DISK_DEVICE_DISK) {
|
||||
if (def->disks[i]->readonly) {
|
||||
medium->vtbl->SetType(medium, MediumType_Immutable);
|
||||
DEBUG0("setting harddisk to immutable");
|
||||
VIR_DEBUG0("setting harddisk to immutable");
|
||||
} else if (!def->disks[i]->readonly) {
|
||||
medium->vtbl->SetType(medium, MediumType_Normal);
|
||||
DEBUG0("setting harddisk type to normal");
|
||||
VIR_DEBUG0("setting harddisk type to normal");
|
||||
}
|
||||
}
|
||||
|
||||
@ -4129,8 +4129,8 @@ vboxAttachNetwork(virDomainDefPtr def, vboxGlobalData *data, IMachine *machine)
|
||||
systemProperties = NULL;
|
||||
}
|
||||
|
||||
DEBUG("Number of Network Cards to be connected: %d", def->nnets);
|
||||
DEBUG("Number of Network Cards available: %d", networkAdapterCount);
|
||||
VIR_DEBUG("Number of Network Cards to be connected: %d", def->nnets);
|
||||
VIR_DEBUG("Number of Network Cards available: %d", networkAdapterCount);
|
||||
|
||||
for (i = 0; (i < def->nnets) && (i < networkAdapterCount); i++) {
|
||||
INetworkAdapter *adapter = NULL;
|
||||
@ -4149,20 +4149,20 @@ vboxAttachNetwork(virDomainDefPtr def, vboxGlobalData *data, IMachine *machine)
|
||||
def->nets[i]->mac[5]);
|
||||
macaddrvbox[VIR_MAC_STRING_BUFLEN - 6] = '\0';
|
||||
|
||||
DEBUG("NIC(%d): Type: %d", i, def->nets[i]->type);
|
||||
DEBUG("NIC(%d): Model: %s", i, def->nets[i]->model);
|
||||
DEBUG("NIC(%d): Mac: %s", i, macaddr);
|
||||
DEBUG("NIC(%d): ifname: %s", i, def->nets[i]->ifname);
|
||||
VIR_DEBUG("NIC(%d): Type: %d", i, def->nets[i]->type);
|
||||
VIR_DEBUG("NIC(%d): Model: %s", i, def->nets[i]->model);
|
||||
VIR_DEBUG("NIC(%d): Mac: %s", i, macaddr);
|
||||
VIR_DEBUG("NIC(%d): ifname: %s", i, def->nets[i]->ifname);
|
||||
if (def->nets[i]->type == VIR_DOMAIN_NET_TYPE_NETWORK) {
|
||||
DEBUG("NIC(%d): name: %s", i, def->nets[i]->data.network.name);
|
||||
VIR_DEBUG("NIC(%d): name: %s", i, def->nets[i]->data.network.name);
|
||||
} else if (def->nets[i]->type == VIR_DOMAIN_NET_TYPE_INTERNAL) {
|
||||
DEBUG("NIC(%d): name: %s", i, def->nets[i]->data.internal.name);
|
||||
VIR_DEBUG("NIC(%d): name: %s", i, def->nets[i]->data.internal.name);
|
||||
} else if (def->nets[i]->type == VIR_DOMAIN_NET_TYPE_USER) {
|
||||
DEBUG("NIC(%d): NAT.", i);
|
||||
VIR_DEBUG("NIC(%d): NAT.", i);
|
||||
} else if (def->nets[i]->type == VIR_DOMAIN_NET_TYPE_BRIDGE) {
|
||||
DEBUG("NIC(%d): brname: %s", i, def->nets[i]->data.bridge.brname);
|
||||
DEBUG("NIC(%d): script: %s", i, def->nets[i]->data.bridge.script);
|
||||
DEBUG("NIC(%d): ipaddr: %s", i, def->nets[i]->data.bridge.ipaddr);
|
||||
VIR_DEBUG("NIC(%d): brname: %s", i, def->nets[i]->data.bridge.brname);
|
||||
VIR_DEBUG("NIC(%d): script: %s", i, def->nets[i]->data.bridge.script);
|
||||
VIR_DEBUG("NIC(%d): ipaddr: %s", i, def->nets[i]->data.bridge.ipaddr);
|
||||
}
|
||||
|
||||
machine->vtbl->GetNetworkAdapter(machine, i, &adapter);
|
||||
@ -4263,13 +4263,13 @@ vboxAttachSerial(virDomainDefPtr def, vboxGlobalData *data, IMachine *machine)
|
||||
systemProperties = NULL;
|
||||
}
|
||||
|
||||
DEBUG("Number of Serial Ports to be connected: %d", def->nserials);
|
||||
DEBUG("Number of Serial Ports available: %d", serialPortCount);
|
||||
VIR_DEBUG("Number of Serial Ports to be connected: %d", def->nserials);
|
||||
VIR_DEBUG("Number of Serial Ports available: %d", serialPortCount);
|
||||
for (i = 0; (i < def->nserials) && (i < serialPortCount); i++) {
|
||||
ISerialPort *serialPort = NULL;
|
||||
|
||||
DEBUG("SerialPort(%d): Type: %d", i, def->serials[i]->source.type);
|
||||
DEBUG("SerialPort(%d): target.port: %d", i,
|
||||
VIR_DEBUG("SerialPort(%d): Type: %d", i, def->serials[i]->source.type);
|
||||
VIR_DEBUG("SerialPort(%d): target.port: %d", i,
|
||||
def->serials[i]->target.port);
|
||||
|
||||
machine->vtbl->GetSerialPort(machine, i, &serialPort);
|
||||
@ -4296,12 +4296,12 @@ vboxAttachSerial(virDomainDefPtr def, vboxGlobalData *data, IMachine *machine)
|
||||
if (def->serials[i]->target.port == 0) {
|
||||
serialPort->vtbl->SetIRQ(serialPort, 4);
|
||||
serialPort->vtbl->SetIOBase(serialPort, 1016);
|
||||
DEBUG(" serialPort-%d irq: %d, iobase 0x%x, path: %s",
|
||||
VIR_DEBUG(" serialPort-%d irq: %d, iobase 0x%x, path: %s",
|
||||
i, 4, 1016, def->serials[i]->source.data.file.path);
|
||||
} else if (def->serials[i]->target.port == 1) {
|
||||
serialPort->vtbl->SetIRQ(serialPort, 3);
|
||||
serialPort->vtbl->SetIOBase(serialPort, 760);
|
||||
DEBUG(" serialPort-%d irq: %d, iobase 0x%x, path: %s",
|
||||
VIR_DEBUG(" serialPort-%d irq: %d, iobase 0x%x, path: %s",
|
||||
i, 3, 760, def->serials[i]->source.data.file.path);
|
||||
}
|
||||
|
||||
@ -4342,13 +4342,13 @@ vboxAttachParallel(virDomainDefPtr def, vboxGlobalData *data, IMachine *machine)
|
||||
systemProperties = NULL;
|
||||
}
|
||||
|
||||
DEBUG("Number of Parallel Ports to be connected: %d", def->nparallels);
|
||||
DEBUG("Number of Parallel Ports available: %d", parallelPortCount);
|
||||
VIR_DEBUG("Number of Parallel Ports to be connected: %d", def->nparallels);
|
||||
VIR_DEBUG("Number of Parallel Ports available: %d", parallelPortCount);
|
||||
for (i = 0; (i < def->nparallels) && (i < parallelPortCount); i++) {
|
||||
IParallelPort *parallelPort = NULL;
|
||||
|
||||
DEBUG("ParallelPort(%d): Type: %d", i, def->parallels[i]->source.type);
|
||||
DEBUG("ParallelPort(%d): target.port: %d", i,
|
||||
VIR_DEBUG("ParallelPort(%d): Type: %d", i, def->parallels[i]->source.type);
|
||||
VIR_DEBUG("ParallelPort(%d): target.port: %d", i,
|
||||
def->parallels[i]->target.port);
|
||||
|
||||
machine->vtbl->GetParallelPort(machine, i, ¶llelPort);
|
||||
@ -4370,12 +4370,12 @@ vboxAttachParallel(virDomainDefPtr def, vboxGlobalData *data, IMachine *machine)
|
||||
if (i == 0) {
|
||||
parallelPort->vtbl->SetIRQ(parallelPort, 7);
|
||||
parallelPort->vtbl->SetIOBase(parallelPort, 888);
|
||||
DEBUG(" parallePort-%d irq: %d, iobase 0x%x, path: %s",
|
||||
VIR_DEBUG(" parallePort-%d irq: %d, iobase 0x%x, path: %s",
|
||||
i, 7, 888, def->parallels[i]->source.data.file.path);
|
||||
} else if (i == 1) {
|
||||
parallelPort->vtbl->SetIRQ(parallelPort, 5);
|
||||
parallelPort->vtbl->SetIOBase(parallelPort, 632);
|
||||
DEBUG(" parallePort-%d irq: %d, iobase 0x%x, path: %s",
|
||||
VIR_DEBUG(" parallePort-%d irq: %d, iobase 0x%x, path: %s",
|
||||
i, 5, 632, def->parallels[i]->source.data.file.path);
|
||||
}
|
||||
}
|
||||
@ -4446,20 +4446,20 @@ vboxAttachDisplay(virDomainDefPtr def, vboxGlobalData *data, IMachine *machine)
|
||||
#endif /* VBOX_API_VERSION >= 4000 */
|
||||
if (VRDxServer) {
|
||||
VRDxServer->vtbl->SetEnabled(VRDxServer, PR_TRUE);
|
||||
DEBUG0("VRDP Support turned ON.");
|
||||
VIR_DEBUG0("VRDP Support turned ON.");
|
||||
|
||||
#if VBOX_API_VERSION < 3001
|
||||
if (def->graphics[i]->data.rdp.port) {
|
||||
VRDxServer->vtbl->SetPort(VRDxServer,
|
||||
def->graphics[i]->data.rdp.port);
|
||||
DEBUG("VRDP Port changed to: %d",
|
||||
VIR_DEBUG("VRDP Port changed to: %d",
|
||||
def->graphics[i]->data.rdp.port);
|
||||
} else if (def->graphics[i]->data.rdp.autoport) {
|
||||
/* Setting the port to 0 will reset its value to
|
||||
* the default one which is 3389 currently
|
||||
*/
|
||||
VRDxServer->vtbl->SetPort(VRDxServer, 0);
|
||||
DEBUG0("VRDP Port changed to default, which is 3389 currently");
|
||||
VIR_DEBUG0("VRDP Port changed to default, which is 3389 currently");
|
||||
}
|
||||
#elif VBOX_API_VERSION < 4000 /* 3001 <= VBOX_API_VERSION < 4000 */
|
||||
PRUnichar *portUtf16 = NULL;
|
||||
@ -4480,13 +4480,13 @@ vboxAttachDisplay(virDomainDefPtr def, vboxGlobalData *data, IMachine *machine)
|
||||
if (def->graphics[i]->data.rdp.replaceUser) {
|
||||
VRDxServer->vtbl->SetReuseSingleConnection(VRDxServer,
|
||||
PR_TRUE);
|
||||
DEBUG0("VRDP set to reuse single connection");
|
||||
VIR_DEBUG0("VRDP set to reuse single connection");
|
||||
}
|
||||
|
||||
if (def->graphics[i]->data.rdp.multiUser) {
|
||||
VRDxServer->vtbl->SetAllowMultiConnection(VRDxServer,
|
||||
PR_TRUE);
|
||||
DEBUG0("VRDP set to allow multiple connection");
|
||||
VIR_DEBUG0("VRDP set to allow multiple connection");
|
||||
}
|
||||
|
||||
if (def->graphics[i]->data.rdp.listenAddr) {
|
||||
@ -4506,7 +4506,7 @@ vboxAttachDisplay(virDomainDefPtr def, vboxGlobalData *data, IMachine *machine)
|
||||
netAddressUtf16);
|
||||
VBOX_UTF16_FREE(netAddressKey);
|
||||
#endif /* VBOX_API_VERSION >= 4000 */
|
||||
DEBUG("VRDP listen address is set to: %s",
|
||||
VIR_DEBUG("VRDP listen address is set to: %s",
|
||||
def->graphics[i]->data.rdp.listenAddr);
|
||||
|
||||
VBOX_UTF16_FREE(netAddressUtf16);
|
||||
@ -4639,7 +4639,7 @@ vboxAttachUSB(virDomainDefPtr def, vboxGlobalData *data, IMachine *machine)
|
||||
VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_USB) {
|
||||
if (def->hostdevs[i]->source.subsys.u.usb.vendor ||
|
||||
def->hostdevs[i]->source.subsys.u.usb.product) {
|
||||
DEBUG("USB Device detected, VendorId:0x%x, ProductId:0x%x",
|
||||
VIR_DEBUG("USB Device detected, VendorId:0x%x, ProductId:0x%x",
|
||||
def->hostdevs[i]->source.subsys.u.usb.vendor,
|
||||
def->hostdevs[i]->source.subsys.u.usb.product);
|
||||
isUSB = true;
|
||||
@ -6322,7 +6322,7 @@ vboxCallbackOnMachineStateChange(IVirtualBoxCallback *pThis,
|
||||
g_pVBoxGlobalData->domainEventDispatching = 1;
|
||||
vboxDriverLock(g_pVBoxGlobalData);
|
||||
|
||||
DEBUG("IVirtualBoxCallback: %p, State: %d", pThis, state);
|
||||
VIR_DEBUG("IVirtualBoxCallback: %p, State: %d", pThis, state);
|
||||
DEBUGPRUnichar("machineId", machineId);
|
||||
|
||||
if (machineId) {
|
||||
@ -6389,7 +6389,7 @@ static nsresult PR_COM_METHOD
|
||||
vboxCallbackOnMachineDataChange(IVirtualBoxCallback *pThis,
|
||||
PRUnichar *machineId)
|
||||
{
|
||||
DEBUG("IVirtualBoxCallback: %p", pThis);
|
||||
VIR_DEBUG("IVirtualBoxCallback: %p", pThis);
|
||||
DEBUGPRUnichar("machineId", machineId);
|
||||
|
||||
return NS_OK;
|
||||
@ -6402,7 +6402,7 @@ vboxCallbackOnExtraDataCanChange(IVirtualBoxCallback *pThis,
|
||||
PRUnichar **error ATTRIBUTE_UNUSED,
|
||||
PRBool *allowChange)
|
||||
{
|
||||
DEBUG("IVirtualBoxCallback: %p, allowChange: %s", pThis, *allowChange ? "true" : "false");
|
||||
VIR_DEBUG("IVirtualBoxCallback: %p, allowChange: %s", pThis, *allowChange ? "true" : "false");
|
||||
DEBUGPRUnichar("machineId", machineId);
|
||||
DEBUGPRUnichar("key", key);
|
||||
DEBUGPRUnichar("value", value);
|
||||
@ -6414,7 +6414,7 @@ static nsresult PR_COM_METHOD
|
||||
vboxCallbackOnExtraDataChange(IVirtualBoxCallback *pThis, PRUnichar *machineId,
|
||||
PRUnichar *key, PRUnichar *value)
|
||||
{
|
||||
DEBUG("IVirtualBoxCallback: %p", pThis);
|
||||
VIR_DEBUG("IVirtualBoxCallback: %p", pThis);
|
||||
DEBUGPRUnichar("machineId", machineId);
|
||||
DEBUGPRUnichar("key", key);
|
||||
DEBUGPRUnichar("value", value);
|
||||
@ -6427,8 +6427,8 @@ static nsresult PR_COM_METHOD
|
||||
vboxCallbackOnMediaRegistered(IVirtualBoxCallback *pThis, PRUnichar *mediaId,
|
||||
PRUint32 mediaType, PRBool registered)
|
||||
{
|
||||
DEBUG("IVirtualBoxCallback: %p, registered: %s", pThis, registered ? "true" : "false");
|
||||
DEBUG("mediaType: %d", mediaType);
|
||||
VIR_DEBUG("IVirtualBoxCallback: %p, registered: %s", pThis, registered ? "true" : "false");
|
||||
VIR_DEBUG("mediaType: %d", mediaType);
|
||||
DEBUGPRUnichar("mediaId", mediaId);
|
||||
|
||||
return NS_OK;
|
||||
@ -6447,7 +6447,7 @@ vboxCallbackOnMachineRegistered(IVirtualBoxCallback *pThis,
|
||||
g_pVBoxGlobalData->domainEventDispatching = 1;
|
||||
vboxDriverLock(g_pVBoxGlobalData);
|
||||
|
||||
DEBUG("IVirtualBoxCallback: %p, registered: %s", pThis, registered ? "true" : "false");
|
||||
VIR_DEBUG("IVirtualBoxCallback: %p, registered: %s", pThis, registered ? "true" : "false");
|
||||
DEBUGPRUnichar("machineId", machineId);
|
||||
|
||||
if (machineId) {
|
||||
@ -6499,7 +6499,7 @@ static nsresult PR_COM_METHOD
|
||||
vboxCallbackOnSessionStateChange(IVirtualBoxCallback *pThis,
|
||||
PRUnichar *machineId, PRUint32 state)
|
||||
{
|
||||
DEBUG("IVirtualBoxCallback: %p, state: %d", pThis, state);
|
||||
VIR_DEBUG("IVirtualBoxCallback: %p, state: %d", pThis, state);
|
||||
DEBUGPRUnichar("machineId", machineId);
|
||||
|
||||
return NS_OK;
|
||||
@ -6509,7 +6509,7 @@ static nsresult PR_COM_METHOD
|
||||
vboxCallbackOnSnapshotTaken(IVirtualBoxCallback *pThis, PRUnichar *machineId,
|
||||
PRUnichar *snapshotId)
|
||||
{
|
||||
DEBUG("IVirtualBoxCallback: %p", pThis);
|
||||
VIR_DEBUG("IVirtualBoxCallback: %p", pThis);
|
||||
DEBUGPRUnichar("machineId", machineId);
|
||||
DEBUGPRUnichar("snapshotId", snapshotId);
|
||||
|
||||
@ -6520,7 +6520,7 @@ static nsresult PR_COM_METHOD
|
||||
vboxCallbackOnSnapshotDiscarded(IVirtualBoxCallback *pThis, PRUnichar *machineId,
|
||||
PRUnichar *snapshotId)
|
||||
{
|
||||
DEBUG("IVirtualBoxCallback: %p", pThis);
|
||||
VIR_DEBUG("IVirtualBoxCallback: %p", pThis);
|
||||
DEBUGPRUnichar("machineId", machineId);
|
||||
DEBUGPRUnichar("snapshotId", snapshotId);
|
||||
|
||||
@ -6531,7 +6531,7 @@ static nsresult PR_COM_METHOD
|
||||
vboxCallbackOnSnapshotChange(IVirtualBoxCallback *pThis, PRUnichar *machineId,
|
||||
PRUnichar *snapshotId)
|
||||
{
|
||||
DEBUG("IVirtualBoxCallback: %p", pThis);
|
||||
VIR_DEBUG("IVirtualBoxCallback: %p", pThis);
|
||||
DEBUGPRUnichar("machineId", machineId);
|
||||
DEBUGPRUnichar("snapshotId", snapshotId);
|
||||
|
||||
@ -6543,7 +6543,7 @@ vboxCallbackOnGuestPropertyChange(IVirtualBoxCallback *pThis,
|
||||
PRUnichar *machineId, PRUnichar *name,
|
||||
PRUnichar *value, PRUnichar *flags)
|
||||
{
|
||||
DEBUG("IVirtualBoxCallback: %p", pThis);
|
||||
VIR_DEBUG("IVirtualBoxCallback: %p", pThis);
|
||||
DEBUGPRUnichar("machineId", machineId);
|
||||
DEBUGPRUnichar("name", name);
|
||||
DEBUGPRUnichar("value", value);
|
||||
@ -6559,7 +6559,7 @@ vboxCallbackAddRef(nsISupports *pThis)
|
||||
|
||||
c = ++g_pVBoxGlobalData->vboxCallBackRefCount;
|
||||
|
||||
DEBUG("pThis: %p, vboxCallback AddRef: %d", pThis, c);
|
||||
VIR_DEBUG("pThis: %p, vboxCallback AddRef: %d", pThis, c);
|
||||
|
||||
return c;
|
||||
}
|
||||
@ -6576,7 +6576,7 @@ vboxCallbackRelease(nsISupports *pThis)
|
||||
VIR_FREE(pThis);
|
||||
}
|
||||
|
||||
DEBUG("pThis: %p, vboxCallback Release: %d", pThis, c);
|
||||
VIR_DEBUG("pThis: %p, vboxCallback Release: %d", pThis, c);
|
||||
|
||||
return c;
|
||||
}
|
||||
@ -6594,13 +6594,13 @@ vboxCallbackQueryInterface(nsISupports *pThis, const nsID *iid, void **resultp)
|
||||
g_pVBoxGlobalData->vboxCallBackRefCount++;
|
||||
*resultp = that;
|
||||
|
||||
DEBUG("pThis: %p, vboxCallback QueryInterface: %d", pThis, g_pVBoxGlobalData->vboxCallBackRefCount);
|
||||
VIR_DEBUG("pThis: %p, vboxCallback QueryInterface: %d", pThis, g_pVBoxGlobalData->vboxCallBackRefCount);
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
||||
DEBUG("pThis: %p, vboxCallback QueryInterface didn't find a matching interface", pThis);
|
||||
VIR_DEBUG("pThis: %p, vboxCallback QueryInterface didn't find a matching interface", pThis);
|
||||
DEBUGUUID("The UUID Callback Interface expects", iid);
|
||||
DEBUGUUID("The UUID Callback Interface got", &ivirtualboxCallbackUUID);
|
||||
return NS_NOINTERFACE;
|
||||
@ -6708,7 +6708,7 @@ static int vboxDomainEventRegister (virConnectPtr conn,
|
||||
|
||||
ret = virDomainEventCallbackListAdd(conn, data->domainEventCallbacks,
|
||||
callback, opaque, freecb);
|
||||
DEBUG("virDomainEventCallbackListAdd (ret = %d) ( conn: %p, "
|
||||
VIR_DEBUG("virDomainEventCallbackListAdd (ret = %d) ( conn: %p, "
|
||||
"data->domainEventCallbacks: %p, callback: %p, opaque: %p, "
|
||||
"freecb: %p )", ret, conn, data->domainEventCallbacks, callback,
|
||||
opaque, freecb);
|
||||
@ -6809,7 +6809,7 @@ static int vboxDomainEventRegisterAny(virConnectPtr conn,
|
||||
ret = virDomainEventCallbackListAddID(conn, data->domainEventCallbacks,
|
||||
dom, eventID,
|
||||
callback, opaque, freecb);
|
||||
DEBUG("virDomainEventCallbackListAddID (ret = %d) ( conn: %p, "
|
||||
VIR_DEBUG("virDomainEventCallbackListAddID (ret = %d) ( conn: %p, "
|
||||
"data->domainEventCallbacks: %p, callback: %p, opaque: %p, "
|
||||
"freecb: %p )", ret, conn, data->domainEventCallbacks, callback,
|
||||
opaque, freecb);
|
||||
@ -6881,7 +6881,7 @@ static virDrvOpenStatus vboxNetworkOpen(virConnectPtr conn,
|
||||
(data->vboxSession == NULL))
|
||||
goto cleanup;
|
||||
|
||||
DEBUG0("network initialized");
|
||||
VIR_DEBUG0("network initialized");
|
||||
/* conn->networkPrivateData = some network specific data */
|
||||
return VIR_DRV_OPEN_SUCCESS;
|
||||
|
||||
@ -6890,7 +6890,7 @@ cleanup:
|
||||
}
|
||||
|
||||
static int vboxNetworkClose(virConnectPtr conn) {
|
||||
DEBUG0("network uninitialized");
|
||||
VIR_DEBUG0("network uninitialized");
|
||||
conn->networkPrivateData = NULL;
|
||||
return 0;
|
||||
}
|
||||
@ -6924,7 +6924,7 @@ static int vboxNumOfNetworks(virConnectPtr conn) {
|
||||
|
||||
VBOX_RELEASE(host);
|
||||
|
||||
DEBUG("numActive: %d", ret);
|
||||
VIR_DEBUG("numActive: %d", ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -6955,7 +6955,7 @@ static int vboxListNetworks(virConnectPtr conn, char **const names, int nnames)
|
||||
networkInterface->vtbl->GetName(networkInterface, &nameUtf16);
|
||||
VBOX_UTF16_TO_UTF8(nameUtf16, &nameUtf8);
|
||||
|
||||
DEBUG("nnames[%d]: %s", ret, nameUtf8);
|
||||
VIR_DEBUG("nnames[%d]: %s", ret, nameUtf8);
|
||||
names[ret] = strdup(nameUtf8);
|
||||
if (names[ret] == NULL) {
|
||||
virReportOOMError();
|
||||
@ -7006,7 +7006,7 @@ static int vboxNumOfDefinedNetworks(virConnectPtr conn) {
|
||||
|
||||
VBOX_RELEASE(host);
|
||||
|
||||
DEBUG("numActive: %d", ret);
|
||||
VIR_DEBUG("numActive: %d", ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -7037,7 +7037,7 @@ static int vboxListDefinedNetworks(virConnectPtr conn, char **const names, int n
|
||||
networkInterface->vtbl->GetName(networkInterface, &nameUtf16);
|
||||
VBOX_UTF16_TO_UTF8(nameUtf16, &nameUtf8);
|
||||
|
||||
DEBUG("nnames[%d]: %s", ret, nameUtf8);
|
||||
VIR_DEBUG("nnames[%d]: %s", ret, nameUtf8);
|
||||
names[ret] = strdup(nameUtf8);
|
||||
if (names[ret] == NULL) {
|
||||
virReportOOMError();
|
||||
@ -7087,7 +7087,7 @@ vboxNetworkLookupByUUID(virConnectPtr conn, const unsigned char *uuid)
|
||||
|
||||
ret = virGetNetwork(conn, nameUtf8, uuid);
|
||||
|
||||
DEBUG("Network Name: %s", nameUtf8);
|
||||
VIR_DEBUG("Network Name: %s", nameUtf8);
|
||||
DEBUGIID("Network UUID", iid.value);
|
||||
|
||||
VBOX_UTF8_FREE(nameUtf8);
|
||||
@ -7124,7 +7124,7 @@ static virNetworkPtr vboxNetworkLookupByName(virConnectPtr conn, const char *nam
|
||||
networkInterface->vtbl->GetId(networkInterface, &iid.value);
|
||||
vboxIIDToUUID(&iid, uuid);
|
||||
ret = virGetNetwork(conn, name, uuid);
|
||||
DEBUG("Network Name: %s", name);
|
||||
VIR_DEBUG("Network Name: %s", name);
|
||||
|
||||
DEBUGIID("Network UUID", iid.value);
|
||||
vboxIIDUnalloc(&iid);
|
||||
@ -7232,7 +7232,7 @@ static virNetworkPtr vboxNetworkDefineCreateXML(virConnectPtr conn, const char *
|
||||
data->vboxObj->vtbl->CreateDHCPServer(data->vboxObj,
|
||||
networkNameUtf16,
|
||||
&dhcpServer);
|
||||
DEBUG0("couldn't find dhcp server so creating one");
|
||||
VIR_DEBUG0("couldn't find dhcp server so creating one");
|
||||
}
|
||||
if (dhcpServer) {
|
||||
PRUnichar *ipAddressUtf16 = NULL;
|
||||
@ -7692,7 +7692,7 @@ static virDrvOpenStatus vboxStorageOpen (virConnectPtr conn,
|
||||
(data->vboxSession == NULL))
|
||||
goto cleanup;
|
||||
|
||||
DEBUG0("vbox storage initialized");
|
||||
VIR_DEBUG0("vbox storage initialized");
|
||||
/* conn->storagePrivateData = some storage specific data */
|
||||
return VIR_DRV_OPEN_SUCCESS;
|
||||
|
||||
@ -7701,7 +7701,7 @@ cleanup:
|
||||
}
|
||||
|
||||
static int vboxStorageClose (virConnectPtr conn) {
|
||||
DEBUG0("vbox storage uninitialized");
|
||||
VIR_DEBUG0("vbox storage uninitialized");
|
||||
conn->storagePrivateData = NULL;
|
||||
return 0;
|
||||
}
|
||||
@ -7807,7 +7807,7 @@ static int vboxStoragePoolListVolumes(virStoragePoolPtr pool, char **const names
|
||||
VBOX_UTF16_FREE(nameUtf16);
|
||||
|
||||
if (nameUtf8) {
|
||||
DEBUG("nnames[%d]: %s", numActive, nameUtf8);
|
||||
VIR_DEBUG("nnames[%d]: %s", numActive, nameUtf8);
|
||||
names[numActive] = strdup(nameUtf8);
|
||||
if (names[numActive] == NULL) {
|
||||
virReportOOMError();
|
||||
@ -7874,10 +7874,10 @@ static virStorageVolPtr vboxStorageVolLookupByName(virStoragePoolPtr pool, const
|
||||
|
||||
ret = virGetStorageVol(pool->conn, pool->name, name, key);
|
||||
|
||||
DEBUG("virStorageVolPtr: %p", ret);
|
||||
DEBUG("Storage Volume Name: %s", name);
|
||||
DEBUG("Storage Volume key : %s", key);
|
||||
DEBUG("Storage Volume Pool: %s", pool->name);
|
||||
VIR_DEBUG("virStorageVolPtr: %p", ret);
|
||||
VIR_DEBUG("Storage Volume Name: %s", name);
|
||||
VIR_DEBUG("Storage Volume key : %s", key);
|
||||
VIR_DEBUG("Storage Volume Pool: %s", pool->name);
|
||||
}
|
||||
|
||||
vboxIIDUnalloc(&hddIID);
|
||||
@ -7934,15 +7934,15 @@ static virStorageVolPtr vboxStorageVolLookupByKey(virConnectPtr conn, const char
|
||||
if (hddNameUtf8) {
|
||||
if (vboxStorageNumOfPools(conn) == 1) {
|
||||
ret = virGetStorageVol(conn, "default-pool", hddNameUtf8, key);
|
||||
DEBUG("Storage Volume Pool: %s", "default-pool");
|
||||
VIR_DEBUG("Storage Volume Pool: %s", "default-pool");
|
||||
} else {
|
||||
/* TODO: currently only one default pool and thus
|
||||
* nothing here, change it when pools are supported
|
||||
*/
|
||||
}
|
||||
|
||||
DEBUG("Storage Volume Name: %s", key);
|
||||
DEBUG("Storage Volume key : %s", hddNameUtf8);
|
||||
VIR_DEBUG("Storage Volume Name: %s", key);
|
||||
VIR_DEBUG("Storage Volume key : %s", hddNameUtf8);
|
||||
|
||||
VBOX_UTF8_FREE(hddNameUtf8);
|
||||
VBOX_UTF16_FREE(hddNameUtf16);
|
||||
@ -8007,9 +8007,9 @@ static virStorageVolPtr vboxStorageVolLookupByPath(virConnectPtr conn, const cha
|
||||
if (vboxStorageNumOfPools(conn) == 1)
|
||||
ret = virGetStorageVol(conn, "default-pool", hddNameUtf8, key);
|
||||
|
||||
DEBUG("Storage Volume Pool: %s", "default-pool");
|
||||
DEBUG("Storage Volume Name: %s", hddNameUtf8);
|
||||
DEBUG("Storage Volume key : %s", key);
|
||||
VIR_DEBUG("Storage Volume Pool: %s", "default-pool");
|
||||
VIR_DEBUG("Storage Volume Name: %s", hddNameUtf8);
|
||||
VIR_DEBUG("Storage Volume key : %s", key);
|
||||
}
|
||||
|
||||
vboxIIDUnalloc(&hddIID);
|
||||
@ -8241,12 +8241,12 @@ static int vboxStorageVolDelete(virStorageVolPtr vol,
|
||||
#endif /* VBOX_API_VERSION >= 3001 */
|
||||
if (NS_SUCCEEDED(rc)) {
|
||||
rc = machine->vtbl->SaveSettings(machine);
|
||||
DEBUG0("saving machine settings");
|
||||
VIR_DEBUG0("saving machine settings");
|
||||
}
|
||||
|
||||
if (NS_SUCCEEDED(rc)) {
|
||||
deregister++;
|
||||
DEBUG("deregistering hdd:%d", deregister);
|
||||
VIR_DEBUG("deregistering hdd:%d", deregister);
|
||||
}
|
||||
|
||||
if (controller)
|
||||
@ -8341,10 +8341,10 @@ static int vboxStorageVolGetInfo(virStorageVolPtr vol, virStorageVolInfoPtr info
|
||||
|
||||
ret = 0;
|
||||
|
||||
DEBUG("Storage Volume Name: %s", vol->name);
|
||||
DEBUG("Storage Volume Type: %s", info->type == VIR_STORAGE_VOL_BLOCK ? "Block" : "File");
|
||||
DEBUG("Storage Volume Capacity: %llu", info->capacity);
|
||||
DEBUG("Storage Volume Allocation: %llu", info->allocation);
|
||||
VIR_DEBUG("Storage Volume Name: %s", vol->name);
|
||||
VIR_DEBUG("Storage Volume Type: %s", info->type == VIR_STORAGE_VOL_BLOCK ? "Block" : "File");
|
||||
VIR_DEBUG("Storage Volume Capacity: %llu", info->capacity);
|
||||
VIR_DEBUG("Storage Volume Allocation: %llu", info->allocation);
|
||||
}
|
||||
|
||||
VBOX_MEDIUM_RELEASE(hardDisk);
|
||||
@ -8435,7 +8435,7 @@ static char *vboxStorageVolGetXMLDesc(virStorageVolPtr vol, unsigned int flags A
|
||||
VBOX_UTF16_TO_UTF8(hddFormatUtf16, &hddFormatUtf8);
|
||||
if (hddFormatUtf8) {
|
||||
|
||||
DEBUG("Storage Volume Format: %s", hddFormatUtf8);
|
||||
VIR_DEBUG("Storage Volume Format: %s", hddFormatUtf8);
|
||||
|
||||
if (STRCASEEQ("vmdk", hddFormatUtf8))
|
||||
def.target.format = VIR_STORAGE_FILE_VMDK;
|
||||
@ -8505,9 +8505,9 @@ static char *vboxStorageVolGetPath(virStorageVolPtr vol) {
|
||||
if (!ret)
|
||||
virReportOOMError();
|
||||
|
||||
DEBUG("Storage Volume Name: %s", vol->name);
|
||||
DEBUG("Storage Volume Path: %s", hddLocationUtf8);
|
||||
DEBUG("Storage Volume Pool: %s", vol->pool);
|
||||
VIR_DEBUG("Storage Volume Name: %s", vol->name);
|
||||
VIR_DEBUG("Storage Volume Path: %s", hddLocationUtf8);
|
||||
VIR_DEBUG("Storage Volume Pool: %s", vol->pool);
|
||||
|
||||
VBOX_UTF8_FREE(hddLocationUtf8);
|
||||
}
|
||||
|
@ -323,35 +323,35 @@ xenUnifiedOpen (virConnectPtr conn, virConnectAuthPtr auth, int flags)
|
||||
|
||||
/* Hypervisor is only run with privilege & required to succeed */
|
||||
if (xenHavePrivilege()) {
|
||||
DEBUG0("Trying hypervisor sub-driver");
|
||||
VIR_DEBUG0("Trying hypervisor sub-driver");
|
||||
if (drivers[XEN_UNIFIED_HYPERVISOR_OFFSET]->open(conn, auth, flags) ==
|
||||
VIR_DRV_OPEN_SUCCESS) {
|
||||
DEBUG0("Activated hypervisor sub-driver");
|
||||
VIR_DEBUG0("Activated hypervisor sub-driver");
|
||||
priv->opened[XEN_UNIFIED_HYPERVISOR_OFFSET] = 1;
|
||||
}
|
||||
}
|
||||
|
||||
/* XenD is required to succeed if privileged */
|
||||
DEBUG0("Trying XenD sub-driver");
|
||||
VIR_DEBUG0("Trying XenD sub-driver");
|
||||
if (drivers[XEN_UNIFIED_XEND_OFFSET]->open(conn, auth, flags) ==
|
||||
VIR_DRV_OPEN_SUCCESS) {
|
||||
DEBUG0("Activated XenD sub-driver");
|
||||
VIR_DEBUG0("Activated XenD sub-driver");
|
||||
priv->opened[XEN_UNIFIED_XEND_OFFSET] = 1;
|
||||
|
||||
/* XenD is active, so try the xm & xs drivers too, both requird to
|
||||
* succeed if root, optional otherwise */
|
||||
if (priv->xendConfigVersion <= 2) {
|
||||
DEBUG0("Trying XM sub-driver");
|
||||
VIR_DEBUG0("Trying XM sub-driver");
|
||||
if (drivers[XEN_UNIFIED_XM_OFFSET]->open(conn, auth, flags) ==
|
||||
VIR_DRV_OPEN_SUCCESS) {
|
||||
DEBUG0("Activated XM sub-driver");
|
||||
VIR_DEBUG0("Activated XM sub-driver");
|
||||
priv->opened[XEN_UNIFIED_XM_OFFSET] = 1;
|
||||
}
|
||||
}
|
||||
DEBUG0("Trying XS sub-driver");
|
||||
VIR_DEBUG0("Trying XS sub-driver");
|
||||
if (drivers[XEN_UNIFIED_XS_OFFSET]->open(conn, auth, flags) ==
|
||||
VIR_DRV_OPEN_SUCCESS) {
|
||||
DEBUG0("Activated XS sub-driver");
|
||||
VIR_DEBUG0("Activated XS sub-driver");
|
||||
priv->opened[XEN_UNIFIED_XS_OFFSET] = 1;
|
||||
} else {
|
||||
if (xenHavePrivilege())
|
||||
@ -361,7 +361,7 @@ xenUnifiedOpen (virConnectPtr conn, virConnectAuthPtr auth, int flags)
|
||||
if (xenHavePrivilege()) {
|
||||
goto fail; /* XenD is mandatory when privileged */
|
||||
} else {
|
||||
DEBUG0("Handing off for remote driver");
|
||||
VIR_DEBUG0("Handing off for remote driver");
|
||||
ret = VIR_DRV_OPEN_DECLINED; /* Let remote_driver try instead */
|
||||
goto clean;
|
||||
}
|
||||
@ -370,16 +370,16 @@ xenUnifiedOpen (virConnectPtr conn, virConnectAuthPtr auth, int flags)
|
||||
xenNumaInit(conn);
|
||||
|
||||
if (!(priv->caps = xenHypervisorMakeCapabilities(conn))) {
|
||||
DEBUG0("Failed to make capabilities");
|
||||
VIR_DEBUG0("Failed to make capabilities");
|
||||
goto fail;
|
||||
}
|
||||
|
||||
#if WITH_XEN_INOTIFY
|
||||
if (xenHavePrivilege()) {
|
||||
DEBUG0("Trying Xen inotify sub-driver");
|
||||
VIR_DEBUG0("Trying Xen inotify sub-driver");
|
||||
if (drivers[XEN_UNIFIED_INOTIFY_OFFSET]->open(conn, auth, flags) ==
|
||||
VIR_DRV_OPEN_SUCCESS) {
|
||||
DEBUG0("Activated Xen inotify sub-driver");
|
||||
VIR_DEBUG0("Activated Xen inotify sub-driver");
|
||||
priv->opened[XEN_UNIFIED_INOTIFY_OFFSET] = 1;
|
||||
}
|
||||
}
|
||||
@ -390,7 +390,7 @@ xenUnifiedOpen (virConnectPtr conn, virConnectAuthPtr auth, int flags)
|
||||
fail:
|
||||
ret = VIR_DRV_OPEN_ERROR;
|
||||
clean:
|
||||
DEBUG0("Failed to activate a mandatory sub-driver");
|
||||
VIR_DEBUG0("Failed to activate a mandatory sub-driver");
|
||||
for (i = 0 ; i < XEN_UNIFIED_NR_DRIVERS ; i++)
|
||||
if (priv->opened[i]) drivers[i]->close(conn);
|
||||
virMutexDestroy(&priv->lock);
|
||||
@ -2163,7 +2163,7 @@ xenUnifiedAddDomainInfo(xenUnifiedDomainInfoListPtr list,
|
||||
for (n=0; n < list->count; n++) {
|
||||
if (STREQ(list->doms[n]->name, name) &&
|
||||
!memcmp(list->doms[n]->uuid, uuid, VIR_UUID_BUFLEN)) {
|
||||
DEBUG0("WARNING: dom already tracked");
|
||||
VIR_DEBUG0("WARNING: dom already tracked");
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
@ -1989,7 +1989,7 @@ xenHypervisorInit(void)
|
||||
ret = ioctl(fd, cmd, (unsigned long) &hc);
|
||||
|
||||
if ((ret != -1) && (ret != 0)) {
|
||||
DEBUG("Using new hypervisor call: %X", ret);
|
||||
VIR_DEBUG("Using new hypervisor call: %X", ret);
|
||||
hv_version = ret;
|
||||
xen_ioctl_hypercall_cmd = cmd;
|
||||
goto detect_v2;
|
||||
@ -2005,7 +2005,7 @@ xenHypervisorInit(void)
|
||||
cmd = _IOC(_IOC_NONE, 'P', 0, sizeof(v0_hypercall_t));
|
||||
ret = ioctl(fd, cmd, (unsigned long) &v0_hc);
|
||||
if ((ret != -1) && (ret != 0)) {
|
||||
DEBUG("Using old hypervisor call: %X", ret);
|
||||
VIR_DEBUG("Using old hypervisor call: %X", ret);
|
||||
hv_version = ret;
|
||||
xen_ioctl_hypercall_cmd = cmd;
|
||||
hypervisor_version = 0;
|
||||
@ -2042,13 +2042,13 @@ xenHypervisorInit(void)
|
||||
/* RHEL 5.0 */
|
||||
dom_interface_version = 3; /* XEN_DOMCTL_INTERFACE_VERSION */
|
||||
if (virXen_getvcpusinfo(fd, 0, 0, ipt, NULL, 0) == 0){
|
||||
DEBUG0("Using hypervisor call v2, sys ver2 dom ver3");
|
||||
VIR_DEBUG0("Using hypervisor call v2, sys ver2 dom ver3");
|
||||
goto done;
|
||||
}
|
||||
/* Fedora 7 */
|
||||
dom_interface_version = 4; /* XEN_DOMCTL_INTERFACE_VERSION */
|
||||
if (virXen_getvcpusinfo(fd, 0, 0, ipt, NULL, 0) == 0){
|
||||
DEBUG0("Using hypervisor call v2, sys ver2 dom ver4");
|
||||
VIR_DEBUG0("Using hypervisor call v2, sys ver2 dom ver4");
|
||||
goto done;
|
||||
}
|
||||
}
|
||||
@ -2058,7 +2058,7 @@ xenHypervisorInit(void)
|
||||
/* xen-3.1 */
|
||||
dom_interface_version = 5; /* XEN_DOMCTL_INTERFACE_VERSION */
|
||||
if (virXen_getvcpusinfo(fd, 0, 0, ipt, NULL, 0) == 0){
|
||||
DEBUG0("Using hypervisor call v2, sys ver3 dom ver5");
|
||||
VIR_DEBUG0("Using hypervisor call v2, sys ver3 dom ver5");
|
||||
goto done;
|
||||
}
|
||||
}
|
||||
@ -2068,7 +2068,7 @@ xenHypervisorInit(void)
|
||||
/* Fedora 8 */
|
||||
dom_interface_version = 5; /* XEN_DOMCTL_INTERFACE_VERSION */
|
||||
if (virXen_getvcpusinfo(fd, 0, 0, ipt, NULL, 0) == 0){
|
||||
DEBUG0("Using hypervisor call v2, sys ver4 dom ver5");
|
||||
VIR_DEBUG0("Using hypervisor call v2, sys ver4 dom ver5");
|
||||
goto done;
|
||||
}
|
||||
}
|
||||
@ -2078,7 +2078,7 @@ xenHypervisorInit(void)
|
||||
/* Xen 3.2, Fedora 9 */
|
||||
dom_interface_version = 5; /* XEN_DOMCTL_INTERFACE_VERSION */
|
||||
if (virXen_getvcpusinfo(fd, 0, 0, ipt, NULL, 0) == 0){
|
||||
DEBUG0("Using hypervisor call v2, sys ver6 dom ver5");
|
||||
VIR_DEBUG0("Using hypervisor call v2, sys ver6 dom ver5");
|
||||
goto done;
|
||||
}
|
||||
}
|
||||
@ -2087,14 +2087,14 @@ xenHypervisorInit(void)
|
||||
sys_interface_version = 7; /* XEN_SYSCTL_INTERFACE_VERSION */
|
||||
if (virXen_getdomaininfo(fd, 0, &info) == 1) {
|
||||
dom_interface_version = 6; /* XEN_DOMCTL_INTERFACE_VERSION */
|
||||
DEBUG0("Using hypervisor call v2, sys ver7 dom ver6");
|
||||
VIR_DEBUG0("Using hypervisor call v2, sys ver7 dom ver6");
|
||||
goto done;
|
||||
}
|
||||
|
||||
hypervisor_version = 1;
|
||||
sys_interface_version = -1;
|
||||
if (virXen_getdomaininfo(fd, 0, &info) == 1) {
|
||||
DEBUG0("Using hypervisor call v1");
|
||||
VIR_DEBUG0("Using hypervisor call v1");
|
||||
goto done;
|
||||
}
|
||||
|
||||
@ -2102,7 +2102,7 @@ xenHypervisorInit(void)
|
||||
* we failed to make the getdomaininfolist hypercall
|
||||
*/
|
||||
|
||||
DEBUG0("Failed to find any Xen hypervisor method");
|
||||
VIR_DEBUG0("Failed to find any Xen hypervisor method");
|
||||
hypervisor_version = -1;
|
||||
virXenError(VIR_ERR_XEN_CALL, " ioctl %lu",
|
||||
(unsigned long)IOCTL_PRIVCMD_HYPERCALL);
|
||||
|
@ -97,7 +97,7 @@ xenInotifyXenCacheLookup(virConnectPtr conn,
|
||||
xenXMConfCachePtr entry;
|
||||
|
||||
if (!(entry = virHashLookup(priv->configCache, filename))) {
|
||||
DEBUG("No config found for %s", filename);
|
||||
VIR_DEBUG("No config found for %s", filename);
|
||||
return -1;
|
||||
}
|
||||
|
||||
@ -105,7 +105,7 @@ xenInotifyXenCacheLookup(virConnectPtr conn,
|
||||
memcpy(uuid, entry->def->uuid, VIR_UUID_BUFLEN);
|
||||
|
||||
if (!*name) {
|
||||
DEBUG0("Error getting dom from def");
|
||||
VIR_DEBUG0("Error getting dom from def");
|
||||
virReportOOMError();
|
||||
return -1;
|
||||
}
|
||||
@ -135,7 +135,7 @@ xenInotifyXendDomainsDirLookup(virConnectPtr conn, const char *filename,
|
||||
/* call directly into xend here, as driver may not yet
|
||||
be set during open while we are building our
|
||||
initial list of domains */
|
||||
DEBUG("Looking for dom with uuid: %s", uuid_str);
|
||||
VIR_DEBUG("Looking for dom with uuid: %s", uuid_str);
|
||||
/* XXX Should not have to go via a virDomainPtr obj instance */
|
||||
if(!(dom = xenDaemonLookupByUUID(conn, rawuuid))) {
|
||||
/* If we are here, the domain has gone away.
|
||||
@ -149,7 +149,7 @@ xenInotifyXendDomainsDirLookup(virConnectPtr conn, const char *filename,
|
||||
return -1;
|
||||
}
|
||||
memcpy(uuid, priv->configInfoList->doms[i]->uuid, VIR_UUID_BUFLEN);
|
||||
DEBUG0("Found dom on list");
|
||||
VIR_DEBUG0("Found dom on list");
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
@ -288,7 +288,7 @@ xenInotifyEvent(int watch ATTRIBUTE_UNUSED,
|
||||
virConnectPtr conn = data;
|
||||
xenUnifiedPrivatePtr priv = NULL;
|
||||
|
||||
DEBUG0("got inotify event");
|
||||
VIR_DEBUG0("got inotify event");
|
||||
|
||||
if( conn && conn->privateData ) {
|
||||
priv = conn->privateData;
|
||||
@ -437,7 +437,7 @@ xenInotifyOpen(virConnectPtr conn,
|
||||
return -1;
|
||||
}
|
||||
|
||||
DEBUG("Adding a watch on %s", priv->configDir);
|
||||
VIR_DEBUG("Adding a watch on %s", priv->configDir);
|
||||
if (inotify_add_watch(priv->inotifyFD,
|
||||
priv->configDir,
|
||||
IN_CREATE |
|
||||
@ -449,18 +449,18 @@ xenInotifyOpen(virConnectPtr conn,
|
||||
return -1;
|
||||
}
|
||||
|
||||
DEBUG0("Building initial config cache");
|
||||
VIR_DEBUG0("Building initial config cache");
|
||||
if (priv->useXenConfigCache &&
|
||||
xenXMConfigCacheRefresh (conn) < 0) {
|
||||
DEBUG("Failed to enable XM config cache %s", conn->err.message);
|
||||
VIR_DEBUG("Failed to enable XM config cache %s", conn->err.message);
|
||||
return -1;
|
||||
}
|
||||
|
||||
DEBUG0("Registering with event loop");
|
||||
VIR_DEBUG0("Registering with event loop");
|
||||
/* Add the handle for monitoring */
|
||||
if ((priv->inotifyWatch = virEventAddHandle(priv->inotifyFD, VIR_EVENT_HANDLE_READABLE,
|
||||
xenInotifyEvent, conn, NULL)) < 0) {
|
||||
DEBUG0("Failed to add inotify handle, disabling events");
|
||||
VIR_DEBUG0("Failed to add inotify handle, disabling events");
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
@ -522,7 +522,7 @@ xend_op_ext(virConnectPtr xend, const char *path, const char *key, va_list ap)
|
||||
}
|
||||
|
||||
content = virBufferContentAndReset(&buf);
|
||||
DEBUG("xend op: %s\n", content);
|
||||
VIR_DEBUG("xend op: %s\n", content);
|
||||
ret = http2unix(xend_post(xend, path, content));
|
||||
VIR_FREE(content);
|
||||
|
||||
@ -4603,7 +4603,7 @@ xenDaemonDomainMigratePerform (virDomainPtr domain,
|
||||
}
|
||||
}
|
||||
|
||||
DEBUG("hostname = %s, port = %s", hostname, port);
|
||||
VIR_DEBUG("hostname = %s, port = %s", hostname, port);
|
||||
|
||||
/* Make the call.
|
||||
* NB: xend will fail the operation if any parameters are
|
||||
@ -4626,7 +4626,7 @@ xenDaemonDomainMigratePerform (virDomainPtr domain,
|
||||
if (ret == 0 && undefined_source)
|
||||
xenDaemonDomainUndefine (domain);
|
||||
|
||||
DEBUG0("migration done");
|
||||
VIR_DEBUG0("migration done");
|
||||
|
||||
return ret;
|
||||
}
|
||||
@ -5805,7 +5805,7 @@ xenDaemonFormatSxpr(virConnectPtr conn,
|
||||
char *bufout;
|
||||
int hvm = 0, i;
|
||||
|
||||
DEBUG0("Formatting domain sexpr");
|
||||
VIR_DEBUG0("Formatting domain sexpr");
|
||||
|
||||
virBufferAddLit(&buf, "(vm ");
|
||||
virBufferEscapeSexpr(&buf, "(name '%s')", def->name);
|
||||
@ -6058,7 +6058,7 @@ xenDaemonFormatSxpr(virConnectPtr conn,
|
||||
}
|
||||
|
||||
bufout = virBufferContentAndReset(&buf);
|
||||
DEBUG("Formatted sexpr: \n%s", bufout);
|
||||
VIR_DEBUG("Formatted sexpr: \n%s", bufout);
|
||||
return bufout;
|
||||
|
||||
error:
|
||||
|
@ -363,13 +363,13 @@ xenXMConfigCacheRemoveFile(virConnectPtr conn,
|
||||
|
||||
entry = virHashLookup(priv->configCache, filename);
|
||||
if (!entry) {
|
||||
DEBUG("No config entry for %s", filename);
|
||||
VIR_DEBUG("No config entry for %s", filename);
|
||||
return 0;
|
||||
}
|
||||
|
||||
virHashRemoveEntry(priv->nameConfigMap, entry->def->name, NULL);
|
||||
virHashRemoveEntry(priv->configCache, filename, xenXMConfigFree);
|
||||
DEBUG("Removed %s %s", entry->def->name, filename);
|
||||
VIR_DEBUG("Removed %s %s", entry->def->name, filename);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -387,7 +387,7 @@ xenXMConfigCacheAddFile(virConnectPtr conn, const char *filename)
|
||||
int newborn = 0;
|
||||
time_t now = time(NULL);
|
||||
|
||||
DEBUG("Adding file %s", filename);
|
||||
VIR_DEBUG("Adding file %s", filename);
|
||||
|
||||
/* Get modified time */
|
||||
if ((stat(filename, &st) < 0)) {
|
||||
@ -400,7 +400,7 @@ xenXMConfigCacheAddFile(virConnectPtr conn, const char *filename)
|
||||
/* Ignore zero length files, because inotify fires before
|
||||
any content has actually been created */
|
||||
if (st.st_size == 0) {
|
||||
DEBUG("Ignoring zero length file %s", filename);
|
||||
VIR_DEBUG("Ignoring zero length file %s", filename);
|
||||
return -1;
|
||||
}
|
||||
|
||||
@ -436,7 +436,7 @@ xenXMConfigCacheAddFile(virConnectPtr conn, const char *filename)
|
||||
entry->refreshedAt = now;
|
||||
|
||||
if (!(entry->def = xenXMConfigReadFile(conn, entry->filename))) {
|
||||
DEBUG("Failed to read %s", entry->filename);
|
||||
VIR_DEBUG("Failed to read %s", entry->filename);
|
||||
if (!newborn)
|
||||
virHashRemoveEntry(priv->configCache, filename, NULL);
|
||||
VIR_FREE(entry);
|
||||
@ -465,7 +465,7 @@ xenXMConfigCacheAddFile(virConnectPtr conn, const char *filename)
|
||||
VIR_FREE(entry);
|
||||
}
|
||||
}
|
||||
DEBUG("Added config %s %s", entry->def->name, filename);
|
||||
VIR_DEBUG("Added config %s %s", entry->def->name, filename);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -327,7 +327,7 @@ xenStoreOpen(virConnectPtr conn,
|
||||
xenStoreWatchEvent,
|
||||
conn,
|
||||
NULL)) < 0)
|
||||
DEBUG0("Failed to add event handle, disabling events");
|
||||
VIR_DEBUG0("Failed to add event handle, disabling events");
|
||||
|
||||
return 0;
|
||||
}
|
||||
@ -353,12 +353,12 @@ xenStoreClose(virConnectPtr conn)
|
||||
priv = (xenUnifiedPrivatePtr) conn->privateData;
|
||||
|
||||
if (xenStoreRemoveWatch(conn, "@introduceDomain", "introduceDomain") < 0) {
|
||||
DEBUG0("Warning, could not remove @introduceDomain watch");
|
||||
VIR_DEBUG0("Warning, could not remove @introduceDomain watch");
|
||||
/* not fatal */
|
||||
}
|
||||
|
||||
if (xenStoreRemoveWatch(conn, "@releaseDomain", "releaseDomain") < 0) {
|
||||
DEBUG0("Warning, could not remove @releaseDomain watch");
|
||||
VIR_DEBUG0("Warning, could not remove @releaseDomain watch");
|
||||
/* not fatal */
|
||||
}
|
||||
|
||||
@ -1196,7 +1196,7 @@ int xenStoreRemoveWatch(virConnectPtr conn,
|
||||
list->watches[i]->path,
|
||||
list->watches[i]->token))
|
||||
{
|
||||
DEBUG0("WARNING: Could not remove watch");
|
||||
VIR_DEBUG0("WARNING: Could not remove watch");
|
||||
/* Not fatal, continue */
|
||||
}
|
||||
|
||||
@ -1351,7 +1351,7 @@ retry:
|
||||
VIR_FREE(new_domids);
|
||||
|
||||
if (missing && retries--) {
|
||||
DEBUG0("Some domains were missing, trying again");
|
||||
VIR_DEBUG0("Some domains were missing, trying again");
|
||||
usleep(100 * 1000);
|
||||
goto retry;
|
||||
}
|
||||
@ -1426,7 +1426,7 @@ retry:
|
||||
VIR_FREE(new_domids);
|
||||
|
||||
if (!removed && retries--) {
|
||||
DEBUG0("No domains removed, retrying");
|
||||
VIR_DEBUG0("No domains removed, retrying");
|
||||
usleep(100 * 1000);
|
||||
goto retry;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user