[libvirt] [PATCH] remote generator: Add skipgen/autogen flags to .x files
by Matthias Bolte
Make procedure parsing more robust, by allowing arbitrary
amounts of whitespaces.
Also make some error messages more verbose.
---
cfg.mk | 2 +-
daemon/remote_generator.pl | 165 ++++-----------
src/remote/qemu_protocol.x | 5 +-
src/remote/remote_protocol.x | 463 +++++++++++++++++++++---------------------
4 files changed, 282 insertions(+), 353 deletions(-)
diff --git a/cfg.mk b/cfg.mk
index 9ee0dd0..f0ca000 100644
--- a/cfg.mk
+++ b/cfg.mk
@@ -614,7 +614,7 @@ exclude_file_name_regexp--sc_prohibit_asprintf = \
exclude_file_name_regexp--sc_prohibit_can_not = ^po/
exclude_file_name_regexp--sc_prohibit_close = \
- (\.py$$|^docs/|(src/util/files\.c|src/libvirt\.c)$$)
+ (\.py$$|^docs/|(src/util/files\.c|src/libvirt\.c|daemon/remote_generator\.pl)$$)
exclude_file_name_regexp--sc_prohibit_doubled_word = ^po/
diff --git a/daemon/remote_generator.pl b/daemon/remote_generator.pl
index 79d2021..bce6261 100755
--- a/daemon/remote_generator.pl
+++ b/daemon/remote_generator.pl
@@ -23,9 +23,11 @@ use Getopt::Std;
our ($opt_p, $opt_t, $opt_a, $opt_r, $opt_d, $opt_c, $opt_b, $opt_k);
getopts ('ptardcbk');
-my $structprefix = $ARGV[0];
+my $structprefix = shift or die "missing prefix argument";
+my $protocol = shift or die "missing protocol argument";
+my @autogen;
+
my $procprefix = uc $structprefix;
-shift;
# Convert name_of_call to NameOfCall.
sub name_to_ProcName {
@@ -41,7 +43,7 @@ sub name_to_ProcName {
# Read the input file (usually remote_protocol.x) and form an
# opinion about the name, args and return type of each RPC.
-my ($name, $ProcName, $id, %calls, @calls);
+my ($name, $ProcName, $id, $flags, $gen, %calls, @calls);
# only generate a close method if -c was passed
if ($opt_c) {
@@ -59,7 +61,9 @@ my $collect_args_members = 0;
my $collect_ret_members = 0;
my $last_name;
-while (<>) {
+open PROTOCOL, "<$protocol" or die "cannot open $protocol: $!";
+
+while (<PROTOCOL>) {
if ($collect_args_members) {
if (/^};/) {
$collect_args_members = 0;
@@ -124,11 +128,28 @@ while (<>) {
$collect_args_members = 0;
$collect_ret_members = 0;
- } elsif (/^\s*${procprefix}_PROC_(.*?)\s+=\s+(\d+),?$/) {
+ } elsif (/^\s*${procprefix}_PROC_(.*?)\s*=\s*(\d+)\s*,?(.*)$/) {
$name = lc $1;
$id = $2;
+ $flags = $3;
$ProcName = name_to_ProcName ($name);
+ if ($opt_b or $opt_k) {
+ if (!($flags =~ m/^\s*\/\*\s*(\S+)\s+(\S+)\s*\*\/\s*$/)) {
+ die "invalid generator flags for ${procprefix}_PROC_${name}"
+ }
+
+ $gen = $opt_b ? $1 : $2;
+
+ if ($gen eq "autogen") {
+ push(@autogen, $ProcName);
+ } elsif ($gen eq "skipgen") {
+ # ignore it
+ } else {
+ die "invalid generator flags for ${procprefix}_PROC_${name}"
+ }
+ }
+
$calls[$id] = $calls{$name};
$collect_args_members = 0;
@@ -139,6 +160,8 @@ while (<>) {
}
}
+close(PROTOCOL);
+
#----------------------------------------------------------------------
# Output
@@ -238,63 +261,15 @@ elsif ($opt_t) {
# Bodies for dispatch functions ("remote_dispatch_bodies.h").
elsif ($opt_b) {
- # list of functions that currently are not generatable
- my @ungeneratable;
-
- if ($structprefix eq "remote") {
- @ungeneratable = ("Close",
- "DomainEventsDeregisterAny",
- "DomainEventsRegisterAny",
- "DomainMigratePrepareTunnel",
- "DomainOpenConsole",
- "DomainPinVcpu",
- "DomainSetSchedulerParameters",
- "DomainSetMemoryParameters",
- "DomainSetBlkioParameters",
- "Open",
- "StorageVolUpload",
- "StorageVolDownload",
-
- "AuthList",
- "AuthSaslInit",
- "AuthSaslStart",
- "AuthSaslStep",
- "AuthPolkit",
-
- "DomainBlockPeek",
- "DomainCreateWithFlags",
- "DomainEventsDeregister",
- "DomainEventsRegister",
- "DomainGetBlkioParameters",
- "DomainGetMemoryParameters",
- "DomainGetSchedulerParameters",
- "DomainGetSchedulerType",
- "DomainGetSecurityLabel",
- "DomainGetVcpus",
- "DomainMemoryPeek",
- "DomainMemoryStats",
- "DomainMigratePrepare",
- "DomainMigratePrepare2",
- "GetType",
- "NodeDeviceGetParent",
- "NodeGetSecurityModel",
- "SecretGetValue");
- } elsif ($structprefix eq "qemu") {
- @ungeneratable = ("MonitorCommand");
- }
-
- my %ug = map { $_ => 1 } @ungeneratable;
+ my %generate = map { $_ => 1 } @autogen;
my @keys = sort (keys %calls);
foreach (@keys) {
# skip things which are REMOTE_MESSAGE
next if $calls{$_}->{msg};
- if (exists($ug{$calls{$_}->{ProcName}})) {
- print "\n/* ${structprefix}Dispatch$calls{$_}->{ProcName} has " .
- "to be implemented manually */\n";
- next;
- }
+ # skip procedures not on generate list
+ next if ! exists($generate{$calls{$_}->{ProcName}});
my $has_node_device = 0;
my @vars_list = ();
@@ -550,6 +525,8 @@ elsif ($opt_b) {
} else {
$single_ret_by_ref = 1;
}
+ } elsif ($ret_member =~ m/^(\/)?\*/) {
+ # ignore comments
} else {
die "unhandled type for return value: $ret_member";
}
@@ -756,63 +733,7 @@ elsif ($opt_b) {
# Bodies for client functions ("remote_client_bodies.h").
elsif ($opt_k) {
- # list of functions that currently are not generatable
- my @ungeneratable;
-
- if ($structprefix eq "remote") {
- @ungeneratable = ("Close",
- "DomainEventsDeregisterAny",
- "DomainEventsRegisterAny",
- "DomainMigratePrepareTunnel",
- "DomainOpenConsole",
- "DomainSetSchedulerParameters",
- "DomainSetMemoryParameters",
- "DomainSetBlkioParameters",
- "Open",
- "StorageVolUpload",
- "StorageVolDownload",
-
- "AuthList",
- "AuthSaslInit",
- "AuthSaslStart",
- "AuthSaslStep",
- "AuthPolkit",
-
- "DomainCreate",
- "DomainDestroy",
- "FindStoragePoolSources",
- "IsSecure",
- "SupportsFeature",
- "NodeGetCellsFreeMemory",
- "ListDomains",
- "GetURI",
- "NodeDeviceDettach",
- "NodeDeviceReset",
- "NodeDeviceReAttach",
-
- "DomainBlockPeek",
- "DomainCreateWithFlags",
- "DomainEventsDeregister",
- "DomainEventsRegister",
- "DomainGetBlkioParameters",
- "DomainGetMemoryParameters",
- "DomainGetSchedulerParameters",
- "DomainGetSchedulerType",
- "DomainGetSecurityLabel",
- "DomainGetVcpus",
- "DomainMemoryPeek",
- "DomainMemoryStats",
- "DomainMigratePrepare",
- "DomainMigratePrepare2",
- "GetType",
- "NodeDeviceGetParent",
- "NodeGetSecurityModel",
- "SecretGetValue");
- } elsif ($structprefix eq "qemu") {
- @ungeneratable = ("MonitorCommand");
- }
-
- my %ug = map { $_ => 1 } @ungeneratable;
+ my %generate = map { $_ => 1 } @autogen;
my @keys = sort (keys %calls);
foreach (@keys) {
@@ -821,11 +742,8 @@ elsif ($opt_k) {
# skip things which are REMOTE_MESSAGE
next if $call->{msg};
- if (exists($ug{$call->{ProcName}})) {
- print "\n/* ${structprefix}Dispatch$call->{ProcName} has to " .
- "be implemented manually */\n";
- next;
- }
+ # skip procedures not on generate list
+ next if ! exists($generate{$call->{ProcName}});
# handle arguments to the function
my @args_list = ();
@@ -1005,11 +923,13 @@ elsif ($opt_k) {
push(@ret_list, "memcpy(result->$3, ret.$3, sizeof result->$3);");
} elsif ($ret_member =~ m/<\S+>;/ or $ret_member =~ m/\[\S+\];/) {
# just make all other array types fail
- die "unhandled type for multi-return-value: $ret_member";
+ die "unhandled type for multi-return-value for " .
+ "procedure $call->{name}: $ret_member";
} elsif ($ret_member =~ m/^(unsigned )?(char|short|int|hyper) (\S+);/) {
push(@ret_list, "result->$3 = ret.$3;");
} else {
- die "unhandled type for multi-return-value: $ret_member";
+ die "unhandled type for multi-return-value for " .
+ "procedure $call->{name}: $ret_member";
}
} elsif ($ret_member =~ m/^remote_nonnull_string (\S+)<(\S+)>;/) {
$single_ret_as_list = 1;
@@ -1095,8 +1015,11 @@ elsif ($opt_k) {
} else {
die "unhandled type for return value: $ret_member";
}
+ } elsif ($ret_member =~ m/^(\/)?\*/) {
+ # ignore comments
} else {
- die "unhandled type for return value: $ret_member";
+ die "unhandled type for return value for procedure " .
+ "$call->{name}: $ret_member";
}
}
}
diff --git a/src/remote/qemu_protocol.x b/src/remote/qemu_protocol.x
index 9eed73f..fa453f4 100644
--- a/src/remote/qemu_protocol.x
+++ b/src/remote/qemu_protocol.x
@@ -42,5 +42,8 @@ const QEMU_PROGRAM = 0x20008087;
const QEMU_PROTOCOL_VERSION = 1;
enum qemu_procedure {
- QEMU_PROC_MONITOR_COMMAND = 1
+ /* Each function must have a two-word comment. The first word is
+ * whether remote_generator.pl handles daemon, the second whether
+ * it handles src/remote. */
+ QEMU_PROC_MONITOR_COMMAND = 1 /* skipgen skipgen */
};
diff --git a/src/remote/remote_protocol.x b/src/remote/remote_protocol.x
index 2cf6022..0b88353 100644
--- a/src/remote/remote_protocol.x
+++ b/src/remote/remote_protocol.x
@@ -1953,236 +1953,239 @@ const REMOTE_PROGRAM = 0x20008086;
const REMOTE_PROTOCOL_VERSION = 1;
enum remote_procedure {
- REMOTE_PROC_OPEN = 1,
- REMOTE_PROC_CLOSE = 2,
- REMOTE_PROC_GET_TYPE = 3,
- REMOTE_PROC_GET_VERSION = 4,
- REMOTE_PROC_GET_MAX_VCPUS = 5,
- REMOTE_PROC_NODE_GET_INFO = 6,
- REMOTE_PROC_GET_CAPABILITIES = 7,
- REMOTE_PROC_DOMAIN_ATTACH_DEVICE = 8,
- REMOTE_PROC_DOMAIN_CREATE = 9,
- REMOTE_PROC_DOMAIN_CREATE_XML = 10,
-
- REMOTE_PROC_DOMAIN_DEFINE_XML = 11,
- REMOTE_PROC_DOMAIN_DESTROY = 12,
- REMOTE_PROC_DOMAIN_DETACH_DEVICE = 13,
- REMOTE_PROC_DOMAIN_GET_XML_DESC = 14,
- REMOTE_PROC_DOMAIN_GET_AUTOSTART = 15,
- REMOTE_PROC_DOMAIN_GET_INFO = 16,
- REMOTE_PROC_DOMAIN_GET_MAX_MEMORY = 17,
- REMOTE_PROC_DOMAIN_GET_MAX_VCPUS = 18,
- REMOTE_PROC_DOMAIN_GET_OS_TYPE = 19,
- REMOTE_PROC_DOMAIN_GET_VCPUS = 20,
-
- REMOTE_PROC_LIST_DEFINED_DOMAINS = 21,
- REMOTE_PROC_DOMAIN_LOOKUP_BY_ID = 22,
- REMOTE_PROC_DOMAIN_LOOKUP_BY_NAME = 23,
- REMOTE_PROC_DOMAIN_LOOKUP_BY_UUID = 24,
- REMOTE_PROC_NUM_OF_DEFINED_DOMAINS = 25,
- REMOTE_PROC_DOMAIN_PIN_VCPU = 26,
- REMOTE_PROC_DOMAIN_REBOOT = 27,
- REMOTE_PROC_DOMAIN_RESUME = 28,
- REMOTE_PROC_DOMAIN_SET_AUTOSTART = 29,
- REMOTE_PROC_DOMAIN_SET_MAX_MEMORY = 30,
-
- REMOTE_PROC_DOMAIN_SET_MEMORY = 31,
- REMOTE_PROC_DOMAIN_SET_VCPUS = 32,
- REMOTE_PROC_DOMAIN_SHUTDOWN = 33,
- REMOTE_PROC_DOMAIN_SUSPEND = 34,
- REMOTE_PROC_DOMAIN_UNDEFINE = 35,
- REMOTE_PROC_LIST_DEFINED_NETWORKS = 36,
- REMOTE_PROC_LIST_DOMAINS = 37,
- REMOTE_PROC_LIST_NETWORKS = 38,
- REMOTE_PROC_NETWORK_CREATE = 39,
- REMOTE_PROC_NETWORK_CREATE_XML = 40,
-
- REMOTE_PROC_NETWORK_DEFINE_XML = 41,
- REMOTE_PROC_NETWORK_DESTROY = 42,
- REMOTE_PROC_NETWORK_GET_XML_DESC = 43,
- REMOTE_PROC_NETWORK_GET_AUTOSTART = 44,
- REMOTE_PROC_NETWORK_GET_BRIDGE_NAME = 45,
- REMOTE_PROC_NETWORK_LOOKUP_BY_NAME = 46,
- REMOTE_PROC_NETWORK_LOOKUP_BY_UUID = 47,
- REMOTE_PROC_NETWORK_SET_AUTOSTART = 48,
- REMOTE_PROC_NETWORK_UNDEFINE = 49,
- REMOTE_PROC_NUM_OF_DEFINED_NETWORKS = 50,
-
- REMOTE_PROC_NUM_OF_DOMAINS = 51,
- REMOTE_PROC_NUM_OF_NETWORKS = 52,
- REMOTE_PROC_DOMAIN_CORE_DUMP = 53,
- REMOTE_PROC_DOMAIN_RESTORE = 54,
- REMOTE_PROC_DOMAIN_SAVE = 55,
- REMOTE_PROC_DOMAIN_GET_SCHEDULER_TYPE = 56,
- REMOTE_PROC_DOMAIN_GET_SCHEDULER_PARAMETERS = 57,
- REMOTE_PROC_DOMAIN_SET_SCHEDULER_PARAMETERS = 58,
- REMOTE_PROC_GET_HOSTNAME = 59,
- REMOTE_PROC_SUPPORTS_FEATURE = 60,
-
- REMOTE_PROC_DOMAIN_MIGRATE_PREPARE = 61,
- REMOTE_PROC_DOMAIN_MIGRATE_PERFORM = 62,
- REMOTE_PROC_DOMAIN_MIGRATE_FINISH = 63,
- REMOTE_PROC_DOMAIN_BLOCK_STATS = 64,
- REMOTE_PROC_DOMAIN_INTERFACE_STATS = 65,
- REMOTE_PROC_AUTH_LIST = 66,
- REMOTE_PROC_AUTH_SASL_INIT = 67,
- REMOTE_PROC_AUTH_SASL_START = 68,
- REMOTE_PROC_AUTH_SASL_STEP = 69,
- REMOTE_PROC_AUTH_POLKIT = 70,
-
- REMOTE_PROC_NUM_OF_STORAGE_POOLS = 71,
- REMOTE_PROC_LIST_STORAGE_POOLS = 72,
- REMOTE_PROC_NUM_OF_DEFINED_STORAGE_POOLS = 73,
- REMOTE_PROC_LIST_DEFINED_STORAGE_POOLS = 74,
- REMOTE_PROC_FIND_STORAGE_POOL_SOURCES = 75,
- REMOTE_PROC_STORAGE_POOL_CREATE_XML = 76,
- REMOTE_PROC_STORAGE_POOL_DEFINE_XML = 77,
- REMOTE_PROC_STORAGE_POOL_CREATE = 78,
- REMOTE_PROC_STORAGE_POOL_BUILD = 79,
- REMOTE_PROC_STORAGE_POOL_DESTROY = 80,
-
- REMOTE_PROC_STORAGE_POOL_DELETE = 81,
- REMOTE_PROC_STORAGE_POOL_UNDEFINE = 82,
- REMOTE_PROC_STORAGE_POOL_REFRESH = 83,
- REMOTE_PROC_STORAGE_POOL_LOOKUP_BY_NAME = 84,
- REMOTE_PROC_STORAGE_POOL_LOOKUP_BY_UUID = 85,
- REMOTE_PROC_STORAGE_POOL_LOOKUP_BY_VOLUME = 86,
- REMOTE_PROC_STORAGE_POOL_GET_INFO = 87,
- REMOTE_PROC_STORAGE_POOL_GET_XML_DESC = 88,
- REMOTE_PROC_STORAGE_POOL_GET_AUTOSTART = 89,
- REMOTE_PROC_STORAGE_POOL_SET_AUTOSTART = 90,
-
- REMOTE_PROC_STORAGE_POOL_NUM_OF_VOLUMES = 91,
- REMOTE_PROC_STORAGE_POOL_LIST_VOLUMES = 92,
- REMOTE_PROC_STORAGE_VOL_CREATE_XML = 93,
- REMOTE_PROC_STORAGE_VOL_DELETE = 94,
- REMOTE_PROC_STORAGE_VOL_LOOKUP_BY_NAME = 95,
- REMOTE_PROC_STORAGE_VOL_LOOKUP_BY_KEY = 96,
- REMOTE_PROC_STORAGE_VOL_LOOKUP_BY_PATH = 97,
- REMOTE_PROC_STORAGE_VOL_GET_INFO = 98,
- REMOTE_PROC_STORAGE_VOL_GET_XML_DESC = 99,
- REMOTE_PROC_STORAGE_VOL_GET_PATH = 100,
-
- REMOTE_PROC_NODE_GET_CELLS_FREE_MEMORY = 101,
- REMOTE_PROC_NODE_GET_FREE_MEMORY = 102,
- REMOTE_PROC_DOMAIN_BLOCK_PEEK = 103,
- REMOTE_PROC_DOMAIN_MEMORY_PEEK = 104,
- REMOTE_PROC_DOMAIN_EVENTS_REGISTER = 105,
- REMOTE_PROC_DOMAIN_EVENTS_DEREGISTER = 106,
- REMOTE_PROC_DOMAIN_EVENT_LIFECYCLE = 107,
- REMOTE_PROC_DOMAIN_MIGRATE_PREPARE2 = 108,
- REMOTE_PROC_DOMAIN_MIGRATE_FINISH2 = 109,
- REMOTE_PROC_GET_URI = 110,
-
- REMOTE_PROC_NODE_NUM_OF_DEVICES = 111,
- REMOTE_PROC_NODE_LIST_DEVICES = 112,
- REMOTE_PROC_NODE_DEVICE_LOOKUP_BY_NAME = 113,
- REMOTE_PROC_NODE_DEVICE_GET_XML_DESC = 114,
- REMOTE_PROC_NODE_DEVICE_GET_PARENT = 115,
- REMOTE_PROC_NODE_DEVICE_NUM_OF_CAPS = 116,
- REMOTE_PROC_NODE_DEVICE_LIST_CAPS = 117,
- REMOTE_PROC_NODE_DEVICE_DETTACH = 118,
- REMOTE_PROC_NODE_DEVICE_RE_ATTACH = 119,
- REMOTE_PROC_NODE_DEVICE_RESET = 120,
-
- REMOTE_PROC_DOMAIN_GET_SECURITY_LABEL = 121,
- REMOTE_PROC_NODE_GET_SECURITY_MODEL = 122,
- REMOTE_PROC_NODE_DEVICE_CREATE_XML = 123,
- REMOTE_PROC_NODE_DEVICE_DESTROY = 124,
- REMOTE_PROC_STORAGE_VOL_CREATE_XML_FROM = 125,
- REMOTE_PROC_NUM_OF_INTERFACES = 126,
- REMOTE_PROC_LIST_INTERFACES = 127,
- REMOTE_PROC_INTERFACE_LOOKUP_BY_NAME = 128,
- REMOTE_PROC_INTERFACE_LOOKUP_BY_MAC_STRING = 129,
- REMOTE_PROC_INTERFACE_GET_XML_DESC = 130,
-
- REMOTE_PROC_INTERFACE_DEFINE_XML = 131,
- REMOTE_PROC_INTERFACE_UNDEFINE = 132,
- REMOTE_PROC_INTERFACE_CREATE = 133,
- REMOTE_PROC_INTERFACE_DESTROY = 134,
- REMOTE_PROC_DOMAIN_XML_FROM_NATIVE = 135,
- REMOTE_PROC_DOMAIN_XML_TO_NATIVE = 136,
- REMOTE_PROC_NUM_OF_DEFINED_INTERFACES = 137,
- REMOTE_PROC_LIST_DEFINED_INTERFACES = 138,
- REMOTE_PROC_NUM_OF_SECRETS = 139,
- REMOTE_PROC_LIST_SECRETS = 140,
-
- REMOTE_PROC_SECRET_LOOKUP_BY_UUID = 141,
- REMOTE_PROC_SECRET_DEFINE_XML = 142,
- REMOTE_PROC_SECRET_GET_XML_DESC = 143,
- REMOTE_PROC_SECRET_SET_VALUE = 144,
- REMOTE_PROC_SECRET_GET_VALUE = 145,
- REMOTE_PROC_SECRET_UNDEFINE = 146,
- REMOTE_PROC_SECRET_LOOKUP_BY_USAGE = 147,
- REMOTE_PROC_DOMAIN_MIGRATE_PREPARE_TUNNEL = 148,
- REMOTE_PROC_IS_SECURE = 149,
- REMOTE_PROC_DOMAIN_IS_ACTIVE = 150,
-
- REMOTE_PROC_DOMAIN_IS_PERSISTENT = 151,
- REMOTE_PROC_NETWORK_IS_ACTIVE = 152,
- REMOTE_PROC_NETWORK_IS_PERSISTENT = 153,
- REMOTE_PROC_STORAGE_POOL_IS_ACTIVE = 154,
- REMOTE_PROC_STORAGE_POOL_IS_PERSISTENT = 155,
- REMOTE_PROC_INTERFACE_IS_ACTIVE = 156,
- REMOTE_PROC_GET_LIB_VERSION = 157,
- REMOTE_PROC_CPU_COMPARE = 158,
- REMOTE_PROC_DOMAIN_MEMORY_STATS = 159,
- REMOTE_PROC_DOMAIN_ATTACH_DEVICE_FLAGS = 160,
-
- REMOTE_PROC_DOMAIN_DETACH_DEVICE_FLAGS = 161,
- REMOTE_PROC_CPU_BASELINE = 162,
- REMOTE_PROC_DOMAIN_GET_JOB_INFO = 163,
- REMOTE_PROC_DOMAIN_ABORT_JOB = 164,
- REMOTE_PROC_STORAGE_VOL_WIPE = 165,
- REMOTE_PROC_DOMAIN_MIGRATE_SET_MAX_DOWNTIME = 166,
- REMOTE_PROC_DOMAIN_EVENTS_REGISTER_ANY = 167,
- REMOTE_PROC_DOMAIN_EVENTS_DEREGISTER_ANY = 168,
- REMOTE_PROC_DOMAIN_EVENT_REBOOT = 169,
- REMOTE_PROC_DOMAIN_EVENT_RTC_CHANGE = 170,
-
- REMOTE_PROC_DOMAIN_EVENT_WATCHDOG = 171,
- REMOTE_PROC_DOMAIN_EVENT_IO_ERROR = 172,
- REMOTE_PROC_DOMAIN_EVENT_GRAPHICS = 173,
- REMOTE_PROC_DOMAIN_UPDATE_DEVICE_FLAGS = 174,
- REMOTE_PROC_NWFILTER_LOOKUP_BY_NAME = 175,
- REMOTE_PROC_NWFILTER_LOOKUP_BY_UUID = 176,
- REMOTE_PROC_NWFILTER_GET_XML_DESC = 177,
- REMOTE_PROC_NUM_OF_NWFILTERS = 178,
- REMOTE_PROC_LIST_NWFILTERS = 179,
- REMOTE_PROC_NWFILTER_DEFINE_XML = 180,
-
- REMOTE_PROC_NWFILTER_UNDEFINE = 181,
- REMOTE_PROC_DOMAIN_MANAGED_SAVE = 182,
- REMOTE_PROC_DOMAIN_HAS_MANAGED_SAVE_IMAGE = 183,
- REMOTE_PROC_DOMAIN_MANAGED_SAVE_REMOVE = 184,
- REMOTE_PROC_DOMAIN_SNAPSHOT_CREATE_XML = 185,
- REMOTE_PROC_DOMAIN_SNAPSHOT_GET_XML_DESC = 186,
- REMOTE_PROC_DOMAIN_SNAPSHOT_NUM = 187,
- REMOTE_PROC_DOMAIN_SNAPSHOT_LIST_NAMES = 188,
- REMOTE_PROC_DOMAIN_SNAPSHOT_LOOKUP_BY_NAME = 189,
- REMOTE_PROC_DOMAIN_HAS_CURRENT_SNAPSHOT = 190,
-
- REMOTE_PROC_DOMAIN_SNAPSHOT_CURRENT = 191,
- REMOTE_PROC_DOMAIN_REVERT_TO_SNAPSHOT = 192,
- REMOTE_PROC_DOMAIN_SNAPSHOT_DELETE = 193,
- REMOTE_PROC_DOMAIN_GET_BLOCK_INFO = 194,
- REMOTE_PROC_DOMAIN_EVENT_IO_ERROR_REASON = 195,
- REMOTE_PROC_DOMAIN_CREATE_WITH_FLAGS = 196,
- REMOTE_PROC_DOMAIN_SET_MEMORY_PARAMETERS = 197,
- REMOTE_PROC_DOMAIN_GET_MEMORY_PARAMETERS = 198,
- REMOTE_PROC_DOMAIN_SET_VCPUS_FLAGS = 199,
- REMOTE_PROC_DOMAIN_GET_VCPUS_FLAGS = 200,
-
- REMOTE_PROC_DOMAIN_OPEN_CONSOLE = 201,
- REMOTE_PROC_DOMAIN_IS_UPDATED = 202,
- REMOTE_PROC_GET_SYSINFO = 203,
- REMOTE_PROC_DOMAIN_SET_MEMORY_FLAGS = 204,
- REMOTE_PROC_DOMAIN_SET_BLKIO_PARAMETERS = 205,
- REMOTE_PROC_DOMAIN_GET_BLKIO_PARAMETERS = 206,
- REMOTE_PROC_DOMAIN_MIGRATE_SET_MAX_SPEED = 207,
- REMOTE_PROC_STORAGE_VOL_UPLOAD = 208,
- REMOTE_PROC_STORAGE_VOL_DOWNLOAD = 209,
- REMOTE_PROC_DOMAIN_INJECT_NMI = 210
+ /* Each function must have a two-word comment. The first word is
+ * whether remote_generator.pl handles daemon, the second whether
+ * it handles src/remote. */
+ REMOTE_PROC_OPEN = 1, /* skipgen skipgen */
+ REMOTE_PROC_CLOSE = 2, /* skipgen skipgen */
+ REMOTE_PROC_GET_TYPE = 3, /* skipgen skipgen */
+ REMOTE_PROC_GET_VERSION = 4, /* autogen autogen */
+ REMOTE_PROC_GET_MAX_VCPUS = 5, /* autogen autogen */
+ REMOTE_PROC_NODE_GET_INFO = 6, /* autogen autogen */
+ REMOTE_PROC_GET_CAPABILITIES = 7, /* autogen autogen */
+ REMOTE_PROC_DOMAIN_ATTACH_DEVICE = 8, /* autogen autogen */
+ REMOTE_PROC_DOMAIN_CREATE = 9, /* autogen skipgen */
+ REMOTE_PROC_DOMAIN_CREATE_XML = 10, /* autogen autogen */
+
+ REMOTE_PROC_DOMAIN_DEFINE_XML = 11, /* autogen autogen */
+ REMOTE_PROC_DOMAIN_DESTROY = 12, /* autogen skipgen */
+ REMOTE_PROC_DOMAIN_DETACH_DEVICE = 13, /* autogen autogen */
+ REMOTE_PROC_DOMAIN_GET_XML_DESC = 14, /* autogen autogen */
+ REMOTE_PROC_DOMAIN_GET_AUTOSTART = 15, /* autogen autogen */
+ REMOTE_PROC_DOMAIN_GET_INFO = 16, /* autogen autogen */
+ REMOTE_PROC_DOMAIN_GET_MAX_MEMORY = 17, /* autogen autogen */
+ REMOTE_PROC_DOMAIN_GET_MAX_VCPUS = 18, /* autogen autogen */
+ REMOTE_PROC_DOMAIN_GET_OS_TYPE = 19, /* autogen autogen */
+ REMOTE_PROC_DOMAIN_GET_VCPUS = 20, /* skipgen skipgen */
+
+ REMOTE_PROC_LIST_DEFINED_DOMAINS = 21, /* autogen autogen */
+ REMOTE_PROC_DOMAIN_LOOKUP_BY_ID = 22, /* autogen autogen */
+ REMOTE_PROC_DOMAIN_LOOKUP_BY_NAME = 23, /* autogen autogen */
+ REMOTE_PROC_DOMAIN_LOOKUP_BY_UUID = 24, /* autogen autogen */
+ REMOTE_PROC_NUM_OF_DEFINED_DOMAINS = 25, /* autogen autogen */
+ REMOTE_PROC_DOMAIN_PIN_VCPU = 26, /* skipgen autogen */
+ REMOTE_PROC_DOMAIN_REBOOT = 27, /* autogen autogen */
+ REMOTE_PROC_DOMAIN_RESUME = 28, /* autogen autogen */
+ REMOTE_PROC_DOMAIN_SET_AUTOSTART = 29, /* autogen autogen */
+ REMOTE_PROC_DOMAIN_SET_MAX_MEMORY = 30, /* autogen autogen */
+
+ REMOTE_PROC_DOMAIN_SET_MEMORY = 31, /* autogen autogen */
+ REMOTE_PROC_DOMAIN_SET_VCPUS = 32, /* autogen autogen */
+ REMOTE_PROC_DOMAIN_SHUTDOWN = 33, /* autogen autogen */
+ REMOTE_PROC_DOMAIN_SUSPEND = 34, /* autogen autogen */
+ REMOTE_PROC_DOMAIN_UNDEFINE = 35, /* autogen autogen */
+ REMOTE_PROC_LIST_DEFINED_NETWORKS = 36, /* autogen autogen */
+ REMOTE_PROC_LIST_DOMAINS = 37, /* autogen skipgen */
+ REMOTE_PROC_LIST_NETWORKS = 38, /* autogen autogen */
+ REMOTE_PROC_NETWORK_CREATE = 39, /* autogen autogen */
+ REMOTE_PROC_NETWORK_CREATE_XML = 40, /* autogen autogen */
+
+ REMOTE_PROC_NETWORK_DEFINE_XML = 41, /* autogen autogen */
+ REMOTE_PROC_NETWORK_DESTROY = 42, /* autogen autogen */
+ REMOTE_PROC_NETWORK_GET_XML_DESC = 43, /* autogen autogen */
+ REMOTE_PROC_NETWORK_GET_AUTOSTART = 44, /* autogen autogen */
+ REMOTE_PROC_NETWORK_GET_BRIDGE_NAME = 45, /* autogen autogen */
+ REMOTE_PROC_NETWORK_LOOKUP_BY_NAME = 46, /* autogen autogen */
+ REMOTE_PROC_NETWORK_LOOKUP_BY_UUID = 47, /* autogen autogen */
+ REMOTE_PROC_NETWORK_SET_AUTOSTART = 48, /* autogen autogen */
+ REMOTE_PROC_NETWORK_UNDEFINE = 49, /* autogen autogen */
+ REMOTE_PROC_NUM_OF_DEFINED_NETWORKS = 50, /* autogen autogen */
+
+ REMOTE_PROC_NUM_OF_DOMAINS = 51, /* autogen autogen */
+ REMOTE_PROC_NUM_OF_NETWORKS = 52, /* autogen autogen */
+ REMOTE_PROC_DOMAIN_CORE_DUMP = 53, /* autogen autogen */
+ REMOTE_PROC_DOMAIN_RESTORE = 54, /* autogen autogen */
+ REMOTE_PROC_DOMAIN_SAVE = 55, /* autogen autogen */
+ REMOTE_PROC_DOMAIN_GET_SCHEDULER_TYPE = 56, /* skipgen skipgen */
+ REMOTE_PROC_DOMAIN_GET_SCHEDULER_PARAMETERS = 57, /* skipgen skipgen */
+ REMOTE_PROC_DOMAIN_SET_SCHEDULER_PARAMETERS = 58, /* skipgen skipgen */
+ REMOTE_PROC_GET_HOSTNAME = 59, /* autogen autogen */
+ REMOTE_PROC_SUPPORTS_FEATURE = 60, /* autogen skipgen */
+
+ REMOTE_PROC_DOMAIN_MIGRATE_PREPARE = 61, /* skipgen skipgen */
+ REMOTE_PROC_DOMAIN_MIGRATE_PERFORM = 62, /* autogen autogen */
+ REMOTE_PROC_DOMAIN_MIGRATE_FINISH = 63, /* autogen autogen */
+ REMOTE_PROC_DOMAIN_BLOCK_STATS = 64, /* autogen autogen */
+ REMOTE_PROC_DOMAIN_INTERFACE_STATS = 65, /* autogen autogen */
+ REMOTE_PROC_AUTH_LIST = 66, /* skipgen skipgen */
+ REMOTE_PROC_AUTH_SASL_INIT = 67, /* skipgen skipgen */
+ REMOTE_PROC_AUTH_SASL_START = 68, /* skipgen skipgen */
+ REMOTE_PROC_AUTH_SASL_STEP = 69, /* skipgen skipgen */
+ REMOTE_PROC_AUTH_POLKIT = 70, /* skipgen skipgen */
+
+ REMOTE_PROC_NUM_OF_STORAGE_POOLS = 71, /* autogen autogen */
+ REMOTE_PROC_LIST_STORAGE_POOLS = 72, /* autogen autogen */
+ REMOTE_PROC_NUM_OF_DEFINED_STORAGE_POOLS = 73, /* autogen autogen */
+ REMOTE_PROC_LIST_DEFINED_STORAGE_POOLS = 74, /* autogen autogen */
+ REMOTE_PROC_FIND_STORAGE_POOL_SOURCES = 75, /* autogen skipgen */
+ REMOTE_PROC_STORAGE_POOL_CREATE_XML = 76, /* autogen autogen */
+ REMOTE_PROC_STORAGE_POOL_DEFINE_XML = 77, /* autogen autogen */
+ REMOTE_PROC_STORAGE_POOL_CREATE = 78, /* autogen autogen */
+ REMOTE_PROC_STORAGE_POOL_BUILD = 79, /* autogen autogen */
+ REMOTE_PROC_STORAGE_POOL_DESTROY = 80, /* autogen autogen */
+
+ REMOTE_PROC_STORAGE_POOL_DELETE = 81, /* autogen autogen */
+ REMOTE_PROC_STORAGE_POOL_UNDEFINE = 82, /* autogen autogen */
+ REMOTE_PROC_STORAGE_POOL_REFRESH = 83, /* autogen autogen */
+ REMOTE_PROC_STORAGE_POOL_LOOKUP_BY_NAME = 84, /* autogen autogen */
+ REMOTE_PROC_STORAGE_POOL_LOOKUP_BY_UUID = 85, /* autogen autogen */
+ REMOTE_PROC_STORAGE_POOL_LOOKUP_BY_VOLUME = 86, /* autogen autogen */
+ REMOTE_PROC_STORAGE_POOL_GET_INFO = 87, /* autogen autogen */
+ REMOTE_PROC_STORAGE_POOL_GET_XML_DESC = 88, /* autogen autogen */
+ REMOTE_PROC_STORAGE_POOL_GET_AUTOSTART = 89, /* autogen autogen */
+ REMOTE_PROC_STORAGE_POOL_SET_AUTOSTART = 90, /* autogen autogen */
+
+ REMOTE_PROC_STORAGE_POOL_NUM_OF_VOLUMES = 91, /* autogen autogen */
+ REMOTE_PROC_STORAGE_POOL_LIST_VOLUMES = 92, /* autogen autogen */
+ REMOTE_PROC_STORAGE_VOL_CREATE_XML = 93, /* autogen autogen */
+ REMOTE_PROC_STORAGE_VOL_DELETE = 94, /* autogen autogen */
+ REMOTE_PROC_STORAGE_VOL_LOOKUP_BY_NAME = 95, /* autogen autogen */
+ REMOTE_PROC_STORAGE_VOL_LOOKUP_BY_KEY = 96, /* autogen autogen */
+ REMOTE_PROC_STORAGE_VOL_LOOKUP_BY_PATH = 97, /* autogen autogen */
+ REMOTE_PROC_STORAGE_VOL_GET_INFO = 98, /* autogen autogen */
+ REMOTE_PROC_STORAGE_VOL_GET_XML_DESC = 99, /* autogen autogen */
+ REMOTE_PROC_STORAGE_VOL_GET_PATH = 100, /* autogen autogen */
+
+ REMOTE_PROC_NODE_GET_CELLS_FREE_MEMORY = 101, /* autogen skipgen */
+ REMOTE_PROC_NODE_GET_FREE_MEMORY = 102, /* autogen autogen */
+ REMOTE_PROC_DOMAIN_BLOCK_PEEK = 103, /* skipgen skipgen */
+ REMOTE_PROC_DOMAIN_MEMORY_PEEK = 104, /* skipgen skipgen */
+ REMOTE_PROC_DOMAIN_EVENTS_REGISTER = 105, /* skipgen skipgen */
+ REMOTE_PROC_DOMAIN_EVENTS_DEREGISTER = 106, /* skipgen skipgen */
+ REMOTE_PROC_DOMAIN_EVENT_LIFECYCLE = 107, /* autogen autogen */
+ REMOTE_PROC_DOMAIN_MIGRATE_PREPARE2 = 108, /* skipgen skipgen */
+ REMOTE_PROC_DOMAIN_MIGRATE_FINISH2 = 109, /* autogen autogen */
+ REMOTE_PROC_GET_URI = 110, /* autogen skipgen */
+
+ REMOTE_PROC_NODE_NUM_OF_DEVICES = 111, /* autogen autogen */
+ REMOTE_PROC_NODE_LIST_DEVICES = 112, /* autogen autogen */
+ REMOTE_PROC_NODE_DEVICE_LOOKUP_BY_NAME = 113, /* autogen autogen */
+ REMOTE_PROC_NODE_DEVICE_GET_XML_DESC = 114, /* autogen autogen */
+ REMOTE_PROC_NODE_DEVICE_GET_PARENT = 115, /* skipgen skipgen */
+ REMOTE_PROC_NODE_DEVICE_NUM_OF_CAPS = 116, /* autogen autogen */
+ REMOTE_PROC_NODE_DEVICE_LIST_CAPS = 117, /* autogen autogen */
+ REMOTE_PROC_NODE_DEVICE_DETTACH = 118, /* autogen skipgen */
+ REMOTE_PROC_NODE_DEVICE_RE_ATTACH = 119, /* autogen skipgen */
+ REMOTE_PROC_NODE_DEVICE_RESET = 120, /* autogen skipgen */
+
+ REMOTE_PROC_DOMAIN_GET_SECURITY_LABEL = 121, /* skipgen skipgen */
+ REMOTE_PROC_NODE_GET_SECURITY_MODEL = 122, /* skipgen skipgen */
+ REMOTE_PROC_NODE_DEVICE_CREATE_XML = 123, /* autogen autogen */
+ REMOTE_PROC_NODE_DEVICE_DESTROY = 124, /* autogen autogen */
+ REMOTE_PROC_STORAGE_VOL_CREATE_XML_FROM = 125, /* autogen autogen */
+ REMOTE_PROC_NUM_OF_INTERFACES = 126, /* autogen autogen */
+ REMOTE_PROC_LIST_INTERFACES = 127, /* autogen autogen */
+ REMOTE_PROC_INTERFACE_LOOKUP_BY_NAME = 128, /* autogen autogen */
+ REMOTE_PROC_INTERFACE_LOOKUP_BY_MAC_STRING = 129, /* autogen autogen */
+ REMOTE_PROC_INTERFACE_GET_XML_DESC = 130, /* autogen autogen */
+
+ REMOTE_PROC_INTERFACE_DEFINE_XML = 131, /* autogen autogen */
+ REMOTE_PROC_INTERFACE_UNDEFINE = 132, /* autogen autogen */
+ REMOTE_PROC_INTERFACE_CREATE = 133, /* autogen autogen */
+ REMOTE_PROC_INTERFACE_DESTROY = 134, /* autogen autogen */
+ REMOTE_PROC_DOMAIN_XML_FROM_NATIVE = 135, /* autogen autogen */
+ REMOTE_PROC_DOMAIN_XML_TO_NATIVE = 136, /* autogen autogen */
+ REMOTE_PROC_NUM_OF_DEFINED_INTERFACES = 137, /* autogen autogen */
+ REMOTE_PROC_LIST_DEFINED_INTERFACES = 138, /* autogen autogen */
+ REMOTE_PROC_NUM_OF_SECRETS = 139, /* autogen autogen */
+ REMOTE_PROC_LIST_SECRETS = 140, /* autogen autogen */
+
+ REMOTE_PROC_SECRET_LOOKUP_BY_UUID = 141, /* autogen autogen */
+ REMOTE_PROC_SECRET_DEFINE_XML = 142, /* autogen autogen */
+ REMOTE_PROC_SECRET_GET_XML_DESC = 143, /* autogen autogen */
+ REMOTE_PROC_SECRET_SET_VALUE = 144, /* autogen autogen */
+ REMOTE_PROC_SECRET_GET_VALUE = 145, /* skipgen skipgen */
+ REMOTE_PROC_SECRET_UNDEFINE = 146, /* autogen autogen */
+ REMOTE_PROC_SECRET_LOOKUP_BY_USAGE = 147, /* autogen autogen */
+ REMOTE_PROC_DOMAIN_MIGRATE_PREPARE_TUNNEL = 148, /* skipgen skipgen */
+ REMOTE_PROC_IS_SECURE = 149, /* autogen skipgen */
+ REMOTE_PROC_DOMAIN_IS_ACTIVE = 150, /* autogen autogen */
+
+ REMOTE_PROC_DOMAIN_IS_PERSISTENT = 151, /* autogen autogen */
+ REMOTE_PROC_NETWORK_IS_ACTIVE = 152, /* autogen autogen */
+ REMOTE_PROC_NETWORK_IS_PERSISTENT = 153, /* autogen autogen */
+ REMOTE_PROC_STORAGE_POOL_IS_ACTIVE = 154, /* autogen autogen */
+ REMOTE_PROC_STORAGE_POOL_IS_PERSISTENT = 155, /* autogen autogen */
+ REMOTE_PROC_INTERFACE_IS_ACTIVE = 156, /* autogen autogen */
+ REMOTE_PROC_GET_LIB_VERSION = 157, /* autogen autogen */
+ REMOTE_PROC_CPU_COMPARE = 158, /* autogen autogen */
+ REMOTE_PROC_DOMAIN_MEMORY_STATS = 159, /* skipgen skipgen */
+ REMOTE_PROC_DOMAIN_ATTACH_DEVICE_FLAGS = 160, /* autogen autogen */
+
+ REMOTE_PROC_DOMAIN_DETACH_DEVICE_FLAGS = 161, /* autogen autogen */
+ REMOTE_PROC_CPU_BASELINE = 162, /* autogen autogen */
+ REMOTE_PROC_DOMAIN_GET_JOB_INFO = 163, /* autogen autogen */
+ REMOTE_PROC_DOMAIN_ABORT_JOB = 164, /* autogen autogen */
+ REMOTE_PROC_STORAGE_VOL_WIPE = 165, /* autogen autogen */
+ REMOTE_PROC_DOMAIN_MIGRATE_SET_MAX_DOWNTIME = 166, /* autogen autogen */
+ REMOTE_PROC_DOMAIN_EVENTS_REGISTER_ANY = 167, /* skipgen skipgen */
+ REMOTE_PROC_DOMAIN_EVENTS_DEREGISTER_ANY = 168, /* skipgen skipgen */
+ REMOTE_PROC_DOMAIN_EVENT_REBOOT = 169, /* autogen autogen */
+ REMOTE_PROC_DOMAIN_EVENT_RTC_CHANGE = 170, /* autogen autogen */
+
+ REMOTE_PROC_DOMAIN_EVENT_WATCHDOG = 171, /* autogen autogen */
+ REMOTE_PROC_DOMAIN_EVENT_IO_ERROR = 172, /* autogen autogen */
+ REMOTE_PROC_DOMAIN_EVENT_GRAPHICS = 173, /* autogen autogen */
+ REMOTE_PROC_DOMAIN_UPDATE_DEVICE_FLAGS = 174, /* autogen autogen */
+ REMOTE_PROC_NWFILTER_LOOKUP_BY_NAME = 175, /* autogen autogen */
+ REMOTE_PROC_NWFILTER_LOOKUP_BY_UUID = 176, /* autogen autogen */
+ REMOTE_PROC_NWFILTER_GET_XML_DESC = 177, /* autogen autogen */
+ REMOTE_PROC_NUM_OF_NWFILTERS = 178, /* autogen autogen */
+ REMOTE_PROC_LIST_NWFILTERS = 179, /* autogen autogen */
+ REMOTE_PROC_NWFILTER_DEFINE_XML = 180, /* autogen autogen */
+
+ REMOTE_PROC_NWFILTER_UNDEFINE = 181, /* autogen autogen */
+ REMOTE_PROC_DOMAIN_MANAGED_SAVE = 182, /* autogen autogen */
+ REMOTE_PROC_DOMAIN_HAS_MANAGED_SAVE_IMAGE = 183, /* autogen autogen */
+ REMOTE_PROC_DOMAIN_MANAGED_SAVE_REMOVE = 184, /* autogen autogen */
+ REMOTE_PROC_DOMAIN_SNAPSHOT_CREATE_XML = 185, /* autogen autogen */
+ REMOTE_PROC_DOMAIN_SNAPSHOT_GET_XML_DESC = 186, /* autogen autogen */
+ REMOTE_PROC_DOMAIN_SNAPSHOT_NUM = 187, /* autogen autogen */
+ REMOTE_PROC_DOMAIN_SNAPSHOT_LIST_NAMES = 188, /* autogen autogen */
+ REMOTE_PROC_DOMAIN_SNAPSHOT_LOOKUP_BY_NAME = 189, /* autogen autogen */
+ REMOTE_PROC_DOMAIN_HAS_CURRENT_SNAPSHOT = 190, /* autogen autogen */
+
+ REMOTE_PROC_DOMAIN_SNAPSHOT_CURRENT = 191, /* autogen autogen */
+ REMOTE_PROC_DOMAIN_REVERT_TO_SNAPSHOT = 192, /* autogen autogen */
+ REMOTE_PROC_DOMAIN_SNAPSHOT_DELETE = 193, /* autogen autogen */
+ REMOTE_PROC_DOMAIN_GET_BLOCK_INFO = 194, /* autogen autogen */
+ REMOTE_PROC_DOMAIN_EVENT_IO_ERROR_REASON = 195, /* autogen autogen */
+ REMOTE_PROC_DOMAIN_CREATE_WITH_FLAGS = 196, /* skipgen skipgen */
+ REMOTE_PROC_DOMAIN_SET_MEMORY_PARAMETERS = 197, /* skipgen skipgen */
+ REMOTE_PROC_DOMAIN_GET_MEMORY_PARAMETERS = 198, /* skipgen skipgen */
+ REMOTE_PROC_DOMAIN_SET_VCPUS_FLAGS = 199, /* autogen autogen */
+ REMOTE_PROC_DOMAIN_GET_VCPUS_FLAGS = 200, /* autogen autogen */
+
+ REMOTE_PROC_DOMAIN_OPEN_CONSOLE = 201, /* skipgen skipgen */
+ REMOTE_PROC_DOMAIN_IS_UPDATED = 202, /* autogen autogen */
+ REMOTE_PROC_GET_SYSINFO = 203, /* autogen autogen */
+ REMOTE_PROC_DOMAIN_SET_MEMORY_FLAGS = 204, /* autogen autogen */
+ REMOTE_PROC_DOMAIN_SET_BLKIO_PARAMETERS = 205, /* skipgen skipgen */
+ REMOTE_PROC_DOMAIN_GET_BLKIO_PARAMETERS = 206, /* skipgen skipgen */
+ REMOTE_PROC_DOMAIN_MIGRATE_SET_MAX_SPEED = 207, /* autogen autogen */
+ REMOTE_PROC_STORAGE_VOL_UPLOAD = 208, /* skipgen skipgen */
+ REMOTE_PROC_STORAGE_VOL_DOWNLOAD = 209, /* skipgen skipgen */
+ REMOTE_PROC_DOMAIN_INJECT_NMI = 210 /* autogen autogen */
/*
* Notice how the entries are grouped in sets of 10 ?
--
1.7.0.4
13 years, 6 months
[libvirt] [PATCH] build: silence clang false positive
by Eric Blake
Clang couldn't quite see that the same condition of
(flags & VIR_DOMAIN_MEM_CONFIG) is used twice, such that
the second block is guaranteed that def was assigned in
the first block.
* src/libxl/libxl_driver.c (libxlDomainSetMemoryFlags): Add a hint
for clang.
---
src/libxl/libxl_driver.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/src/libxl/libxl_driver.c b/src/libxl/libxl_driver.c
index aedee97..a08732b 100644
--- a/src/libxl/libxl_driver.c
+++ b/src/libxl/libxl_driver.c
@@ -1549,6 +1549,8 @@ libxlDomainSetMemoryFlags(virDomainPtr dom, unsigned long memory,
ret = 0;
if (flags & VIR_DOMAIN_MEM_CONFIG) {
+ /* clang 2.9 needs an extra hint. */
+ sa_assert(def);
def->mem.cur_balloon = memory;
ret = virDomainSaveConfig(driver->configDir, def);
}
--
1.7.4.4
13 years, 6 months
[libvirt] [PATCH] nwfilter: drop unused flag argument
by Eric Blake
The public API has no flags argument, so neither should the internal
callback API. This simplifies the RPC generator.
* src/driver.h (virDrvNWFilterDefineXML): Drop argument that does
not match public API.
* src/nwfilter/nwfilter_driver.c (nwfilterDefine): Likewise.
* src/libvirt.c (virNWFilterDefineXML): Likewise.
* daemon/remote_generator.pl: Drop special case.
---
The comment in the generator was a bit off - the public API had
no flags argument, just the internal callback API.
daemon/remote_generator.pl | 6 ------
src/driver.h | 3 +--
src/libvirt.c | 2 +-
src/nwfilter/nwfilter_driver.c | 6 +++---
4 files changed, 5 insertions(+), 12 deletions(-)
diff --git a/daemon/remote_generator.pl b/daemon/remote_generator.pl
index bce6261..c53ebc8 100755
--- a/daemon/remote_generator.pl
+++ b/daemon/remote_generator.pl
@@ -879,12 +879,6 @@ elsif ($opt_k) {
push(@args_list, "virConnectPtr conn");
}
- if ($call->{ProcName} eq "NWFilterDefineXML") {
- # SPECIAL: virNWFilterDefineXML has a flags parameter in the
- # public API that is missing in the XDR protocol
- push(@args_list, "unsigned int flags ATTRIBUTE_UNUSED");
- }
-
# fix priv_name for the NumOf* functions
if ($priv_name eq "privateData" and
!($call->{ProcName} =~ m/(Domains|DomainSnapshot)/) and
diff --git a/src/driver.h b/src/driver.h
index 5cd0cea..ea80701 100644
--- a/src/driver.h
+++ b/src/driver.h
@@ -1181,8 +1181,7 @@ typedef virNWFilterPtr
const unsigned char *uuid);
typedef virNWFilterPtr
(*virDrvNWFilterDefineXML) (virConnectPtr conn,
- const char *xmlDesc,
- unsigned int flags);
+ const char *xmlDesc);
typedef int
(*virDrvNWFilterUndefine) (virNWFilterPtr nwfilter);
diff --git a/src/libvirt.c b/src/libvirt.c
index 0726df4..7564db0 100644
--- a/src/libvirt.c
+++ b/src/libvirt.c
@@ -12253,7 +12253,7 @@ virNWFilterDefineXML(virConnectPtr conn, const char *xmlDesc)
if (conn->nwfilterDriver && conn->nwfilterDriver->defineXML) {
virNWFilterPtr ret;
- ret = conn->nwfilterDriver->defineXML (conn, xmlDesc, 0);
+ ret = conn->nwfilterDriver->defineXML (conn, xmlDesc);
if (!ret)
goto error;
return ret;
diff --git a/src/nwfilter/nwfilter_driver.c b/src/nwfilter/nwfilter_driver.c
index 17af7a6..18ea752 100644
--- a/src/nwfilter/nwfilter_driver.c
+++ b/src/nwfilter/nwfilter_driver.c
@@ -2,7 +2,7 @@
* nwfilter_driver.c: core driver for network filter APIs
* (based on storage_driver.c)
*
- * Copyright (C) 2006-2010 Red Hat, Inc.
+ * Copyright (C) 2006-2011 Red Hat, Inc.
* Copyright (C) 2006-2008 Daniel P. Berrange
* Copyright (C) 2010 IBM Corporation
* Copyright (C) 2010 Stefan Berger
@@ -327,8 +327,8 @@ nwfilterListNWFilters(virConnectPtr conn,
static virNWFilterPtr
nwfilterDefine(virConnectPtr conn,
- const char *xml,
- unsigned int flags ATTRIBUTE_UNUSED) {
+ const char *xml)
+{
virNWFilterDriverStatePtr driver = conn->nwfilterPrivateData;
virNWFilterDefPtr def;
virNWFilterObjPtr nwfilter = NULL;
--
1.7.4.4
13 years, 6 months
Re: [libvirt] [PATCH 3/9] add DHCP snooping support to nwfilter
by David Stevens
Stefan Berger/Watson/IBM wrote on 05/11/2011 12:20:49 PM:
>
> The mac chain is there for supporting multiple MAC addresses per
> interface. What is the use case for having
> multiple MAC address on an interface and how do I set this up in a
> Linux guest for example?
I don't know if Linux guests support it now, but I wanted to
eliminate the unnecessary requirement from nwfilter. Most real NICs
support multiple MAC addresses; failover mechanisms can make use of
it (e.g., by moving a MAC address from one device to another one that
already has one).
But the feature in nwfilter is more generally useful since it
allows a host administrator to assign a set of legal MAC addresses
to a VM and the VM user can choose/use any one of them at run time.
Of course, VM users may have other reasons for wanting multiple
MAC addresses on the same interface; the real point is that there's
no technical reason to restrict it within nwfilter.
> I am not sure whether we should remove a chain, i.e., the 'arp'
> chain here. Adding is ok. Maybe the existing chain 'arp' could be
> doing one part and 'arpmac' the other ?
I renamed it to make it clearer what fields specifically each is
checking for ARP. If you're concerned about compatibility with existing
filters, we could either leave "arp" as an empty stub, or put one or the
other of arpip or arpmac under that name. But this, as with the "drop"
policy change, I think comes down to my belief that administrators have
to revisit existing custom filters if we make any change whatsoever to
the set in examples. So, I made that set self-consistent, but any filters
that rely on changing any of them need to be reworked for any change.
Independent custom filters aren't affected, of course.
>
> Can you run a VM and do a 'ebtables -t nat -L' and post the output.
> I'd be curious how
> the chains look like now with the 'clean-traffic' filter without
> having to apply the
> patches and test them.
<two stages -- before DHCP ACK and after below>
Bridge table: nat
Bridge chain: PREROUTING, entries: 1, policy: ACCEPT
-i vnet0 -j libvirt-I-vnet0
Bridge chain: OUTPUT, entries: 0, policy: ACCEPT
Bridge chain: POSTROUTING, entries: 1, policy: ACCEPT
-o vnet0 -j libvirt-O-vnet0
Bridge chain: libvirt-I-vnet0, entries: 9, policy: ACCEPT
-j I-vnet0-mac
-p IPv4 -j I-vnet0-ipv4
-p ARP -j I-vnet0-arpmac
-p ARP -j I-vnet0-arpip
-p 0x8035 -j I-vnet0-rarp
-p 0x835 -j ACCEPT
-p IPv4 -j ACCEPT
-p ARP -j ACCEPT
-j DROP
Bridge chain: libvirt-O-vnet0, entries: 5, policy: ACCEPT
-p IPv4 -j O-vnet0-ipv4
-p 0x8035 -j O-vnet0-rarp
-p IPv4 -j ACCEPT
-p ARP -j ACCEPT
-j DROP
Bridge chain: I-vnet0-mac, entries: 1, policy: DROP
-s 54:0:0:0:0:1 -j RETURN
Bridge chain: I-vnet0-ipv4, entries: 1, policy: DROP
-p IPv4 --ip-src 0.0.0.0 --ip-proto udp --ip-sport 68 -j RETURN
Bridge chain: O-vnet0-ipv4, entries: 1, policy: DROP
-j ACCEPT
Bridge chain: I-vnet0-arpmac, entries: 1, policy: DROP
-p ARP --arp-mac-src 54:0:0:0:0:1 -j RETURN
Bridge chain: I-vnet0-arpip, entries: 1, policy: DROP
-p ARP --arp-ip-src 0.0.0.0 -j RETURN
Bridge chain: I-vnet0-rarp, entries: 1, policy: DROP
-p 0x8035 -s 54:0:0:0:0:1 -d Broadcast --arp-op Request_Reverse
--arp-ip-src 0.0.0.0 --arp-ip-dst 0.0.0.0 --arp-mac-src 54:0:0:0:0:1
--arp-mac-dst 54:0:0:0:0:1 -j ACCEPT
Bridge chain: O-vnet0-rarp, entries: 1, policy: DROP
-p 0x8035 -d Broadcast --arp-op Request_Reverse --arp-ip-src 0.0.0.0
--arp-ip-dst 0.0.0.0 --arp-mac-src 54:0:0:0:0:1
--arp-mac-dst 54:0:0:0:0:1 -j ACCEPT
[after DHCP ACK]
Bridge table: nat
Bridge chain: PREROUTING, entries: 1, policy: ACCEPT
-i vnet0 -j libvirt-I-vnet0
Bridge chain: OUTPUT, entries: 0, policy: ACCEPT
Bridge chain: POSTROUTING, entries: 1, policy: ACCEPT
-o vnet0 -j libvirt-O-vnet0
Bridge chain: libvirt-I-vnet0, entries: 9, policy: ACCEPT
-j I-vnet0-mac
-p IPv4 -j I-vnet0-ipv4
-p ARP -j I-vnet0-arpmac
-p ARP -j I-vnet0-arpip
-p 0x8035 -j I-vnet0-rarp
-p 0x835 -j ACCEPT
-p IPv4 -j ACCEPT
-p ARP -j ACCEPT
-j DROP
Bridge chain: libvirt-O-vnet0, entries: 5, policy: ACCEPT
-p IPv4 -j O-vnet0-ipv4
-p 0x8035 -j O-vnet0-rarp
-p IPv4 -j ACCEPT
-p ARP -j ACCEPT
-j DROP
Bridge chain: I-vnet0-mac, entries: 1, policy: DROP
-s 54:0:0:0:0:1 -j RETURN
Bridge chain: I-vnet0-ipv4, entries: 2, policy: DROP
-p IPv4 --ip-src 0.0.0.0 --ip-proto udp --ip-sport 68 -j RETURN
-p IPv4 --ip-src 10.0.0.1 -j RETURN
Bridge chain: O-vnet0-ipv4, entries: 1, policy: DROP
-j ACCEPT
Bridge chain: I-vnet0-arpmac, entries: 1, policy: DROP
-p ARP --arp-mac-src 54:0:0:0:0:1 -j RETURN
Bridge chain: I-vnet0-arpip, entries: 2, policy: DROP
-p ARP --arp-ip-src 0.0.0.0 -j RETURN
-p ARP --arp-ip-src 10.0.0.1 -j RETURN
Bridge chain: I-vnet0-rarp, entries: 1, policy: DROP
-p 0x8035 -s 54:0:0:0:0:1 -d Broadcast --arp-op Request_Reverse
--arp-ip-src 0.0.0.0 --arp-ip-dst 0.0.0.0 --arp-mac-src 54:0:0:0:0:1
--arp-mac-dst 54:0:0:0:0:1 -j ACCEPT
Bridge chain: O-vnet0-rarp, entries: 1, policy: DROP
-p 0x8035 -d Broadcast --arp-op Request_Reverse --arp-ip-src 0.0.0.0
--arp-ip-dst 0.0.0.0 --arp-mac-src 54:0:0:0:0:1
--arp-mac-dst 54:0:0:0:0:1 -j ACCEPT
thanks,
+-DLS
13 years, 6 months
Re: [libvirt] [PATCH 4/9] add DHCP snooping support to nwfilter
by David Stevens
Stefan Berger/Watson/IBM wrote on 05/11/2011 12:32:41 PM:
>
> So now this command puts the default policy of every ebtables chain
> to end with an implicit drop. What if I had previously
> created a filter assuming an implicit accept, which is the current
> behavior? Now that filter wouldn't work correctly anymore
> since my packets all get droped. Is this change really necessary?
Well, all of the generated chains need this (to support
multiple address matching). This can, of course, be done by
adding a "-j DROP" at the end of every chain. But since it is
all of them, I thought changing the default and having fewer
rules made a lot more sense.
So, it isn't a requirement, but any modifications to these
chains will need to account for either a DROP policy explicitly
or a "-j DROP" at the end, if it's modifying an existing filter.
I don't see any way around custom filters needing to be
reviewed and adapted to any change in the examples set. Independent
filters can explicitly use "-j DROP" or "-j ACCEPT" and not rely
on the policy, but insertions in existing filters can't insert
after a "-j DROP" and still work, either. With the changed policy,
they can append rules and possibly still work without modification.
+-DLS
13 years, 6 months
[libvirt] [PATCH 0/4] Enable libvirt to attach to existing QEMU instances
by Daniel P. Berrange
This is the bare minimum code required to allow libvirt to connect
to an externally launched QEMU instance, reverse engineering the
XML configuration from the command line args.
$ qemu-kvm -cdrom ~/demo.iso \
-monitor unix:/tmp/demo,server,nowait \
-name foo \
-uuid cece4f9f-dff0-575d-0e8e-01fe380f12ea &
$ QEMUPID=$$
$ virsh qemu-attach $QEMUPID
Domain foo attached to pid 10079
$ ./tools/virsh dumpxml foo
<domain type='kvm' id='3'>
<name>foo</name>
<uuid>cece4f9f-dff0-575d-0e8e-01fe380f12ea</uuid>
<memory>65536</memory>
<currentMemory>65536</currentMemory>
<vcpu>1</vcpu>
<os>
<type arch='i686' machine='pc-0.14'>hvm</type>
</os>
<features>
<acpi/>
<pae/>
</features>
<clock offset='utc'/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>destroy</on_crash>
<devices>
<emulator>/usr/bin/qemu-kvm</emulator>
<disk type='file' device='cdrom'>
<source file='/home/berrange/demo.iso'/>
<target dev='hdc' bus='ide'/>
<readonly/>
<address type='drive' controller='0' bus='1' unit='0'/>
</disk>
<controller type='ide' index='0'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
</controller>
<input type='mouse' bus='ps2'/>
<graphics type='vnc' port='5901' autoport='no'/>
<video>
<model type='cirrus' vram='9216' heads='1'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
</video>
<memballoon model='virtio'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
</memballoon>
</devices>
</domain>
The biggest problem is that our ARGV-> XML convertor does not know
about the -device syntax people often now use.
There is also some robustness work to be done the QEMU driver in
general, to remove some assumptions that no longer hold true. For
example in our domain shutdown code, there are bits of cleanup
we should skip because we will not have done the corresponding
setup in the first place.
We also need to verify what happens with all the various APIs
particularly device hotplug, to ensure there are no bad results.
That said, even as it is, this functionality will be quite
useful for QEMU developers
13 years, 6 months
[libvirt] [PATCH] libvirt, logging: cleanup VIR_DEBUG0() VIR_INFO0() VIR_WARN0() VIR_ERROR0()
by Lai Jiangshan
These VIR_XXXX0 APIs make us confused, use the non-0-suffix APIs instead.
How these coversions works? The magic is using ##.
#define high_levle_api(fmt, ...) low_levle_api(fmt, ##__VA_ARGS__)
When __VA_ARGS__ is empty, "##" will swallow the "," in "fmt," to avoid compile error.
example: origin after CPP
high_levle_api("%d", a_int) low_levle_api("%d", a_int)
high_levle_api("a string") low_levle_api("a string")
About 400 conversions.
8 special conversions:
VIR_XXXX0("") -> VIR_XXXX(" ") (avoid empty format) 2 conversions
VIR_XXXX0(string_literal_with_%) -> VIR_XXXX(%->%%) 0 conversions
VIR_XXXX0(non_string_literal) -> VIR_XXXX("%s", non_string_literal) (for security) 6 conversions
Signed-off-by: Lai Jiangshan <laijs(a)cn.fujitsu.com>
---
daemon/libvirtd.c | 76 ++++++++++----------
daemon/remote.c | 32 ++++----
daemon/stream.c | 2 +-
examples/domain-events/events-c/event-test.c | 10 +--
src/cpu/cpu_x86.c | 4 +-
src/esx/esx_driver.c | 8 +-
src/esx/esx_vi.c | 12 ++--
src/libvirt.c | 4 +-
src/libxl/libxl_driver.c | 18 ++--
src/lxc/lxc_conf.c | 4 +-
src/lxc/lxc_container.c | 10 +-
src/lxc/lxc_controller.c | 8 +-
src/lxc/lxc_driver.c | 12 ++--
src/network/bridge_driver.c | 4 +-
src/node_device/node_device_hal.c | 28 ++++----
src/node_device/node_device_linux_sysfs.c | 2 +-
src/node_device/node_device_udev.c | 8 +-
src/nwfilter/nwfilter_ebiptables_driver.c | 2 +-
src/openvz/openvz_driver.c | 6 +-
src/phyp/phyp_driver.c | 102 +++++++++++++-------------
src/qemu/qemu_audit.c | 30 ++++----
src/qemu/qemu_capabilities.c | 4 +-
src/qemu/qemu_cgroup.c | 2 +-
src/qemu/qemu_conf.c | 4 +-
src/qemu/qemu_domain.c | 2 +-
src/qemu/qemu_driver.c | 10 +-
src/qemu/qemu_hotplug.c | 22 +++---
src/qemu/qemu_migration.c | 14 ++--
src/qemu/qemu_monitor.c | 2 +-
src/qemu/qemu_monitor_json.c | 36 +++++-----
src/qemu/qemu_monitor_text.c | 8 +-
src/qemu/qemu_process.c | 48 ++++++------
src/remote/remote_driver.c | 64 ++++++++--------
src/secret/secret_driver.c | 2 +-
src/storage/storage_backend_logical.c | 2 +-
src/test/test_driver.c | 2 +-
src/uml/uml_conf.c | 2 +-
src/uml/uml_driver.c | 14 ++--
src/util/bridge.c | 10 +-
src/util/cgroup.c | 4 +-
src/util/command.c | 18 ++--
src/util/event.c | 4 +-
src/util/event_poll.c | 2 +-
src/util/hash.c | 2 +-
src/util/json.c | 8 +-
src/util/logging.c | 10 +-
src/util/logging.h | 24 ++----
src/util/pci.c | 4 +-
src/util/util.c | 8 +-
src/util/virtaudit.c | 2 +-
src/vbox/vbox_driver.c | 14 ++--
src/vbox/vbox_tmpl.c | 32 ++++----
src/vmx/vmx.c | 4 +-
src/xen/xen_driver.c | 28 ++++----
src/xen/xen_hypervisor.c | 18 ++--
src/xen/xen_inotify.c | 12 ++--
src/xen/xend_internal.c | 2 +-
src/xen/xs_internal.c | 12 ++--
src/xenxs/xen_sxpr.c | 2 +-
59 files changed, 415 insertions(+), 425 deletions(-)
diff --git a/daemon/libvirtd.c b/daemon/libvirtd.c
index 42cbe5d..900861a 100644
--- a/daemon/libvirtd.c
+++ b/daemon/libvirtd.c
@@ -413,11 +413,11 @@ qemudDispatchSignalEvent(int watch ATTRIBUTE_UNUSED,
switch (siginfo.si_signo) {
case SIGHUP:
- VIR_INFO0(_("Reloading configuration on SIGHUP"));
+ VIR_INFO(_("Reloading configuration on SIGHUP"));
virHookCall(VIR_HOOK_DRIVER_DAEMON, "-",
VIR_HOOK_DAEMON_OP_RELOAD, SIGHUP, "SIGHUP", NULL);
if (virStateReload() < 0)
- VIR_WARN0("Error while reloading drivers");
+ VIR_WARN("Error while reloading drivers");
break;
@@ -566,7 +566,7 @@ static int qemudListenUnix(struct qemud_server *server,
char ebuf[1024];
if (VIR_ALLOC(sock) < 0) {
- VIR_ERROR0(_("Failed to allocate memory for struct qemud_socket"));
+ VIR_ERROR(_("Failed to allocate memory for struct qemud_socket"));
return -1;
}
@@ -875,7 +875,7 @@ static struct qemud_server *qemudInitialize(void) {
struct qemud_server *server;
if (VIR_ALLOC(server) < 0) {
- VIR_ERROR0(_("Failed to allocate struct qemud_server"));
+ VIR_ERROR(_("Failed to allocate struct qemud_server"));
return NULL;
}
@@ -883,12 +883,12 @@ static struct qemud_server *qemudInitialize(void) {
server->sigread = server->sigwrite = -1;
if (virMutexInit(&server->lock) < 0) {
- VIR_ERROR0(_("cannot initialize mutex"));
+ VIR_ERROR(_("cannot initialize mutex"));
VIR_FREE(server);
return NULL;
}
if (virCondInit(&server->job) < 0) {
- VIR_ERROR0(_("cannot initialize condition variable"));
+ VIR_ERROR(_("cannot initialize condition variable"));
virMutexDestroy(&server->lock);
VIR_FREE(server);
return NULL;
@@ -1103,7 +1103,7 @@ static int qemudNetworkEnable(struct qemud_server *server) {
VIR_EVENT_HANDLE_HANGUP,
qemudDispatchServerEvent,
server, NULL)) < 0) {
- VIR_ERROR0(_("Failed to add server event callback"));
+ VIR_ERROR(_("Failed to add server event callback"));
return -1;
}
@@ -1189,29 +1189,29 @@ remoteCheckCertificate(struct qemud_client *client)
if (status != 0) {
if (status & GNUTLS_CERT_INVALID)
- VIR_ERROR0(_("The client certificate is not trusted."));
+ VIR_ERROR(_("The client certificate is not trusted."));
if (status & GNUTLS_CERT_SIGNER_NOT_FOUND)
- VIR_ERROR0(_("The client certificate has unknown issuer."));
+ VIR_ERROR(_("The client certificate has unknown issuer."));
if (status & GNUTLS_CERT_REVOKED)
- VIR_ERROR0(_("The client certificate has been revoked."));
+ VIR_ERROR(_("The client certificate has been revoked."));
#ifndef GNUTLS_1_0_COMPAT
if (status & GNUTLS_CERT_INSECURE_ALGORITHM)
- VIR_ERROR0(_("The client certificate uses an insecure algorithm."));
+ VIR_ERROR(_("The client certificate uses an insecure algorithm."));
#endif
goto authdeny;
}
if (gnutls_certificate_type_get(client->tlssession) != GNUTLS_CRT_X509) {
- VIR_ERROR0(_("Only x509 certificates are supported"));
+ VIR_ERROR(_("Only x509 certificates are supported"));
goto authdeny;
}
if (!(certs = gnutls_certificate_get_peers(client->tlssession, &nCerts))) {
- VIR_ERROR0(_("The certificate has no peers"));
+ VIR_ERROR(_("The certificate has no peers"));
goto authdeny;
}
@@ -1221,12 +1221,12 @@ remoteCheckCertificate(struct qemud_client *client)
gnutls_x509_crt_t cert;
if (gnutls_x509_crt_init (&cert) < 0) {
- VIR_ERROR0(_("Unable to initialize certificate"));
+ VIR_ERROR(_("Unable to initialize certificate"));
goto authfail;
}
if (gnutls_x509_crt_import(cert, &certs[i], GNUTLS_X509_FMT_DER) < 0) {
- VIR_ERROR0(_("Unable to load certificate"));
+ VIR_ERROR(_("Unable to load certificate"));
gnutls_x509_crt_deinit (cert);
goto authfail;
}
@@ -1242,7 +1242,7 @@ remoteCheckCertificate(struct qemud_client *client)
if (!remoteCheckDN (name)) {
/* This is the most common error: make it informative. */
- VIR_ERROR0(_("Client's Distinguished Name is not on the list "
+ VIR_ERROR(_("Client's Distinguished Name is not on the list "
"of allowed clients (tls_allowed_dn_list). Use "
"'certtool -i --infile clientcert.pem' to view the"
"Distinguished Name field in the client certificate,"
@@ -1253,13 +1253,13 @@ remoteCheckCertificate(struct qemud_client *client)
}
if (gnutls_x509_crt_get_expiration_time (cert) < now) {
- VIR_ERROR0(_("The client certificate has expired"));
+ VIR_ERROR(_("The client certificate has expired"));
gnutls_x509_crt_deinit (cert);
goto authdeny;
}
if (gnutls_x509_crt_get_activation_time (cert) > now) {
- VIR_ERROR0(_("The client certificate is not yet active"));
+ VIR_ERROR(_("The client certificate is not yet active"));
gnutls_x509_crt_deinit (cert);
goto authdeny;
}
@@ -1285,10 +1285,10 @@ remoteCheckAccess (struct qemud_client *client)
/* Verify client certificate. */
if (remoteCheckCertificate (client) == -1) {
- VIR_ERROR0(_("remoteCheckCertificate: "
+ VIR_ERROR(_("remoteCheckCertificate: "
"failed to verify client's certificate"));
if (!tls_no_verify_certificate) return -1;
- else VIR_INFO0(_("remoteCheckCertificate: tls_no_verify_certificate "
+ else VIR_INFO(_("remoteCheckCertificate: tls_no_verify_certificate "
"is set so the bad certificate is ignored"));
}
@@ -1356,7 +1356,7 @@ static int qemudDispatchServer(struct qemud_server *server, struct qemud_socket
return -1;
}
if (!(addrstr = virSocketFormatAddrFull(&addr, true, ";"))) {
- VIR_ERROR0(_("Failed to format addresss: out of memory"));
+ VIR_ERROR(_("Failed to format addresss: out of memory"));
goto error;
}
@@ -1371,7 +1371,7 @@ static int qemudDispatchServer(struct qemud_server *server, struct qemud_socket
if (VIR_RESIZE_N(server->clients, server->nclients_max,
server->nclients, 1) < 0) {
- VIR_ERROR0(_("Out of memory allocating clients"));
+ VIR_ERROR(_("Out of memory allocating clients"));
goto error;
}
@@ -1408,7 +1408,7 @@ static int qemudDispatchServer(struct qemud_server *server, struct qemud_socket
if (VIR_ALLOC(client) < 0)
goto error;
if (virMutexInit(&client->lock) < 0) {
- VIR_ERROR0(_("cannot initialize mutex"));
+ VIR_ERROR(_("cannot initialize mutex"));
goto error;
}
@@ -1845,7 +1845,7 @@ readmore:
if (!xdr_u_int(&x, &len)) {
xdr_destroy (&x);
- VIR_DEBUG0("Failed to decode packet length");
+ VIR_DEBUG("Failed to decode packet length");
qemudDispatchClientFailure(client);
return;
}
@@ -2298,10 +2298,10 @@ static void qemudInactiveTimer(int timerid, void *data) {
if (virStateActive() ||
server->clients) {
- VIR_DEBUG0("Timer expired but still active, not shutting down");
+ VIR_DEBUG("Timer expired but still active, not shutting down");
virEventUpdateTimeout(timerid, -1);
} else {
- VIR_DEBUG0("Timer expired and inactive, shutting down");
+ VIR_DEBUG("Timer expired and inactive, shutting down");
server->quitEventThread = 1;
}
}
@@ -2345,7 +2345,7 @@ static void *qemudRunLoop(void *opaque) {
(timerid = virEventAddTimeout(-1,
qemudInactiveTimer,
server, NULL)) < 0) {
- VIR_ERROR0(_("Failed to register shutdown timeout"));
+ VIR_ERROR(_("Failed to register shutdown timeout"));
return NULL;
}
@@ -2354,7 +2354,7 @@ static void *qemudRunLoop(void *opaque) {
server->nworkers = max_workers;
if (VIR_ALLOC_N(server->workers, server->nworkers) < 0) {
- VIR_ERROR0(_("Failed to allocate workers"));
+ VIR_ERROR(_("Failed to allocate workers"));
return NULL;
}
@@ -2389,7 +2389,7 @@ static void *qemudRunLoop(void *opaque) {
virMutexUnlock(&server->lock);
if (qemudOneLoop() < 0) {
virMutexLock(&server->lock);
- VIR_DEBUG0("Loop iteration error, exiting");
+ VIR_DEBUG("Loop iteration error, exiting");
break;
}
virMutexLock(&server->lock);
@@ -2879,7 +2879,7 @@ remoteReadConfigFile (struct qemud_server *server, const char *filename)
GET_CONF_STR (conf, filename, unix_sock_group);
if (unix_sock_group) {
if (!server->privileged) {
- VIR_WARN0("Cannot set group when not running as root");
+ VIR_WARN("Cannot set group when not running as root");
} else {
int ret;
struct group grpdata, *grp;
@@ -2889,7 +2889,7 @@ remoteReadConfigFile (struct qemud_server *server, const char *filename)
maxbuf = 1024;
if (VIR_ALLOC_N(buf, maxbuf) < 0) {
- VIR_ERROR0(_("Failed to allocate memory for buffer"));
+ VIR_ERROR(_("Failed to allocate memory for buffer"));
goto free_and_fail;
}
@@ -2898,7 +2898,7 @@ remoteReadConfigFile (struct qemud_server *server, const char *filename)
&grp)) == ERANGE) {
maxbuf *= 2;
if (maxbuf > 65536 || VIR_REALLOC_N(buf, maxbuf) < 0) {
- VIR_ERROR0(_("Failed to reallocate enough memory for buffer"));
+ VIR_ERROR(_("Failed to reallocate enough memory for buffer"));
goto free_and_fail;
}
}
@@ -3012,13 +3012,13 @@ qemudSetupPrivs (void)
if (__init_daemon_priv (PU_RESETGROUPS | PU_CLEARLIMITSET,
SYSTEM_UID, SYSTEM_UID, PRIV_XVM_CONTROL, NULL)) {
- VIR_ERROR0(_("additional privileges are required"));
+ VIR_ERROR(_("additional privileges are required"));
return -1;
}
if (priv_set (PRIV_OFF, PRIV_ALLSETS, PRIV_FILE_LINK_ANY, PRIV_PROC_INFO,
PRIV_PROC_SESSION, PRIV_PROC_EXEC, PRIV_PROC_FORK, NULL)) {
- VIR_ERROR0(_("failed to set reduced privileges"));
+ VIR_ERROR(_("failed to set reduced privileges"));
return -1;
}
@@ -3084,7 +3084,7 @@ daemonSetupSignals(struct qemud_server *server)
VIR_EVENT_HANDLE_READABLE,
qemudDispatchSignalEvent,
server, NULL) < 0) {
- VIR_ERROR0(_("Failed to register callback for signal pipe"));
+ VIR_ERROR(_("Failed to register callback for signal pipe"));
goto error;
}
@@ -3374,7 +3374,7 @@ int main(int argc, char **argv) {
/* Start the event loop in a background thread, since
* state initialization needs events to be being processed */
if (qemudStartEventLoop(server) < 0) {
- VIR_ERROR0(_("Event thread startup failed"));
+ VIR_ERROR(_("Event thread startup failed"));
goto error;
}
@@ -3383,14 +3383,14 @@ int main(int argc, char **argv) {
* we're ready, since it can take a long time and this will
* seriously delay OS bootup process */
if (virStateInitialize(server->privileged) < 0) {
- VIR_ERROR0(_("Driver state initialization failed"));
+ VIR_ERROR(_("Driver state initialization failed"));
goto shutdown;
}
/* Start accepting new clients from network */
virMutexLock(&server->lock);
if (qemudNetworkEnable(server) < 0) {
- VIR_ERROR0(_("Network event loop enablement failed"));
+ VIR_ERROR(_("Network event loop enablement failed"));
goto shutdown;
}
virMutexUnlock(&server->lock);
diff --git a/daemon/remote.c b/daemon/remote.c
index 2220655..c2faf0f 100644
--- a/daemon/remote.c
+++ b/daemon/remote.c
@@ -359,7 +359,7 @@ static int remoteRelayDomainEventGraphics(virConnectPtr conn ATTRIBUTE_UNUSED,
data.subject.subject_len = subject->nidentity;
if (VIR_ALLOC_N(data.subject.subject_val, data.subject.subject_len) < 0) {
- VIR_WARN0("cannot allocate memory for graphics event subject");
+ VIR_WARN("cannot allocate memory for graphics event subject");
return -1;
}
for (i = 0 ; i < data.subject.subject_len ; i++) {
@@ -1754,7 +1754,7 @@ remoteDispatchAuthSaslInit(struct qemud_server *server,
VIR_DEBUG("Initialize SASL auth %d", client->fd);
if (client->auth != REMOTE_AUTH_SASL ||
client->saslconn != NULL) {
- VIR_ERROR0(_("client tried invalid SASL init request"));
+ VIR_ERROR(_("client tried invalid SASL init request"));
goto authfail;
}
@@ -1808,7 +1808,7 @@ remoteDispatchAuthSaslInit(struct qemud_server *server,
cipher = gnutls_cipher_get(client->tlssession);
if (!(ssf = (sasl_ssf_t)gnutls_cipher_get_key_size(cipher))) {
- VIR_ERROR0(_("cannot get TLS cipher size"));
+ VIR_ERROR(_("cannot get TLS cipher size"));
sasl_dispose(&client->saslconn);
client->saslconn = NULL;
goto authfail;
@@ -1870,7 +1870,7 @@ remoteDispatchAuthSaslInit(struct qemud_server *server,
VIR_DEBUG("Available mechanisms for client: '%s'", mechlist);
ret->mechlist = strdup(mechlist);
if (!ret->mechlist) {
- VIR_ERROR0(_("cannot allocate mechlist"));
+ VIR_ERROR(_("cannot allocate mechlist"));
sasl_dispose(&client->saslconn);
client->saslconn = NULL;
goto authfail;
@@ -1954,7 +1954,7 @@ remoteSASLCheckAccess(struct qemud_server *server,
return -1;
}
if (val == NULL) {
- VIR_ERROR0(_("no client username was found"));
+ VIR_ERROR(_("no client username was found"));
remoteDispatchAuthError(rerr);
sasl_dispose(&client->saslconn);
client->saslconn = NULL;
@@ -1964,7 +1964,7 @@ remoteSASLCheckAccess(struct qemud_server *server,
client->saslUsername = strdup((const char*)val);
if (client->saslUsername == NULL) {
- VIR_ERROR0(_("out of memory copying username"));
+ VIR_ERROR(_("out of memory copying username"));
remoteDispatchAuthError(rerr);
sasl_dispose(&client->saslconn);
client->saslconn = NULL;
@@ -2014,7 +2014,7 @@ remoteDispatchAuthSaslStart(struct qemud_server *server,
VIR_DEBUG("Start SASL auth %d", client->fd);
if (client->auth != REMOTE_AUTH_SASL ||
client->saslconn == NULL) {
- VIR_ERROR0(_("client tried invalid SASL start request"));
+ VIR_ERROR(_("client tried invalid SASL start request"));
goto authfail;
}
@@ -2115,7 +2115,7 @@ remoteDispatchAuthSaslStep(struct qemud_server *server,
VIR_DEBUG("Step SASL auth %d", client->fd);
if (client->auth != REMOTE_AUTH_SASL ||
client->saslconn == NULL) {
- VIR_ERROR0(_("client tried invalid SASL start request"));
+ VIR_ERROR(_("client tried invalid SASL start request"));
goto authfail;
}
@@ -2207,7 +2207,7 @@ remoteDispatchAuthSaslInit(struct qemud_server *server ATTRIBUTE_UNUSED,
void *args ATTRIBUTE_UNUSED,
remote_auth_sasl_init_ret *ret ATTRIBUTE_UNUSED)
{
- VIR_ERROR0(_("client tried unsupported SASL init request"));
+ VIR_ERROR(_("client tried unsupported SASL init request"));
PROBE(CLIENT_AUTH_FAIL, "fd=%d, auth=%d", client->fd, REMOTE_AUTH_SASL);
remoteDispatchAuthError(rerr);
return -1;
@@ -2222,7 +2222,7 @@ remoteDispatchAuthSaslStart(struct qemud_server *server ATTRIBUTE_UNUSED,
remote_auth_sasl_start_args *args ATTRIBUTE_UNUSED,
remote_auth_sasl_start_ret *ret ATTRIBUTE_UNUSED)
{
- VIR_ERROR0(_("client tried unsupported SASL start request"));
+ VIR_ERROR(_("client tried unsupported SASL start request"));
PROBE(CLIENT_AUTH_FAIL, "fd=%d, auth=%d", client->fd, REMOTE_AUTH_SASL);
remoteDispatchAuthError(rerr);
return -1;
@@ -2237,7 +2237,7 @@ remoteDispatchAuthSaslStep(struct qemud_server *server ATTRIBUTE_UNUSED,
remote_auth_sasl_step_args *args ATTRIBUTE_UNUSED,
remote_auth_sasl_step_ret *ret ATTRIBUTE_UNUSED)
{
- VIR_ERROR0(_("client tried unsupported SASL step request"));
+ VIR_ERROR(_("client tried unsupported SASL step request"));
PROBE(CLIENT_AUTH_FAIL, "fd=%d, auth=%d", client->fd, REMOTE_AUTH_SASL);
remoteDispatchAuthError(rerr);
return -1;
@@ -2283,12 +2283,12 @@ remoteDispatchAuthPolkit(struct qemud_server *server,
VIR_DEBUG("Start PolicyKit auth %d", client->fd);
if (client->auth != REMOTE_AUTH_POLKIT) {
- VIR_ERROR0(_("client tried invalid PolicyKit init request"));
+ VIR_ERROR(_("client tried invalid PolicyKit init request"));
goto authfail;
}
if (qemudGetSocketIdentity(client->fd, &callerUid, &callerPid) < 0) {
- VIR_ERROR0(_("cannot get peer socket identity"));
+ VIR_ERROR(_("cannot get peer socket identity"));
goto authfail;
}
@@ -2375,12 +2375,12 @@ remoteDispatchAuthPolkit(struct qemud_server *server,
VIR_DEBUG("Start PolicyKit auth %d", client->fd);
if (client->auth != REMOTE_AUTH_POLKIT) {
- VIR_ERROR0(_("client tried invalid PolicyKit init request"));
+ VIR_ERROR(_("client tried invalid PolicyKit init request"));
goto authfail;
}
if (qemudGetSocketIdentity(client->fd, &callerUid, &callerPid) < 0) {
- VIR_ERROR0(_("cannot get peer socket identity"));
+ VIR_ERROR(_("cannot get peer socket identity"));
goto authfail;
}
@@ -2485,7 +2485,7 @@ remoteDispatchAuthPolkit(struct qemud_server *server ATTRIBUTE_UNUSED,
void *args ATTRIBUTE_UNUSED,
remote_auth_polkit_ret *ret ATTRIBUTE_UNUSED)
{
- VIR_ERROR0(_("client tried unsupported PolicyKit init request"));
+ VIR_ERROR(_("client tried unsupported PolicyKit init request"));
remoteDispatchAuthError(rerr);
return -1;
}
diff --git a/daemon/stream.c b/daemon/stream.c
index b71df92..cada0a1 100644
--- a/daemon/stream.c
+++ b/daemon/stream.c
@@ -401,7 +401,7 @@ remoteStreamHandleWriteData(struct qemud_client *client,
/* Blocking, so indicate we have more todo later */
return 1;
} else {
- VIR_INFO0("Stream send failed");
+ VIR_INFO("Stream send failed");
stream->closed = 1;
remoteDispatchError(&rerr);
return remoteSerializeReplyError(client, &rerr, &msg->hdr);
diff --git a/examples/domain-events/events-c/event-test.c b/examples/domain-events/events-c/event-test.c
index 1f46d42..52ec5d0 100644
--- a/examples/domain-events/events-c/event-test.c
+++ b/examples/domain-events/events-c/event-test.c
@@ -8,10 +8,8 @@
#include <libvirt/libvirt.h>
#include <libvirt/virterror.h>
-#define VIR_DEBUG0(fmt) printf("%s:%d :: " fmt "\n", \
- __func__, __LINE__)
#define VIR_DEBUG(fmt, ...) printf("%s:%d: " fmt "\n", \
- __func__, __LINE__, __VA_ARGS__)
+ __func__, __LINE__, ##__VA_ARGS__)
#define STREQ(a,b) (strcmp(a,b) == 0)
#ifndef ATTRIBUTE_UNUSED
@@ -304,7 +302,7 @@ int main(int argc, char **argv)
sigaction(SIGTERM, &action_stop, NULL);
sigaction(SIGINT, &action_stop, NULL);
- VIR_DEBUG0("Registering domain event cbs");
+ VIR_DEBUG("Registering domain event cbs");
/* Add 2 callbacks to prove this works with more than just one */
callback1ret = virConnectDomainEventRegister(dconn, myDomainEventCallback1,
@@ -355,7 +353,7 @@ int main(int argc, char **argv)
}
}
- VIR_DEBUG0("Deregistering event handlers");
+ VIR_DEBUG("Deregistering event handlers");
virConnectDomainEventDeregister(dconn, myDomainEventCallback1);
virConnectDomainEventDeregisterAny(dconn, callback2ret);
virConnectDomainEventDeregisterAny(dconn, callback3ret);
@@ -365,7 +363,7 @@ int main(int argc, char **argv)
virConnectDomainEventDeregisterAny(dconn, callback7ret);
}
- VIR_DEBUG0("Closing connection");
+ VIR_DEBUG("Closing connection");
if (dconn && virConnectClose(dconn) < 0) {
printf("error closing\n");
}
diff --git a/src/cpu/cpu_x86.c b/src/cpu/cpu_x86.c
index ae8e5e7..4a4272e 100644
--- a/src/cpu/cpu_x86.c
+++ b/src/cpu/cpu_x86.c
@@ -1183,7 +1183,7 @@ x86Compute(virCPUDefPtr host,
x86DataSubtract(cpu_require->data, cpu_disable->data);
result = x86ModelCompare(host_model, cpu_require);
if (result == SUBSET || result == UNRELATED) {
- VIR_DEBUG0("Host CPU does not provide all required features");
+ VIR_DEBUG("Host CPU does not provide all required features");
ret = VIR_CPU_COMPARE_INCOMPATIBLE;
goto out;
}
@@ -1204,7 +1204,7 @@ x86Compute(virCPUDefPtr host,
if (ret == VIR_CPU_COMPARE_SUPERSET
&& cpu->type == VIR_CPU_TYPE_GUEST
&& cpu->match == VIR_CPU_MATCH_STRICT) {
- VIR_DEBUG0("Host CPU does not strictly match guest CPU");
+ VIR_DEBUG("Host CPU does not strictly match guest CPU");
ret = VIR_CPU_COMPARE_INCOMPATIBLE;
goto out;
}
diff --git a/src/esx/esx_driver.c b/src/esx/esx_driver.c
index 7933f11..bd1dc11 100644
--- a/src/esx/esx_driver.c
+++ b/src/esx/esx_driver.c
@@ -734,7 +734,7 @@ esxConnectToHost(esxPrivate *priv, virConnectAuthPtr auth,
/* Warn if host is in maintenance mode */
if (inMaintenanceMode == esxVI_Boolean_True) {
- VIR_WARN0("The server is in maintenance mode");
+ VIR_WARN("The server is in maintenance mode");
}
if (*vCenterIpAddress != NULL) {
@@ -2342,7 +2342,7 @@ esxDomainGetInfo(virDomainPtr domain, virDomainInfoPtr info)
}
if (priv->usedCpuTimeCounterId < 0) {
- VIR_WARN0("Could not find 'used CPU time' performance counter");
+ VIR_WARN("Could not find 'used CPU time' performance counter");
}
}
@@ -2374,7 +2374,7 @@ esxDomainGetInfo(virDomainPtr domain, virDomainInfoPtr info)
for (perfEntityMetricBase = perfEntityMetricBaseList;
perfEntityMetricBase != NULL;
perfEntityMetricBase = perfEntityMetricBase->_next) {
- VIR_DEBUG0("perfEntityMetric ...");
+ VIR_DEBUG("perfEntityMetric ...");
perfEntityMetric =
esxVI_PerfEntityMetric_DynamicCast(perfEntityMetricBase);
@@ -2398,7 +2398,7 @@ esxDomainGetInfo(virDomainPtr domain, virDomainInfoPtr info)
for (; perfMetricIntSeries != NULL;
perfMetricIntSeries = perfMetricIntSeries->_next) {
- VIR_DEBUG0("perfMetricIntSeries ...");
+ VIR_DEBUG("perfMetricIntSeries ...");
for (value = perfMetricIntSeries->value;
value != NULL;
diff --git a/src/esx/esx_vi.c b/src/esx/esx_vi.c
index 2bb1794..ca5376e 100644
--- a/src/esx/esx_vi.c
+++ b/src/esx/esx_vi.c
@@ -200,7 +200,7 @@ esxVI_CURL_Debug(CURL *curl ATTRIBUTE_UNUSED, curl_infotype type,
break;
default:
- VIR_DEBUG0("unknown");
+ VIR_DEBUG("unknown");
break;
}
@@ -497,7 +497,7 @@ ESX_VI__TEMPLATE__FREE(SharedCURL,
if (item->count > 0) {
/* Better leak than crash */
- VIR_ERROR0(_("Trying to free SharedCURL object that is still in use"));
+ VIR_ERROR(_("Trying to free SharedCURL object that is still in use"));
return;
}
@@ -2143,7 +2143,7 @@ esxVI_GetVirtualMachineIdentity(esxVI_ObjectContent *virtualMachine,
} else {
memset(uuid, 0, VIR_UUID_BUFLEN);
- VIR_WARN0("Cannot access UUID, because 'configStatus' property "
+ VIR_WARN("Cannot access UUID, because 'configStatus' property "
"indicates a config problem");
}
}
@@ -3715,12 +3715,12 @@ esxVI_WaitForTaskCompletion(esxVI_Context *ctx,
if (taskInfo->cancelable == esxVI_Boolean_True) {
if (esxVI_CancelTask(ctx, task) < 0 &&
blocked == esxVI_Boolean_True) {
- VIR_ERROR0(_("Cancelable task is blocked by an "
+ VIR_ERROR(_("Cancelable task is blocked by an "
"unanswered question but cancelation "
"failed"));
}
} else if (blocked == esxVI_Boolean_True) {
- VIR_ERROR0(_("Non-cancelable task is blocked by an "
+ VIR_ERROR(_("Non-cancelable task is blocked by an "
"unanswered question"));
}
@@ -3776,7 +3776,7 @@ esxVI_WaitForTaskCompletion(esxVI_Context *ctx,
}
if (esxVI_DestroyPropertyFilter(ctx, propertyFilter) < 0) {
- VIR_DEBUG0("DestroyPropertyFilter failed");
+ VIR_DEBUG("DestroyPropertyFilter failed");
}
if (esxVI_TaskInfoState_CastFromAnyType(propertyValue, finalState) < 0) {
diff --git a/src/libvirt.c b/src/libvirt.c
index e74e977..54a34cc 100644
--- a/src/libvirt.c
+++ b/src/libvirt.c
@@ -358,7 +358,7 @@ virInitialize(void)
virLogSetFromEnv();
- VIR_DEBUG0("register drivers");
+ VIR_DEBUG("register drivers");
#if HAVE_WINSOCK2_H
if (winsock_init () == -1) return -1;
@@ -1027,7 +1027,7 @@ do_open (const char *name,
NULLSTR(ret->uri->user), ret->uri->port,
NULLSTR(ret->uri->path));
} else {
- VIR_DEBUG0("no name, allowing driver auto-select");
+ VIR_DEBUG("no name, allowing driver auto-select");
}
/* Cleansing flags */
diff --git a/src/libxl/libxl_driver.c b/src/libxl/libxl_driver.c
index a2c8467..47d2396 100644
--- a/src/libxl/libxl_driver.c
+++ b/src/libxl/libxl_driver.c
@@ -729,14 +729,14 @@ libxlStartup(int privileged) {
/* Disable libxl driver if non-root */
if (!privileged) {
- VIR_INFO0("Not running privileged, disabling libxenlight driver");
+ VIR_INFO("Not running privileged, disabling libxenlight driver");
return 0;
}
/* Disable driver if legacy xen toolstack (xend) is in use */
cmd = virCommandNewArgList("/usr/sbin/xend", "status", NULL);
if (virCommandRun(cmd, &status) == 0 && status == 0) {
- VIR_INFO0("Legacy xen tool stack seems to be in use, disabling "
+ VIR_INFO("Legacy xen tool stack seems to be in use, disabling "
"libxenlight driver.");
virCommandFree(cmd);
return 0;
@@ -747,7 +747,7 @@ libxlStartup(int privileged) {
return -1;
if (virMutexInit(&libxl_driver->lock) < 0) {
- VIR_ERROR0(_("cannot initialize mutex"));
+ VIR_ERROR(_("cannot initialize mutex"));
VIR_FREE(libxl_driver);
return -1;
}
@@ -835,19 +835,19 @@ libxlStartup(int privileged) {
libxl_driver->logger =
(xentoollog_logger *)xtl_createlogger_stdiostream(libxl_driver->logger_file, XTL_DEBUG, 0);
if (!libxl_driver->logger) {
- VIR_ERROR0(_("cannot create logger for libxenlight"));
+ VIR_ERROR(_("cannot create logger for libxenlight"));
goto fail;
}
if (libxl_ctx_init(&libxl_driver->ctx,
LIBXL_VERSION,
libxl_driver->logger)) {
- VIR_ERROR0(_("cannot initialize libxenlight context"));
+ VIR_ERROR(_("cannot initialize libxenlight context"));
goto fail;
}
if ((ver_info = libxl_get_version_info(&libxl_driver->ctx)) == NULL) {
- VIR_ERROR0(_("cannot version information from libxenlight"));
+ VIR_ERROR(_("cannot version information from libxenlight"));
goto fail;
}
libxl_driver->version = (ver_info->xen_version_major * 1000000) +
@@ -855,7 +855,7 @@ libxlStartup(int privileged) {
if ((libxl_driver->caps =
libxlMakeCapabilities(&libxl_driver->ctx)) == NULL) {
- VIR_ERROR0(_("cannot create capabilities for libxenlight"));
+ VIR_ERROR(_("cannot create capabilities for libxenlight"));
goto error;
}
@@ -1958,7 +1958,7 @@ libxlDomainXMLFromNative(virConnectPtr conn, const char * nativeFormat,
}
if ((ver_info = libxl_get_version_info(&driver->ctx)) == NULL) {
- VIR_ERROR0(_("cannot get version information from libxenlight"));
+ VIR_ERROR(_("cannot get version information from libxenlight"));
goto cleanup;
}
@@ -1999,7 +1999,7 @@ libxlDomainXMLToNative(virConnectPtr conn, const char * nativeFormat,
}
if ((ver_info = libxl_get_version_info(&driver->ctx)) == NULL) {
- VIR_ERROR0(_("cannot get version information from libxenlight"));
+ VIR_ERROR(_("cannot get version information from libxenlight"));
goto cleanup;
}
diff --git a/src/lxc/lxc_conf.c b/src/lxc/lxc_conf.c
index 226a57e..b2586eb 100644
--- a/src/lxc/lxc_conf.c
+++ b/src/lxc/lxc_conf.c
@@ -60,7 +60,7 @@ virCapsPtr lxcCapsInit(void)
*/
if (nodeCapsInitNUMA(caps) < 0) {
virCapabilitiesFreeNUMAInfo(caps);
- VIR_WARN0("Failed to query host NUMA topology, disabling NUMA capabilities");
+ VIR_WARN("Failed to query host NUMA topology, disabling NUMA capabilities");
}
if (virGetHostUUID(caps->host.host_uuid)) {
@@ -151,7 +151,7 @@ int lxcLoadDriverConfig(lxc_driver_t *driver)
p = virConfGetValue(conf, "log_with_libvirtd");
if (p) {
if (p->type != VIR_CONF_LONG)
- VIR_WARN0("lxcLoadDriverConfig: invalid setting: log_with_libvirtd");
+ VIR_WARN("lxcLoadDriverConfig: invalid setting: log_with_libvirtd");
else
driver->log_libvirtd = p->l;
}
diff --git a/src/lxc/lxc_container.c b/src/lxc/lxc_container.c
index af453f3..b8bf654 100644
--- a/src/lxc/lxc_container.c
+++ b/src/lxc/lxc_container.c
@@ -244,7 +244,7 @@ static int lxcContainerWaitForContinue(int control)
}
VIR_FORCE_CLOSE(control);
- VIR_DEBUG0("Received container continue message");
+ VIR_DEBUG("Received container continue message");
return 0;
}
@@ -743,7 +743,7 @@ static int lxcContainerDropCapabilities(void)
* be unmasked - they can never escape the bounding set. */
#else
- VIR_WARN0("libcap-ng support not compiled in, unable to clear capabilities");
+ VIR_WARN("libcap-ng support not compiled in, unable to clear capabilities");
#endif
return 0;
}
@@ -892,12 +892,12 @@ int lxcContainerStart(virDomainDefPtr def,
flags = CLONE_NEWPID|CLONE_NEWNS|CLONE_NEWUTS|CLONE_NEWIPC|SIGCHLD;
if (userns_supported()) {
- VIR_DEBUG0("Enable user namespaces");
+ VIR_DEBUG("Enable user namespaces");
flags |= CLONE_NEWUSER;
}
if (def->nets != NULL) {
- VIR_DEBUG0("Enable network namespaces");
+ VIR_DEBUG("Enable network namespaces");
flags |= CLONE_NEWNET;
}
@@ -936,7 +936,7 @@ int lxcContainerAvailable(int features)
flags |= CLONE_NEWNET;
if (VIR_ALLOC_N(stack, getpagesize() * 4) < 0) {
- VIR_DEBUG0("Unable to allocate stack");
+ VIR_DEBUG("Unable to allocate stack");
return -1;
}
diff --git a/src/lxc/lxc_controller.c b/src/lxc/lxc_controller.c
index 7ea69fb..5c4bd1f 100644
--- a/src/lxc/lxc_controller.c
+++ b/src/lxc/lxc_controller.c
@@ -315,7 +315,7 @@ static int lxcControllerClearCapabilities(void)
return -1;
}
#else
- VIR_WARN0("libcap-ng support not compiled in, unable to clear capabilities");
+ VIR_WARN("libcap-ng support not compiled in, unable to clear capabilities");
#endif
return 0;
}
@@ -655,7 +655,7 @@ lxcControllerRun(virDomainDefPtr def,
* marked as shared
*/
if (root) {
- VIR_DEBUG0("Setting up private /dev/pts");
+ VIR_DEBUG("Setting up private /dev/pts");
if (unshare(CLONE_NEWNS) < 0) {
virReportSystemError(errno, "%s",
_("Cannot unshare mount namespace"));
@@ -691,7 +691,7 @@ lxcControllerRun(virDomainDefPtr def,
}
if (access(devptmx, R_OK) < 0) {
- VIR_WARN0("Kernel does not support private devpts, using shared devpts");
+ VIR_WARN("Kernel does not support private devpts, using shared devpts");
VIR_FREE(devptmx);
}
}
@@ -707,7 +707,7 @@ lxcControllerRun(virDomainDefPtr def,
goto cleanup;
}
} else {
- VIR_DEBUG0("Opening tty on shared /dev/ptmx");
+ VIR_DEBUG("Opening tty on shared /dev/ptmx");
if (virFileOpenTty(&containerPty,
&containerPtyPath,
0) < 0) {
diff --git a/src/lxc/lxc_driver.c b/src/lxc/lxc_driver.c
index b94941d..63ce630 100644
--- a/src/lxc/lxc_driver.c
+++ b/src/lxc/lxc_driver.c
@@ -1074,7 +1074,7 @@ static int lxcSetupInterfaces(virConnectPtr conn,
goto error_exit;
}
- VIR_DEBUG0("calling vethCreate()");
+ VIR_DEBUG("calling vethCreate()");
parentVeth = def->nets[i]->ifname;
if (vethCreate(&parentVeth, &containerVeth) < 0)
goto error_exit;
@@ -2047,19 +2047,19 @@ static int lxcStartup(int privileged)
*/
ld = getenv("LD_PRELOAD");
if (ld && strstr(ld, "vgpreload")) {
- VIR_INFO0("Running under valgrind, disabling driver");
+ VIR_INFO("Running under valgrind, disabling driver");
return 0;
}
/* Check that the user is root, silently disable if not */
if (!privileged) {
- VIR_INFO0("Not running privileged, disabling driver");
+ VIR_INFO("Not running privileged, disabling driver");
return 0;
}
/* Check that this is a container enabled kernel */
if (lxcContainerAvailable(0) < 0) {
- VIR_INFO0("LXC support not available in this kernel, disabling driver");
+ VIR_INFO("LXC support not available in this kernel, disabling driver");
return 0;
}
@@ -2557,7 +2557,7 @@ static int lxcFreezeContainer(lxc_driver_t *driver, virDomainObjPtr vm)
goto error;
}
if (r == -EBUSY)
- VIR_DEBUG0("Writing freezer.state gets EBUSY");
+ VIR_DEBUG("Writing freezer.state gets EBUSY");
/*
* Unfortunately, returning 0 (success) is likely to happen
@@ -2597,7 +2597,7 @@ static int lxcFreezeContainer(lxc_driver_t *driver, virDomainObjPtr vm)
check_interval *= exp;
VIR_FREE(state);
}
- VIR_DEBUG0("lxcFreezeContainer timeout");
+ VIR_DEBUG("lxcFreezeContainer timeout");
error:
/*
* If timeout or an error on reading the state occurs,
diff --git a/src/network/bridge_driver.c b/src/network/bridge_driver.c
index 12050b3..f4ced09 100644
--- a/src/network/bridge_driver.c
+++ b/src/network/bridge_driver.c
@@ -1197,7 +1197,7 @@ networkAddGeneralIptablesRules(struct network_driver *driver,
network->def->bridge, 68) < 0)) {
VIR_WARN("Could not add rule to fixup DHCP response checksums "
"on network '%s'.", network->def->name);
- VIR_WARN0("May need to update iptables package & kernel to support CHECKSUM rule.");
+ VIR_WARN("May need to update iptables package & kernel to support CHECKSUM rule.");
}
/* allow DNS requests through to dnsmasq */
@@ -1407,7 +1407,7 @@ networkReloadIptablesRules(struct network_driver *driver)
{
unsigned int i;
- VIR_INFO0(_("Reloading iptables rules"));
+ VIR_INFO(_("Reloading iptables rules"));
for (i = 0 ; i < driver->networks.count ; i++) {
virNetworkObjLock(driver->networks.objs[i]);
diff --git a/src/node_device/node_device_hal.c b/src/node_device/node_device_hal.c
index 3af2bcf..8df2875 100644
--- a/src/node_device/node_device_hal.c
+++ b/src/node_device/node_device_hal.c
@@ -514,7 +514,7 @@ static void dev_refresh(const char *udi)
static void device_added(LibHalContext *ctx ATTRIBUTE_UNUSED,
const char *udi)
{
- VIR_DEBUG0(hal_name(udi));
+ VIR_DEBUG("%s", hal_name(udi));
dev_create(udi);
}
@@ -527,7 +527,7 @@ static void device_removed(LibHalContext *ctx ATTRIBUTE_UNUSED,
nodeDeviceLock(driverState);
dev = virNodeDeviceFindByName(&driverState->devs,name);
- VIR_DEBUG0(name);
+ VIR_DEBUG("%s", name);
if (dev)
virNodeDeviceObjRemove(&driverState->devs, dev);
else
@@ -718,12 +718,12 @@ static int halDeviceMonitorStartup(int privileged ATTRIBUTE_UNUSED)
dbus_error_init(&err);
hal_ctx = libhal_ctx_new();
if (hal_ctx == NULL) {
- VIR_ERROR0(_("libhal_ctx_new returned NULL"));
+ VIR_ERROR(_("libhal_ctx_new returned NULL"));
goto failure;
}
dbus_conn = dbus_bus_get(DBUS_BUS_SYSTEM, &err);
if (dbus_conn == NULL) {
- VIR_ERROR0(_("dbus_bus_get failed"));
+ VIR_ERROR(_("dbus_bus_get failed"));
/* We don't want to show a fatal error here,
otherwise entire libvirtd shuts down when
D-Bus isn't running */
@@ -733,11 +733,11 @@ static int halDeviceMonitorStartup(int privileged ATTRIBUTE_UNUSED)
dbus_connection_set_exit_on_disconnect(dbus_conn, FALSE);
if (!libhal_ctx_set_dbus_connection(hal_ctx, dbus_conn)) {
- VIR_ERROR0(_("libhal_ctx_set_dbus_connection failed"));
+ VIR_ERROR(_("libhal_ctx_set_dbus_connection failed"));
goto failure;
}
if (!libhal_ctx_init(hal_ctx, &err)) {
- VIR_ERROR0(_("libhal_ctx_init failed, haldaemon is probably not running"));
+ VIR_ERROR(_("libhal_ctx_init failed, haldaemon is probably not running"));
/* We don't want to show a fatal error here,
otherwise entire libvirtd shuts down when
hald isn't running */
@@ -751,7 +751,7 @@ static int halDeviceMonitorStartup(int privileged ATTRIBUTE_UNUSED)
remove_dbus_watch,
toggle_dbus_watch,
NULL, NULL)) {
- VIR_ERROR0(_("dbus_connection_set_watch_functions failed"));
+ VIR_ERROR(_("dbus_connection_set_watch_functions failed"));
goto failure;
}
@@ -772,13 +772,13 @@ static int halDeviceMonitorStartup(int privileged ATTRIBUTE_UNUSED)
!libhal_ctx_set_device_lost_capability(hal_ctx, device_cap_lost) ||
!libhal_ctx_set_device_property_modified(hal_ctx, device_prop_modified) ||
!libhal_device_property_watch_all(hal_ctx, &err)) {
- VIR_ERROR0(_("setting up HAL callbacks failed"));
+ VIR_ERROR(_("setting up HAL callbacks failed"));
goto failure;
}
udi = libhal_get_all_devices(hal_ctx, &num_devs, &err);
if (udi == NULL) {
- VIR_ERROR0(_("libhal_get_all_devices failed"));
+ VIR_ERROR(_("libhal_get_all_devices failed"));
goto failure;
}
for (i = 0; i < num_devs; i++) {
@@ -828,18 +828,18 @@ static int halDeviceMonitorReload(void)
int num_devs, i;
LibHalContext *hal_ctx;
- VIR_INFO0("Reloading HAL device state");
+ VIR_INFO("Reloading HAL device state");
nodeDeviceLock(driverState);
- VIR_INFO0("Removing existing objects");
+ VIR_INFO("Removing existing objects");
virNodeDeviceObjListFree(&driverState->devs);
nodeDeviceUnlock(driverState);
hal_ctx = DRV_STATE_HAL_CTX(driverState);
- VIR_INFO0("Creating new objects");
+ VIR_INFO("Creating new objects");
dbus_error_init(&err);
udi = libhal_get_all_devices(hal_ctx, &num_devs, &err);
if (udi == NULL) {
- VIR_ERROR0(_("libhal_get_all_devices failed"));
+ VIR_ERROR(_("libhal_get_all_devices failed"));
return -1;
}
for (i = 0; i < num_devs; i++) {
@@ -847,7 +847,7 @@ static int halDeviceMonitorReload(void)
VIR_FREE(udi[i]);
}
VIR_FREE(udi);
- VIR_INFO0("HAL device reload complete");
+ VIR_INFO("HAL device reload complete");
return 0;
}
diff --git a/src/node_device/node_device_linux_sysfs.c b/src/node_device/node_device_linux_sysfs.c
index ea0b30e..4f4acc7 100644
--- a/src/node_device/node_device_linux_sysfs.c
+++ b/src/node_device/node_device_linux_sysfs.c
@@ -290,7 +290,7 @@ static int get_sriov_function(const char *device_link,
VIR_DEBUG("SR IOV device path is '%s'", device_path);
config_address = basename(device_path);
if (VIR_ALLOC(*bdf) != 0) {
- VIR_ERROR0(_("Failed to allocate memory for PCI device name"));
+ VIR_ERROR(_("Failed to allocate memory for PCI device name"));
goto out;
}
diff --git a/src/node_device/node_device_udev.c b/src/node_device/node_device_udev.c
index 3b987e8..04fcbec 100644
--- a/src/node_device/node_device_udev.c
+++ b/src/node_device/node_device_udev.c
@@ -1452,7 +1452,7 @@ static void udevEventHandleCallback(int watch ATTRIBUTE_UNUSED,
device = udev_monitor_receive_device(udev_monitor);
if (device == NULL) {
- VIR_ERROR0(_("udev_monitor_receive_device returned NULL"));
+ VIR_ERROR(_("udev_monitor_receive_device returned NULL"));
goto out;
}
@@ -1634,7 +1634,7 @@ static int udevDeviceMonitorStartup(int privileged)
}
if (virMutexInit(&driverState->lock) < 0) {
- VIR_ERROR0(_("Failed to initialize mutex for driverState"));
+ VIR_ERROR(_("Failed to initialize mutex for driverState"));
VIR_FREE(priv);
VIR_FREE(driverState);
ret = -1;
@@ -1655,7 +1655,7 @@ static int udevDeviceMonitorStartup(int privileged)
priv->udev_monitor = udev_monitor_new_from_netlink(udev, "udev");
if (priv->udev_monitor == NULL) {
VIR_FREE(priv);
- VIR_ERROR0(_("udev_monitor_new_from_netlink returned NULL"));
+ VIR_ERROR(_("udev_monitor_new_from_netlink returned NULL"));
ret = -1;
goto out_unlock;
}
@@ -1753,7 +1753,7 @@ static virStateDriver udevStateDriver = {
int udevNodeRegister(void)
{
- VIR_DEBUG0("Registering udev node device backend");
+ VIR_DEBUG("Registering udev node device backend");
registerCommonNodeFuncs(&udevDeviceMonitor);
if (virRegisterDeviceMonitor(&udevDeviceMonitor) < 0) {
diff --git a/src/nwfilter/nwfilter_ebiptables_driver.c b/src/nwfilter/nwfilter_ebiptables_driver.c
index 14ce019..2ff392d 100644
--- a/src/nwfilter/nwfilter_ebiptables_driver.c
+++ b/src/nwfilter/nwfilter_ebiptables_driver.c
@@ -3303,7 +3303,7 @@ iptablesCheckBridgeNFCallEnabled(bool isIPv6)
"'echo 1 > %s'"),
isIPv6 ? "6" : "",
pathname);
- VIR_WARN0(msg);
+ VIR_WARN("%s", msg);
if (isIPv6)
lastReportIPv6 = now;
else
diff --git a/src/openvz/openvz_driver.c b/src/openvz/openvz_driver.c
index 0bd007a..9a9ca70 100644
--- a/src/openvz/openvz_driver.c
+++ b/src/openvz/openvz_driver.c
@@ -211,7 +211,7 @@ static int openvzSetInitialConfig(virDomainDefPtr vmdef)
else
{
if (openvzDomainDefineCmd(prog, OPENVZ_MAX_ARG, vmdef) < 0) {
- VIR_ERROR0(_("Error creating command for container"));
+ VIR_ERROR(_("Error creating command for container"));
goto cleanup;
}
@@ -878,7 +878,7 @@ openvzDomainDefineXML(virConnectPtr conn, const char *xml)
vm->persistent = 1;
if (openvzSetInitialConfig(vm->def) < 0) {
- VIR_ERROR0(_("Error creating initial configuration"));
+ VIR_ERROR(_("Error creating initial configuration"));
goto cleanup;
}
@@ -966,7 +966,7 @@ openvzDomainCreateXML(virConnectPtr conn, const char *xml,
vm->persistent = 1;
if (openvzSetInitialConfig(vm->def) < 0) {
- VIR_ERROR0(_("Error creating initial configuration"));
+ VIR_ERROR(_("Error creating initial configuration"));
goto cleanup;
}
diff --git a/src/phyp/phyp_driver.c b/src/phyp/phyp_driver.c
index 30d4adf..848adf6 100644
--- a/src/phyp/phyp_driver.c
+++ b/src/phyp/phyp_driver.c
@@ -309,7 +309,7 @@ phypCapsInit(void)
*/
if (nodeCapsInitNUMA(caps) < 0) {
virCapabilitiesFreeNUMAInfo(caps);
- VIR_WARN0
+ VIR_WARN
("Failed to query host NUMA topology, disabling NUMA capabilities");
}
@@ -449,13 +449,13 @@ phypUUIDTable_WriteFile(virConnectPtr conn)
if (safewrite(fd, &uuid_table->lpars[i]->id,
sizeof(uuid_table->lpars[i]->id)) !=
sizeof(uuid_table->lpars[i]->id)) {
- VIR_ERROR0(_("Unable to write information to local file."));
+ VIR_ERROR(_("Unable to write information to local file."));
goto err;
}
if (safewrite(fd, uuid_table->lpars[i]->uuid, VIR_UUID_BUFLEN) !=
VIR_UUID_BUFLEN) {
- VIR_ERROR0(_("Unable to write information to local file."));
+ VIR_ERROR(_("Unable to write information to local file."));
goto err;
}
}
@@ -507,12 +507,12 @@ phypUUIDTable_Push(virConnectPtr conn)
}
if (stat(local_file, &local_fileinfo) == -1) {
- VIR_WARN0("Unable to stat local file.");
+ VIR_WARN("Unable to stat local file.");
goto err;
}
if (!(fd = fopen(local_file, "rb"))) {
- VIR_WARN0("Unable to open local file.");
+ VIR_WARN("Unable to open local file.");
goto err;
}
@@ -649,7 +649,7 @@ phypUUIDTable_ReadFile(virConnectPtr conn)
int id;
if ((fd = open(local_file, O_RDONLY)) == -1) {
- VIR_WARN0("Unable to write information to local file.");
+ VIR_WARN("Unable to write information to local file.");
goto err;
}
@@ -665,14 +665,14 @@ phypUUIDTable_ReadFile(virConnectPtr conn)
}
uuid_table->lpars[i]->id = id;
} else {
- VIR_WARN0
+ VIR_WARN
("Unable to read from information to local file.");
goto err;
}
rc = read(fd, uuid_table->lpars[i]->uuid, VIR_UUID_BUFLEN);
if (rc != VIR_UUID_BUFLEN) {
- VIR_WARN0("Unable to read information to local file.");
+ VIR_WARN("Unable to read information to local file.");
goto err;
}
}
@@ -753,7 +753,7 @@ phypUUIDTable_Pull(virConnectPtr conn)
rc = libssh2_channel_read(channel, buffer, amount);
if (rc > 0) {
if (safewrite(fd, buffer, rc) != rc)
- VIR_WARN0
+ VIR_WARN
("Unable to write information to local file.");
got += rc;
@@ -828,7 +828,7 @@ phypUUIDTable_Init(virConnectPtr conn)
goto cleanup;
}
if (nids_numdomains != nids_listdomains) {
- VIR_ERROR0(_("Unable to determine number of domains."));
+ VIR_ERROR(_("Unable to determine number of domains."));
goto cleanup;
}
@@ -1559,7 +1559,7 @@ phypGetVIOSNextSlotNumber(virConnectPtr conn)
virBuffer buf = VIR_BUFFER_INITIALIZER;
if (!(profile = phypGetLparProfile(conn, vios_id))) {
- VIR_ERROR0(_("Unable to get VIOS profile name."));
+ VIR_ERROR(_("Unable to get VIOS profile name."));
return -1;
}
@@ -1599,17 +1599,17 @@ phypCreateServerSCSIAdapter(virConnectPtr conn)
if (!
(vios_name =
phypGetLparNAME(session, managed_system, vios_id, conn))) {
- VIR_ERROR0(_("Unable to get VIOS name"));
+ VIR_ERROR(_("Unable to get VIOS name"));
goto cleanup;
}
if (!(profile = phypGetLparProfile(conn, vios_id))) {
- VIR_ERROR0(_("Unable to get VIOS profile name."));
+ VIR_ERROR(_("Unable to get VIOS profile name."));
goto cleanup;
}
if ((slot = phypGetVIOSNextSlotNumber(conn)) == -1) {
- VIR_ERROR0(_("Unable to get free slot number"));
+ VIR_ERROR(_("Unable to get free slot number"));
goto cleanup;
}
@@ -1742,7 +1742,7 @@ phypAttachDevice(virDomainPtr domain, const char *xml)
if (!
(vios_name =
phypGetLparNAME(session, managed_system, vios_id, conn))) {
- VIR_ERROR0(_("Unable to get VIOS name"));
+ VIR_ERROR(_("Unable to get VIOS name"));
goto cleanup;
}
@@ -1752,11 +1752,11 @@ phypAttachDevice(virDomainPtr domain, const char *xml)
/* If not found, let's create one.
* */
if (phypCreateServerSCSIAdapter(conn) == -1) {
- VIR_ERROR0(_("Unable to create new virtual adapter"));
+ VIR_ERROR(_("Unable to create new virtual adapter"));
goto cleanup;
} else {
if (!(scsi_adapter = phypGetVIOSFreeSCSIAdapter(conn))) {
- VIR_ERROR0(_("Unable to create new virtual adapter"));
+ VIR_ERROR(_("Unable to create new virtual adapter"));
goto cleanup;
}
}
@@ -1777,7 +1777,7 @@ phypAttachDevice(virDomainPtr domain, const char *xml)
goto cleanup;
if (!(profile = phypGetLparProfile(conn, domain->id))) {
- VIR_ERROR0(_("Unable to get VIOS profile name."));
+ VIR_ERROR(_("Unable to get VIOS profile name."));
goto cleanup;
}
@@ -1835,7 +1835,7 @@ phypAttachDevice(virDomainPtr domain, const char *xml)
ret = phypExecBuffer(session, &buf, &exit_status, conn, false);
if (exit_status < 0 || ret == NULL) {
- VIR_ERROR0(_
+ VIR_ERROR(_
("Possibly you don't have IBM Tools installed in your LPAR."
"Contact your support to enable this feature."));
goto cleanup;
@@ -2018,18 +2018,18 @@ phypStorageVolCreateXML(virStoragePoolPtr pool,
if (pool->name != NULL) {
spdef->name = pool->name;
} else {
- VIR_ERROR0(_("Unable to determine storage pool's name."));
+ VIR_ERROR(_("Unable to determine storage pool's name."));
goto err;
}
if (memcpy(spdef->uuid, pool->uuid, VIR_UUID_BUFLEN) == NULL) {
- VIR_ERROR0(_("Unable to determine storage pool's uuid."));
+ VIR_ERROR(_("Unable to determine storage pool's uuid."));
goto err;
}
if ((spdef->capacity =
phypGetStoragePoolSize(pool->conn, pool->name)) == -1) {
- VIR_ERROR0(_("Unable to determine storage pools's size."));
+ VIR_ERROR(_("Unable to determine storage pools's size."));
goto err;
}
@@ -2042,18 +2042,18 @@ phypStorageVolCreateXML(virStoragePoolPtr pool,
/*XXX source adapter not working properly, should show hdiskX */
if ((spdef->source.adapter =
phypGetStoragePoolDevice(pool->conn, pool->name)) == NULL) {
- VIR_ERROR0(_("Unable to determine storage pools's source adapter."));
+ VIR_ERROR(_("Unable to determine storage pools's source adapter."));
goto err;
}
if ((voldef = virStorageVolDefParseString(spdef, xml)) == NULL) {
- VIR_ERROR0(_("Error parsing volume XML."));
+ VIR_ERROR(_("Error parsing volume XML."));
goto err;
}
/* checking if this name already exists on this system */
if (phypVolumeLookupByName(pool, voldef->name) != NULL) {
- VIR_ERROR0(_("StoragePool name already exists."));
+ VIR_ERROR(_("StoragePool name already exists."));
goto err;
}
@@ -2061,12 +2061,12 @@ phypStorageVolCreateXML(virStoragePoolPtr pool,
* in the moment you create the volume.
* */
if (voldef->key) {
- VIR_ERROR0(_("Key must be empty, Power Hypervisor will create one for you."));
+ VIR_ERROR(_("Key must be empty, Power Hypervisor will create one for you."));
goto err;
}
if (voldef->capacity) {
- VIR_ERROR0(_("Capacity cannot be empty."));
+ VIR_ERROR(_("Capacity cannot be empty."));
goto err;
}
@@ -2242,17 +2242,17 @@ phypVolumeGetXMLDesc(virStorageVolPtr vol, unsigned int flags)
if (sp->name != NULL) {
pool.name = sp->name;
} else {
- VIR_ERROR0(_("Unable to determine storage sp's name."));
+ VIR_ERROR(_("Unable to determine storage sp's name."));
goto err;
}
if (memcpy(pool.uuid, sp->uuid, VIR_UUID_BUFLEN) == NULL) {
- VIR_ERROR0(_("Unable to determine storage sp's uuid."));
+ VIR_ERROR(_("Unable to determine storage sp's uuid."));
goto err;
}
if ((pool.capacity = phypGetStoragePoolSize(sp->conn, sp->name)) == -1) {
- VIR_ERROR0(_("Unable to determine storage sps's size."));
+ VIR_ERROR(_("Unable to determine storage sps's size."));
goto err;
}
@@ -2264,14 +2264,14 @@ phypVolumeGetXMLDesc(virStorageVolPtr vol, unsigned int flags)
if ((pool.source.adapter =
phypGetStoragePoolDevice(sp->conn, sp->name)) == NULL) {
- VIR_ERROR0(_("Unable to determine storage sps's source adapter."));
+ VIR_ERROR(_("Unable to determine storage sps's source adapter."));
goto err;
}
if (vol->name != NULL)
voldef.name = vol->name;
else {
- VIR_ERROR0(_("Unable to determine storage pool's name."));
+ VIR_ERROR(_("Unable to determine storage pool's name."));
goto err;
}
@@ -2684,13 +2684,13 @@ phypStoragePoolCreateXML(virConnectPtr conn,
/* checking if this name already exists on this system */
if (phypStoragePoolLookupByName(conn, def->name) != NULL) {
- VIR_WARN0("StoragePool name already exists.");
+ VIR_WARN("StoragePool name already exists.");
goto err;
}
/* checking if ID or UUID already exists on this system */
if (phypGetStoragePoolLookUpByUUID(conn, def->uuid) != NULL) {
- VIR_WARN0("StoragePool uuid already exists.");
+ VIR_WARN("StoragePool uuid already exists.");
goto err;
}
@@ -2720,18 +2720,18 @@ phypGetStoragePoolXMLDesc(virStoragePoolPtr pool, unsigned int flags)
if (pool->name != NULL)
def.name = pool->name;
else {
- VIR_ERROR0(_("Unable to determine storage pool's name."));
+ VIR_ERROR(_("Unable to determine storage pool's name."));
goto err;
}
if (memcpy(def.uuid, pool->uuid, VIR_UUID_BUFLEN) == NULL) {
- VIR_ERROR0(_("Unable to determine storage pool's uuid."));
+ VIR_ERROR(_("Unable to determine storage pool's uuid."));
goto err;
}
if ((def.capacity =
phypGetStoragePoolSize(pool->conn, pool->name)) == -1) {
- VIR_ERROR0(_("Unable to determine storage pools's size."));
+ VIR_ERROR(_("Unable to determine storage pools's size."));
goto err;
}
@@ -2744,7 +2744,7 @@ phypGetStoragePoolXMLDesc(virStoragePoolPtr pool, unsigned int flags)
/*XXX source adapter not working properly, should show hdiskX */
if ((def.source.adapter =
phypGetStoragePoolDevice(pool->conn, pool->name)) == NULL) {
- VIR_ERROR0(_("Unable to determine storage pools's source adapter."));
+ VIR_ERROR(_("Unable to determine storage pools's source adapter."));
goto err;
}
@@ -3319,30 +3319,30 @@ phypDomainDumpXML(virDomainPtr dom, int flags)
dom->conn);
if (lpar_name == NULL) {
- VIR_ERROR0(_("Unable to determine domain's name."));
+ VIR_ERROR(_("Unable to determine domain's name."));
goto err;
}
if (phypGetLparUUID(def.uuid, dom->id, dom->conn) == -1) {
- VIR_ERROR0(_("Unable to generate random uuid."));
+ VIR_ERROR(_("Unable to generate random uuid."));
goto err;
}
if ((def.mem.max_balloon =
phypGetLparMem(dom->conn, managed_system, dom->id, 0)) == 0) {
- VIR_ERROR0(_("Unable to determine domain's max memory."));
+ VIR_ERROR(_("Unable to determine domain's max memory."));
goto err;
}
if ((def.mem.cur_balloon =
phypGetLparMem(dom->conn, managed_system, dom->id, 1)) == 0) {
- VIR_ERROR0(_("Unable to determine domain's memory."));
+ VIR_ERROR(_("Unable to determine domain's memory."));
goto err;
}
if ((def.maxvcpus = def.vcpus =
phypGetLparCPU(dom->conn, managed_system, dom->id)) == 0) {
- VIR_ERROR0(_("Unable to determine domain's CPU."));
+ VIR_ERROR(_("Unable to determine domain's CPU."));
goto err;
}
@@ -3457,15 +3457,15 @@ phypDomainGetInfo(virDomainPtr dom, virDomainInfoPtr info)
if ((info->maxMem =
phypGetLparMem(dom->conn, managed_system, dom->id, 0)) == 0)
- VIR_WARN0("Unable to determine domain's max memory.");
+ VIR_WARN("Unable to determine domain's max memory.");
if ((info->memory =
phypGetLparMem(dom->conn, managed_system, dom->id, 1)) == 0)
- VIR_WARN0("Unable to determine domain's memory.");
+ VIR_WARN("Unable to determine domain's memory.");
if ((info->nrVirtCpu =
phypGetLparCPU(dom->conn, managed_system, dom->id)) == 0)
- VIR_WARN0("Unable to determine domain's CPU.");
+ VIR_WARN("Unable to determine domain's CPU.");
return 0;
}
@@ -3560,7 +3560,7 @@ phypBuildLpar(virConnectPtr conn, virDomainDefPtr def)
}
if (phypUUIDTable_AddLpar(conn, def->uuid, def->id) == -1) {
- VIR_ERROR0(_("Unable to add LPAR to the table"));
+ VIR_ERROR(_("Unable to add LPAR to the table"));
goto cleanup;
}
@@ -3596,14 +3596,14 @@ phypDomainCreateAndStart(virConnectPtr conn,
/* checking if this name already exists on this system */
if (phypGetLparID(session, managed_system, def->name, conn) != -1) {
- VIR_WARN0("LPAR name already exists.");
+ VIR_WARN("LPAR name already exists.");
goto err;
}
/* checking if ID or UUID already exists on this system */
for (i = 0; i < uuid_table->nlpars; i++) {
if (lpars[i]->id == def->id || lpars[i]->uuid == def->uuid) {
- VIR_WARN0("LPAR ID or UUID already exists.");
+ VIR_WARN("LPAR ID or UUID already exists.");
goto err;
}
}
@@ -3663,7 +3663,7 @@ phypDomainSetVcpusFlags(virDomainPtr dom, unsigned int nvcpus,
return 0;
if (nvcpus > phypGetLparCPUMAX(dom)) {
- VIR_ERROR0(_("You are trying to set a number of CPUs bigger than "
+ VIR_ERROR(_("You are trying to set a number of CPUs bigger than "
"the max possible."));
return 0;
}
@@ -3686,7 +3686,7 @@ phypDomainSetVcpusFlags(virDomainPtr dom, unsigned int nvcpus,
ret = phypExecBuffer(session, &buf, &exit_status, dom->conn, false);
if (exit_status < 0) {
- VIR_ERROR0(_
+ VIR_ERROR(_
("Possibly you don't have IBM Tools installed in your LPAR."
" Contact your support to enable this feature."));
}
diff --git a/src/qemu/qemu_audit.c b/src/qemu/qemu_audit.c
index 40b68ff..1da0773 100644
--- a/src/qemu/qemu_audit.c
+++ b/src/qemu/qemu_audit.c
@@ -69,20 +69,20 @@ qemuAuditDisk(virDomainObjPtr vm,
virUUIDFormat(vm->def->uuid, uuidstr);
if (!(vmname = virAuditEncode("vm", vm->def->name))) {
- VIR_WARN0("OOM while encoding audit message");
+ VIR_WARN("OOM while encoding audit message");
return;
}
if (!(oldsrc = virAuditEncode("old-disk",
oldDef && oldDef->src ?
oldDef->src : "?"))) {
- VIR_WARN0("OOM while encoding audit message");
+ VIR_WARN("OOM while encoding audit message");
goto cleanup;
}
if (!(newsrc = virAuditEncode("new-disk",
newDef && newDef->src ?
newDef->src : "?"))) {
- VIR_WARN0("OOM while encoding audit message");
+ VIR_WARN("OOM while encoding audit message");
goto cleanup;
}
@@ -114,7 +114,7 @@ qemuAuditNet(virDomainObjPtr vm,
if (newDef)
virFormatMacAddr(newDef->mac, newMacstr);
if (!(vmname = virAuditEncode("vm", vm->def->name))) {
- VIR_WARN0("OOM while encoding audit message");
+ VIR_WARN("OOM while encoding audit message");
return;
}
@@ -155,7 +155,7 @@ qemuAuditNetDevice(virDomainDefPtr vmDef, virDomainNetDefPtr netDef,
if (!(vmname = virAuditEncode("vm", vmDef->name)) ||
!(devname = virAuditEncode("path", device))) {
- VIR_WARN0("OOM while encoding audit message");
+ VIR_WARN("OOM while encoding audit message");
goto cleanup;
}
@@ -189,7 +189,7 @@ qemuAuditHostdev(virDomainObjPtr vm, virDomainHostdevDefPtr hostdev,
virUUIDFormat(vm->def->uuid, uuidstr);
if (!(vmname = virAuditEncode("vm", vm->def->name))) {
- VIR_WARN0("OOM while encoding audit message");
+ VIR_WARN("OOM while encoding audit message");
return;
}
@@ -200,7 +200,7 @@ qemuAuditHostdev(virDomainObjPtr vm, virDomainHostdevDefPtr hostdev,
hostdev->source.subsys.u.pci.bus,
hostdev->source.subsys.u.pci.slot,
hostdev->source.subsys.u.pci.function) < 0) {
- VIR_WARN0("OOM while encoding audit message");
+ VIR_WARN("OOM while encoding audit message");
goto cleanup;
}
break;
@@ -208,7 +208,7 @@ qemuAuditHostdev(virDomainObjPtr vm, virDomainHostdevDefPtr hostdev,
if (virAsprintf(&address, "%.3d.%.3d",
hostdev->source.subsys.u.usb.bus,
hostdev->source.subsys.u.usb.device) < 0) {
- VIR_WARN0("OOM while encoding audit message");
+ VIR_WARN("OOM while encoding audit message");
goto cleanup;
}
break;
@@ -219,7 +219,7 @@ qemuAuditHostdev(virDomainObjPtr vm, virDomainHostdevDefPtr hostdev,
}
if (!(device = virAuditEncode("device", VIR_AUDIT_STR(address)))) {
- VIR_WARN0("OOM while encoding audit message");
+ VIR_WARN("OOM while encoding audit message");
goto cleanup;
}
@@ -260,7 +260,7 @@ qemuAuditCgroup(virDomainObjPtr vm, virCgroupPtr cgroup,
virUUIDFormat(vm->def->uuid, uuidstr);
if (!(vmname = virAuditEncode("vm", vm->def->name))) {
- VIR_WARN0("OOM while encoding audit message");
+ VIR_WARN("OOM while encoding audit message");
return;
}
@@ -299,7 +299,7 @@ qemuAuditCgroupMajor(virDomainObjPtr vm, virCgroupPtr cgroup,
if (virAsprintf(&extra, "major category=%s maj=%02X acl=%s",
name, maj, perms) < 0) {
- VIR_WARN0("OOM while encoding audit message");
+ VIR_WARN("OOM while encoding audit message");
return;
}
@@ -338,7 +338,7 @@ qemuAuditCgroupPath(virDomainObjPtr vm, virCgroupPtr cgroup,
if (!(detail = virAuditEncode("path", path)) ||
virAsprintf(&extra, "path path=%s rdev=%s acl=%s",
path, VIR_AUDIT_STR(rdev), perms) < 0) {
- VIR_WARN0("OOM while encoding audit message");
+ VIR_WARN("OOM while encoding audit message");
goto cleanup;
}
@@ -371,7 +371,7 @@ qemuAuditResource(virDomainObjPtr vm, const char *resource,
virUUIDFormat(vm->def->uuid, uuidstr);
if (!(vmname = virAuditEncode("vm", vm->def->name))) {
- VIR_WARN0("OOM while encoding audit message");
+ VIR_WARN("OOM while encoding audit message");
return;
}
@@ -409,7 +409,7 @@ qemuAuditLifecycle(virDomainObjPtr vm, const char *op,
virUUIDFormat(vm->def->uuid, uuidstr);
if (!(vmname = virAuditEncode("vm", vm->def->name))) {
- VIR_WARN0("OOM while encoding audit message");
+ VIR_WARN("OOM while encoding audit message");
return;
}
@@ -462,7 +462,7 @@ qemuAuditSecurityLabel(virDomainObjPtr vm, bool success)
virUUIDFormat(vm->def->uuid, uuidstr);
if (!(vmname = virAuditEncode("vm", vm->def->name))) {
- VIR_WARN0("OOM while encoding audit message");
+ VIR_WARN("OOM while encoding audit message");
return;
}
diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
index 620143e..ea55df5 100644
--- a/src/qemu/qemu_capabilities.c
+++ b/src/qemu/qemu_capabilities.c
@@ -806,12 +806,12 @@ virCapsPtr qemuCapsInit(virCapsPtr old_caps)
*/
if (nodeCapsInitNUMA(caps) < 0) {
virCapabilitiesFreeNUMAInfo(caps);
- VIR_WARN0("Failed to query host NUMA topology, disabling NUMA capabilities");
+ VIR_WARN("Failed to query host NUMA topology, disabling NUMA capabilities");
}
if (old_caps == NULL || old_caps->host.cpu == NULL) {
if (qemuCapsInitCPU(caps, utsname.machine) < 0)
- VIR_WARN0("Failed to get host CPU");
+ VIR_WARN("Failed to get host CPU");
}
else {
caps->host.cpu = old_caps->host.cpu;
diff --git a/src/qemu/qemu_cgroup.c b/src/qemu/qemu_cgroup.c
index 6f075fb..eba1e73 100644
--- a/src/qemu/qemu_cgroup.c
+++ b/src/qemu/qemu_cgroup.c
@@ -218,7 +218,7 @@ int qemuSetupCgroup(struct qemud_driver *driver,
qemuAuditCgroup(vm, cgroup, "deny", "all", rc == 0);
if (rc != 0) {
if (rc == -EPERM) {
- VIR_WARN0("Group devices ACL is not accessible, disabling whitelisting");
+ VIR_WARN("Group devices ACL is not accessible, disabling whitelisting");
goto done;
}
diff --git a/src/qemu/qemu_conf.c b/src/qemu/qemu_conf.c
index bb5421b..f977673 100644
--- a/src/qemu/qemu_conf.c
+++ b/src/qemu/qemu_conf.c
@@ -287,7 +287,7 @@ int qemudLoadDriverConfig(struct qemud_driver *driver,
for (i = 0, pp = p->list; pp; ++i, pp = pp->next) {
int ctl;
if (pp->type != VIR_CONF_STRING) {
- VIR_ERROR0(_("cgroup_controllers must be a list of strings"));
+ VIR_ERROR(_("cgroup_controllers must be a list of strings"));
virConfFree(conf);
return -1;
}
@@ -327,7 +327,7 @@ int qemudLoadDriverConfig(struct qemud_driver *driver,
}
for (i = 0, pp = p->list; pp; ++i, pp = pp->next) {
if (pp->type != VIR_CONF_STRING) {
- VIR_ERROR0(_("cgroup_device_acl must be a list of strings"));
+ VIR_ERROR(_("cgroup_device_acl must be a list of strings"));
virConfFree(conf);
return -1;
}
diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
index c61f9bf..19e1938 100644
--- a/src/qemu/qemu_domain.c
+++ b/src/qemu/qemu_domain.c
@@ -125,7 +125,7 @@ static void qemuDomainObjPrivateFree(void *data)
/* This should never be non-NULL if we get here, but just in case... */
if (priv->mon) {
- VIR_ERROR0(_("Unexpected QEMU monitor still active during domain deletion"));
+ VIR_ERROR(_("Unexpected QEMU monitor still active during domain deletion"));
qemuMonitorClose(priv->mon);
}
VIR_FREE(priv);
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 0fd0f10..01d4acf 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -217,7 +217,7 @@ qemuSecurityInit(struct qemud_driver *driver)
return 0;
error:
- VIR_ERROR0(_("Failed to initialize security drivers"));
+ VIR_ERROR(_("Failed to initialize security drivers"));
virSecurityManagerFree(mgr);
return -1;
}
@@ -318,7 +318,7 @@ static void qemuDomainSnapshotLoad(void *payload,
VIR_INFO("Loading snapshot file '%s'", entry->d_name);
if (virAsprintf(&fullpath, "%s/%s", snapDir, entry->d_name) < 0) {
- VIR_ERROR0(_("Failed to allocate memory for path"));
+ VIR_ERROR(_("Failed to allocate memory for path"));
continue;
}
@@ -380,7 +380,7 @@ qemudStartup(int privileged) {
return -1;
if (virMutexInit(&qemu_driver->lock) < 0) {
- VIR_ERROR0(_("cannot initialize mutex"));
+ VIR_ERROR(_("cannot initialize mutex"));
VIR_FREE(qemu_driver);
return -1;
}
@@ -1015,7 +1015,7 @@ qemudGetProcessInfo(unsigned long long *cpuTime, int *lastCpu, int pid,
"%*u %*u %*u %*u %*u %*u %*u %*u %*u %*u %*d %d",
&usertime, &systime, &cpu) != 3) {
VIR_FORCE_FCLOSE(pidinfo);
- VIR_WARN0("cannot parse process status data");
+ VIR_WARN("cannot parse process status data");
errno = -EINVAL;
return -1;
}
@@ -2067,7 +2067,7 @@ endjob:
if (header.was_running && virDomainObjIsActive(vm)) {
rc = qemuProcessStartCPUs(driver, vm, dom->conn);
if (rc < 0)
- VIR_WARN0("Unable to resume guest CPUs after save failure");
+ VIR_WARN("Unable to resume guest CPUs after save failure");
}
}
if (qemuDomainObjEndJob(vm) == 0)
diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c
index dae2269..3cf7d35 100644
--- a/src/qemu/qemu_hotplug.c
+++ b/src/qemu/qemu_hotplug.c
@@ -291,7 +291,7 @@ cleanup:
(controller->info.type == VIR_DOMAIN_DEVICE_ADDRESS_TYPE_PCI) &&
releaseaddr &&
qemuDomainPCIAddressReleaseAddr(priv->pciaddrs, &controller->info) < 0)
- VIR_WARN0("Unable to release PCI address on controller");
+ VIR_WARN("Unable to release PCI address on controller");
VIR_FREE(devstr);
return ret;
@@ -326,7 +326,7 @@ qemuDomainFindOrCreateSCSIDiskController(struct qemud_driver *driver,
cont->idx = controller;
cont->model = -1;
- VIR_INFO0("No SCSI controller present, hotplugging one");
+ VIR_INFO("No SCSI controller present, hotplugging one");
if (qemuDomainAttachPciControllerDevice(driver,
vm, cont) < 0) {
VIR_FREE(cont);
@@ -698,7 +698,7 @@ cleanup:
(net->info.type == VIR_DOMAIN_DEVICE_ADDRESS_TYPE_PCI) &&
releaseaddr &&
qemuDomainPCIAddressReleaseAddr(priv->pciaddrs, &net->info) < 0)
- VIR_WARN0("Unable to release PCI address on NIC");
+ VIR_WARN("Unable to release PCI address on NIC");
if (ret != 0)
virDomainConfNWFilterTeardown(net);
@@ -729,7 +729,7 @@ try_remove:
qemuDomainObjExitMonitorWithDriver(driver, vm);
VIR_FREE(netdev_name);
} else {
- VIR_WARN0("Unable to remove network backend");
+ VIR_WARN("Unable to remove network backend");
}
} else {
char *hostnet_name;
@@ -829,7 +829,7 @@ error:
(hostdev->info.type == VIR_DOMAIN_DEVICE_ADDRESS_TYPE_PCI) &&
releaseaddr &&
qemuDomainPCIAddressReleaseAddr(priv->pciaddrs, &hostdev->info) < 0)
- VIR_WARN0("Unable to release PCI address on host device");
+ VIR_WARN("Unable to release PCI address on host device");
qemuDomainReAttachHostdevDevices(driver, &hostdev, 1);
@@ -964,7 +964,7 @@ int qemuDomainAttachHostDevice(struct qemud_driver *driver,
error:
if (virSecurityManagerRestoreHostdevLabel(driver->securityManager,
vm, hostdev) < 0)
- VIR_WARN0("Unable to restore host device labelling on hotplug fail");
+ VIR_WARN("Unable to restore host device labelling on hotplug fail");
return -1;
}
@@ -1072,7 +1072,7 @@ qemuDomainChangeGraphics(struct qemud_driver *driver,
olddev->data.spice.auth.validTo = dev->data.spice.auth.validTo;
olddev->data.spice.auth.expires = dev->data.spice.auth.expires;
} else {
- VIR_DEBUG0("Not updating since password didn't change");
+ VIR_DEBUG("Not updating since password didn't change");
ret = 0;
}
@@ -1393,7 +1393,7 @@ int qemuDomainDetachPciControllerDevice(struct qemud_driver *driver,
if (qemuCapsGet(priv->qemuCaps, QEMU_CAPS_DEVICE) &&
qemuDomainPCIAddressReleaseAddr(priv->pciaddrs, &detach->info) < 0)
- VIR_WARN0("Unable to release PCI address on controller");
+ VIR_WARN("Unable to release PCI address on controller");
virDomainControllerDefFree(detach);
@@ -1485,7 +1485,7 @@ int qemuDomainDetachNetDevice(struct qemud_driver *driver,
if (qemuCapsGet(priv->qemuCaps, QEMU_CAPS_DEVICE) &&
qemuDomainPCIAddressReleaseAddr(priv->pciaddrs, &detach->info) < 0)
- VIR_WARN0("Unable to release PCI address on NIC");
+ VIR_WARN("Unable to release PCI address on NIC");
virDomainConfNWFilterTeardown(detach);
@@ -1602,7 +1602,7 @@ int qemuDomainDetachHostPciDevice(struct qemud_driver *driver,
if (qemuCapsGet(priv->qemuCaps, QEMU_CAPS_DEVICE) &&
qemuDomainPCIAddressReleaseAddr(priv->pciaddrs, &detach->info) < 0)
- VIR_WARN0("Unable to release PCI address on host device");
+ VIR_WARN("Unable to release PCI address on host device");
if (vm->def->nhostdevs > 1) {
memmove(vm->def->hostdevs + i,
@@ -1731,7 +1731,7 @@ int qemuDomainDetachHostDevice(struct qemud_driver *driver,
if (virSecurityManagerRestoreHostdevLabel(driver->securityManager,
vm, dev->data.hostdev) < 0)
- VIR_WARN0("Failed to restore host device labelling");
+ VIR_WARN("Failed to restore host device labelling");
return ret;
}
diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c
index 6738a53..3214d38 100644
--- a/src/qemu/qemu_migration.c
+++ b/src/qemu/qemu_migration.c
@@ -122,18 +122,18 @@ qemuMigrationWaitForCompletion(struct qemud_driver *driver, virDomainObjPtr vm)
if (priv->jobSignals & QEMU_JOB_SIGNAL_CANCEL) {
priv->jobSignals ^= QEMU_JOB_SIGNAL_CANCEL;
- VIR_DEBUG0("Cancelling job at client request");
+ VIR_DEBUG("Cancelling job at client request");
qemuDomainObjEnterMonitorWithDriver(driver, vm);
rc = qemuMonitorMigrateCancel(priv->mon);
qemuDomainObjExitMonitorWithDriver(driver, vm);
if (rc < 0) {
- VIR_WARN0("Unable to cancel job");
+ VIR_WARN("Unable to cancel job");
}
} else if (priv->jobSignals & QEMU_JOB_SIGNAL_SUSPEND) {
priv->jobSignals ^= QEMU_JOB_SIGNAL_SUSPEND;
- VIR_DEBUG0("Pausing domain for non-live migration");
+ VIR_DEBUG("Pausing domain for non-live migration");
if (qemuMigrationSetOffline(driver, vm) < 0)
- VIR_WARN0("Unable to pause domain");
+ VIR_WARN("Unable to pause domain");
} else if (priv->jobSignals & QEMU_JOB_SIGNAL_MIGRATE_DOWNTIME) {
unsigned long long ms = priv->jobSignalsData.migrateDowntime;
@@ -144,7 +144,7 @@ qemuMigrationWaitForCompletion(struct qemud_driver *driver, virDomainObjPtr vm)
rc = qemuMonitorSetMigrationDowntime(priv->mon, ms);
qemuDomainObjExitMonitorWithDriver(driver, vm);
if (rc < 0)
- VIR_WARN0("Unable to set migration downtime");
+ VIR_WARN("Unable to set migration downtime");
} else if (priv->jobSignals & QEMU_JOB_SIGNAL_MIGRATE_SPEED) {
unsigned long bandwidth = priv->jobSignalsData.migrateBandwidth;
@@ -155,7 +155,7 @@ qemuMigrationWaitForCompletion(struct qemud_driver *driver, virDomainObjPtr vm)
rc = qemuMonitorSetMigrationSpeed(priv->mon, bandwidth);
qemuDomainObjExitMonitorWithDriver(driver, vm);
if (rc < 0)
- VIR_WARN0("Unable to set migration speed");
+ VIR_WARN("Unable to set migration speed");
}
/* Repeat check because the job signals might have caused
@@ -1364,7 +1364,7 @@ qemuMigrationToFile(struct qemud_driver *driver, virDomainObjPtr vm,
pipeFD[1]);
if (VIR_CLOSE(pipeFD[0]) < 0 ||
VIR_CLOSE(pipeFD[1]) < 0)
- VIR_WARN0("failed to close intermediate pipe");
+ VIR_WARN("failed to close intermediate pipe");
} else {
rc = qemuMonitorMigrateToFile(priv->mon,
QEMU_MONITOR_MIGRATE_BACKGROUND,
diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c
index f89038e..9229942 100644
--- a/src/qemu/qemu_monitor.c
+++ b/src/qemu/qemu_monitor.c
@@ -1429,7 +1429,7 @@ int qemuMonitorMigrateToFd(qemuMonitorPtr mon,
if (ret < 0) {
if (qemuMonitorCloseFileHandle(mon, "migrate") < 0)
- VIR_WARN0("failed to close migration handle");
+ VIR_WARN("failed to close migration handle");
}
return ret;
diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c
index 20a78e1..6be0f1b 100644
--- a/src/qemu/qemu_monitor_json.c
+++ b/src/qemu/qemu_monitor_json.c
@@ -84,7 +84,7 @@ qemuMonitorJSONIOProcessEvent(qemuMonitorPtr mon,
type = virJSONValueObjectGetString(obj, "event");
if (!type) {
- VIR_WARN0("missing event type in message");
+ VIR_WARN("missing event type in message");
errno = EINVAL;
return -1;
}
@@ -112,18 +112,18 @@ qemuMonitorJSONIOProcessLine(qemuMonitorPtr mon,
VIR_DEBUG("Line [%s]", line);
if (!(obj = virJSONValueFromString(line))) {
- VIR_DEBUG0("Parsing JSON string failed");
+ VIR_DEBUG("Parsing JSON string failed");
errno = EINVAL;
goto cleanup;
}
if (obj->type != VIR_JSON_TYPE_OBJECT) {
- VIR_DEBUG0("Parsed JSON string isn't an object");
+ VIR_DEBUG("Parsed JSON string isn't an object");
errno = EINVAL;
}
if (virJSONValueObjectHasKey(obj, "QMP") == 1) {
- VIR_DEBUG0("Got QMP capabilities data");
+ VIR_DEBUG("Got QMP capabilities data");
ret = 0;
goto cleanup;
}
@@ -537,7 +537,7 @@ static void qemuMonitorJSONHandleRTCChange(qemuMonitorPtr mon, virJSONValuePtr d
{
long long offset = 0;
if (virJSONValueObjectGetNumberLong(data, "offset", &offset) < 0) {
- VIR_WARN0("missing offset in RTC change event");
+ VIR_WARN("missing offset in RTC change event");
offset = 0;
}
qemuMonitorEmitRTCChange(mon, offset);
@@ -552,7 +552,7 @@ static void qemuMonitorJSONHandleWatchdog(qemuMonitorPtr mon, virJSONValuePtr da
const char *action;
int actionID;
if (!(action = virJSONValueObjectGetString(data, "action"))) {
- VIR_WARN0("missing action in watchdog event");
+ VIR_WARN("missing action in watchdog event");
}
if (action) {
if ((actionID = qemuMonitorWatchdogActionTypeFromString(action)) < 0) {
@@ -582,17 +582,17 @@ static void qemuMonitorJSONHandleIOError(qemuMonitorPtr mon, virJSONValuePtr dat
to the application */
if ((action = virJSONValueObjectGetString(data, "action")) == NULL) {
- VIR_WARN0("Missing action in disk io error event");
+ VIR_WARN("Missing action in disk io error event");
action = "ignore";
}
if ((device = virJSONValueObjectGetString(data, "device")) == NULL) {
- VIR_WARN0("missing device in disk io error event");
+ VIR_WARN("missing device in disk io error event");
}
#if 0
if ((reason = virJSONValueObjectGetString(data, "reason")) == NULL) {
- VIR_WARN0("missing reason in disk io error event");
+ VIR_WARN("missing reason in disk io error event");
reason = "";
}
#else
@@ -622,11 +622,11 @@ static void qemuMonitorJSONHandleVNC(qemuMonitorPtr mon, virJSONValuePtr data, i
virJSONValuePtr server;
if (!(client = virJSONValueObjectGet(data, "client"))) {
- VIR_WARN0("missing client info in VNC event");
+ VIR_WARN("missing client info in VNC event");
return;
}
if (!(server = virJSONValueObjectGet(data, "server"))) {
- VIR_WARN0("missing server info in VNC event");
+ VIR_WARN("missing server info in VNC event");
return;
}
@@ -1504,7 +1504,7 @@ int qemuMonitorJSONSetCPU(qemuMonitorPtr mon,
if (qemuMonitorJSONHasError(reply, "CommandNotFound") &&
qemuMonitorCheckHMP(mon, "cpu_set")) {
- VIR_DEBUG0("cpu_set command not found, trying HMP");
+ VIR_DEBUG("cpu_set command not found, trying HMP");
ret = qemuMonitorTextSetCPU(mon, cpu, online);
goto cleanup;
}
@@ -2301,7 +2301,7 @@ int qemuMonitorJSONAddDrive(qemuMonitorPtr mon,
if (qemuMonitorJSONHasError(reply, "CommandNotFound") &&
qemuMonitorCheckHMP(mon, "drive_add")) {
- VIR_DEBUG0("drive_add command not found, trying HMP");
+ VIR_DEBUG("drive_add command not found, trying HMP");
ret = qemuMonitorTextAddDrive(mon, drivestr);
goto cleanup;
}
@@ -2334,10 +2334,10 @@ int qemuMonitorJSONDriveDel(qemuMonitorPtr mon,
if (qemuMonitorJSONHasError(reply, "CommandNotFound")) {
if (qemuMonitorCheckHMP(mon, "drive_del")) {
- VIR_DEBUG0("drive_del command not found, trying HMP");
+ VIR_DEBUG("drive_del command not found, trying HMP");
ret = qemuMonitorTextDriveDel(mon, drivestr);
} else {
- VIR_ERROR0(_("deleting disk is not supported. "
+ VIR_ERROR(_("deleting disk is not supported. "
"This may leak data if disk is reassigned"));
ret = 1;
}
@@ -2404,7 +2404,7 @@ int qemuMonitorJSONCreateSnapshot(qemuMonitorPtr mon, const char *name)
if (qemuMonitorJSONHasError(reply, "CommandNotFound") &&
qemuMonitorCheckHMP(mon, "savevm")) {
- VIR_DEBUG0("savevm command not found, trying HMP");
+ VIR_DEBUG("savevm command not found, trying HMP");
ret = qemuMonitorTextCreateSnapshot(mon, name);
goto cleanup;
}
@@ -2434,7 +2434,7 @@ int qemuMonitorJSONLoadSnapshot(qemuMonitorPtr mon, const char *name)
if (qemuMonitorJSONHasError(reply, "CommandNotFound") &&
qemuMonitorCheckHMP(mon, "loadvm")) {
- VIR_DEBUG0("loadvm command not found, trying HMP");
+ VIR_DEBUG("loadvm command not found, trying HMP");
ret = qemuMonitorTextLoadSnapshot(mon, name);
goto cleanup;
}
@@ -2464,7 +2464,7 @@ int qemuMonitorJSONDeleteSnapshot(qemuMonitorPtr mon, const char *name)
if (qemuMonitorJSONHasError(reply, "CommandNotFound") &&
qemuMonitorCheckHMP(mon, "delvm")) {
- VIR_DEBUG0("delvm command not found, trying HMP");
+ VIR_DEBUG("delvm command not found, trying HMP");
ret = qemuMonitorTextDeleteSnapshot(mon, name);
goto cleanup;
}
diff --git a/src/qemu/qemu_monitor_text.c b/src/qemu/qemu_monitor_text.c
index 53781c8..c29b4af 100644
--- a/src/qemu/qemu_monitor_text.c
+++ b/src/qemu/qemu_monitor_text.c
@@ -84,7 +84,7 @@ int qemuMonitorTextIOProcess(qemuMonitorPtr mon ATTRIBUTE_UNUSED,
not consumed anything. We'll restart when more data arrives. */
if (!offset) {
#if DEBUG_IO
- VIR_DEBUG0("Partial greeting seen, getting out & waiting for more");
+ VIR_DEBUG("Partial greeting seen, getting out & waiting for more");
#endif
return 0;
}
@@ -92,7 +92,7 @@ int qemuMonitorTextIOProcess(qemuMonitorPtr mon ATTRIBUTE_UNUSED,
used = offset - data + strlen(GREETING_POSTFIX);
#if DEBUG_IO
- VIR_DEBUG0("Discarded monitor greeting");
+ VIR_DEBUG("Discarded monitor greeting");
#endif
}
@@ -191,7 +191,7 @@ int qemuMonitorTextIOProcess(qemuMonitorPtr mon ATTRIBUTE_UNUSED,
#if DEBUG_IO
VIR_DEBUG("Finished %d byte reply [%s]", want, msg->rxBuffer);
} else {
- VIR_DEBUG0("Finished 0 byte reply");
+ VIR_DEBUG("Finished 0 byte reply");
#endif
}
msg->finished = 1;
@@ -2386,7 +2386,7 @@ int qemuMonitorTextDriveDel(qemuMonitorPtr mon,
}
if (strstr(reply, "unknown command:")) {
- VIR_ERROR0(_("deleting drive is not supported. "
+ VIR_ERROR(_("deleting drive is not supported. "
"This may leak data if disk is reassigned"));
ret = 1;
goto cleanup;
diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
index bd7c932..901265e 100644
--- a/src/qemu/qemu_process.c
+++ b/src/qemu/qemu_process.c
@@ -382,7 +382,7 @@ qemuProcessHandleRTCChange(qemuMonitorPtr mon ATTRIBUTE_UNUSED,
vm->def->clock.data.adjustment = offset;
if (virDomainSaveStatus(driver->caps, driver->stateDir, vm) < 0)
- VIR_WARN0("unable to save domain status with RTC change");
+ VIR_WARN("unable to save domain status with RTC change");
virDomainObjUnlock(vm);
@@ -1091,7 +1091,7 @@ qemuProcessInitCpuAffinity(virDomainObjPtr vm)
unsigned char *cpumap;
int cpumaplen;
- VIR_DEBUG0("Setting CPU affinity");
+ VIR_DEBUG("Setting CPU affinity");
if (nodeGetInfo(NULL, &nodeinfo) < 0)
return -1;
@@ -1995,7 +1995,7 @@ int qemuProcessStart(virConnectPtr conn,
hookData.vm = vm;
hookData.driver = driver;
- VIR_DEBUG0("Beginning VM startup process");
+ VIR_DEBUG("Beginning VM startup process");
if (virDomainObjIsActive(vm)) {
qemuReportError(VIR_ERR_OPERATION_INVALID,
@@ -2007,7 +2007,7 @@ 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
*/
- VIR_DEBUG0("Setting current domain def as transient");
+ VIR_DEBUG("Setting current domain def as transient");
if (virDomainObjSetDefTransient(driver->caps, vm, true) < 0)
goto cleanup;
@@ -2030,11 +2030,11 @@ int qemuProcessStart(virConnectPtr conn,
}
/* Must be run before security labelling */
- VIR_DEBUG0("Preparing host devices");
+ VIR_DEBUG("Preparing host devices");
if (qemuPrepareHostDevices(driver, vm->def) < 0)
goto cleanup;
- VIR_DEBUG0("Preparing chr devices");
+ VIR_DEBUG("Preparing chr devices");
if (virDomainChrDefForeach(vm->def,
true,
qemuProcessPrepareChardevDevice,
@@ -2043,14 +2043,14 @@ int qemuProcessStart(virConnectPtr conn,
/* If you are using a SecurityDriver with dynamic labelling,
then generate a security label for isolation */
- VIR_DEBUG0("Generating domain security label (if required)");
+ VIR_DEBUG("Generating domain security label (if required)");
if (virSecurityManagerGenLabel(driver->securityManager, vm) < 0) {
qemuAuditSecurityLabel(vm, false);
goto cleanup;
}
qemuAuditSecurityLabel(vm, true);
- VIR_DEBUG0("Generating setting domain security labels (if required)");
+ VIR_DEBUG("Generating setting domain security labels (if required)");
if (virSecurityManagerSetAllLabel(driver->securityManager,
vm, stdin_path) < 0)
goto cleanup;
@@ -2061,7 +2061,7 @@ int qemuProcessStart(virConnectPtr conn,
*/
struct stat stdin_sb;
- VIR_DEBUG0("setting security label on pipe used for migration");
+ VIR_DEBUG("setting security label on pipe used for migration");
if (fstat(stdin_fd, &stdin_sb) < 0) {
virReportSystemError(errno,
@@ -2075,7 +2075,7 @@ int qemuProcessStart(virConnectPtr conn,
/* Ensure no historical cgroup for this VM is lying around bogus
* settings */
- VIR_DEBUG0("Ensuring no historical cgroup is lying around");
+ VIR_DEBUG("Ensuring no historical cgroup is lying around");
qemuRemoveCgroup(driver, vm, 1);
if (vm->def->ngraphics == 1) {
@@ -2121,11 +2121,11 @@ int qemuProcessStart(virConnectPtr conn,
goto cleanup;
}
- VIR_DEBUG0("Creating domain log file");
+ VIR_DEBUG("Creating domain log file");
if ((logfile = qemuDomainCreateLog(driver, vm, false)) < 0)
goto cleanup;
- VIR_DEBUG0("Determining emulator version");
+ VIR_DEBUG("Determining emulator version");
qemuCapsFree(priv->qemuCaps);
priv->qemuCaps = NULL;
if (qemuCapsExtractVersionInfo(vm->def->emulator, vm->def->os.arch,
@@ -2133,7 +2133,7 @@ int qemuProcessStart(virConnectPtr conn,
&priv->qemuCaps) < 0)
goto cleanup;
- VIR_DEBUG0("Setting up domain cgroup (if required)");
+ VIR_DEBUG("Setting up domain cgroup (if required)");
if (qemuSetupCgroup(driver, vm) < 0)
goto cleanup;
@@ -2142,7 +2142,7 @@ int qemuProcessStart(virConnectPtr conn,
goto cleanup;
}
- VIR_DEBUG0("Preparing monitor state");
+ VIR_DEBUG("Preparing monitor state");
if (qemuProcessPrepareMonitorChr(driver, priv->monConfig, vm->def->name) < 0)
goto cleanup;
@@ -2176,7 +2176,7 @@ int qemuProcessStart(virConnectPtr conn,
* use in hotplug
*/
if (qemuCapsGet(priv->qemuCaps, QEMU_CAPS_DEVICE)) {
- VIR_DEBUG0("Assigning domain PCI addresses");
+ VIR_DEBUG("Assigning domain PCI addresses");
/* Populate cache with current addresses */
if (priv->pciaddrs) {
qemuDomainPCIAddressSetFree(priv->pciaddrs);
@@ -2195,7 +2195,7 @@ int qemuProcessStart(virConnectPtr conn,
priv->persistentAddrs = 0;
}
- VIR_DEBUG0("Building emulator command line");
+ VIR_DEBUG("Building emulator command line");
if (!(cmd = qemuBuildCommandLine(conn, driver, vm->def, priv->monConfig,
priv->monJSON != 0, priv->qemuCaps,
migrateFrom, stdin_fd,
@@ -2297,31 +2297,31 @@ int qemuProcessStart(virConnectPtr conn,
if (ret == -1) /* The VM failed to start */
goto cleanup;
- VIR_DEBUG0("Waiting for monitor to show up");
+ VIR_DEBUG("Waiting for monitor to show up");
if (qemuProcessWaitForMonitor(driver, vm, pos) < 0)
goto cleanup;
- VIR_DEBUG0("Detecting VCPU PIDs");
+ VIR_DEBUG("Detecting VCPU PIDs");
if (qemuProcessDetectVcpuPIDs(driver, vm) < 0)
goto cleanup;
- VIR_DEBUG0("Setting VCPU affinities");
+ VIR_DEBUG("Setting VCPU affinities");
if (qemuProcessSetVcpuAffinites(conn, vm) < 0)
goto cleanup;
- VIR_DEBUG0("Setting any required VM passwords");
+ VIR_DEBUG("Setting any required VM passwords");
if (qemuProcessInitPasswords(conn, driver, vm) < 0)
goto cleanup;
/* If we have -device, then addresses are assigned explicitly.
* If not, then we have to detect dynamic ones here */
if (!qemuCapsGet(priv->qemuCaps, QEMU_CAPS_DEVICE)) {
- VIR_DEBUG0("Determining domain device PCI addresses");
+ VIR_DEBUG("Determining domain device PCI addresses");
if (qemuProcessInitPCIAddresses(driver, vm) < 0)
goto cleanup;
}
- VIR_DEBUG0("Setting initial memory amount");
+ VIR_DEBUG("Setting initial memory amount");
cur_balloon = vm->def->mem.cur_balloon;
qemuDomainObjEnterMonitorWithDriver(driver, vm);
if (qemuMonitorSetBalloon(priv->mon, cur_balloon) < 0) {
@@ -2331,7 +2331,7 @@ int qemuProcessStart(virConnectPtr conn,
qemuDomainObjExitMonitorWithDriver(driver, vm);
if (!start_paused) {
- VIR_DEBUG0("Starting domain CPUs");
+ VIR_DEBUG("Starting domain CPUs");
/* Allow the CPUS to start executing */
if (qemuProcessStartCPUs(driver, vm, conn) < 0) {
if (virGetLastError() == NULL)
@@ -2342,7 +2342,7 @@ int qemuProcessStart(virConnectPtr conn,
}
- VIR_DEBUG0("Writing domain status to disk");
+ VIR_DEBUG("Writing domain status to disk");
if (virDomainSaveStatus(driver->caps, driver->stateDir, vm) < 0)
goto cleanup;
diff --git a/src/remote/remote_driver.c b/src/remote/remote_driver.c
index d076a90..ec16cdf 100644
--- a/src/remote/remote_driver.c
+++ b/src/remote/remote_driver.c
@@ -923,21 +923,21 @@ doRemoteOpen (virConnectPtr conn,
goto failed;
}
- VIR_DEBUG0("Adding Handler for remote events");
+ VIR_DEBUG("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) {
- VIR_DEBUG0("virEventAddHandle failed: No addHandleImpl defined."
+ VIR_DEBUG("virEventAddHandle failed: No addHandleImpl defined."
" continuing without events.");
} else {
- VIR_DEBUG0("Adding Timeout for remote event queue flushing");
+ VIR_DEBUG("Adding Timeout for remote event queue flushing");
if ( (priv->eventFlushTimer = virEventAddTimeout(-1,
remoteDomainEventQueueFlush,
conn, NULL)) < 0) {
- VIR_DEBUG0("virEventAddTimeout failed: No addTimeoutImpl defined. "
+ VIR_DEBUG("virEventAddTimeout failed: No addTimeoutImpl defined. "
"continuing without events.");
virEventRemoveHandle(priv->watch);
priv->watch = -1;
@@ -1086,7 +1086,7 @@ remoteOpen (virConnectPtr conn,
(STREQ(conn->uri->path, "/session") ||
STRPREFIX(conn->uri->scheme, "test+")) &&
getuid() > 0) {
- VIR_DEBUG0("Auto-spawn user daemon instance");
+ VIR_DEBUG("Auto-spawn user daemon instance");
rflags |= VIR_DRV_OPEN_REMOTE_USER;
if (!autostart ||
STRNEQ(autostart, "0"))
@@ -1100,10 +1100,10 @@ remoteOpen (virConnectPtr conn,
* to the UNIX socket anyway.
*/
if (!conn->uri) {
- VIR_DEBUG0("Auto-probe remote URI");
+ VIR_DEBUG("Auto-probe remote URI");
#ifndef __sun
if (getuid() > 0) {
- VIR_DEBUG0("Auto-spawn user daemon instance");
+ VIR_DEBUG("Auto-spawn user daemon instance");
rflags |= VIR_DRV_OPEN_REMOTE_USER;
if (!autostart ||
STRNEQ(autostart, "0"))
@@ -1401,7 +1401,7 @@ negotiate_gnutls_on_connection (virConnectPtr conn,
/* Verify certificate. */
if (verify_certificate (conn, priv, session) == -1) {
- VIR_DEBUG0("failed to verify peer's certificate");
+ VIR_DEBUG("failed to verify peer's certificate");
if (!no_verify)
goto cleanup;
}
@@ -3410,7 +3410,7 @@ remoteAuthSASL (virConnectPtr conn, struct private_data *priv, int in_open,
int ret = -1;
const char *mechlist;
- VIR_DEBUG0("Client initialize SASL authentication");
+ VIR_DEBUG("Client initialize SASL authentication");
/* Sets up the SASL library as a whole */
err = sasl_client_init(NULL);
if (err != SASL_OK) {
@@ -3692,7 +3692,7 @@ remoteAuthSASL (virConnectPtr conn, struct private_data *priv, int in_open,
priv->is_secure = 1;
}
- VIR_DEBUG0("SASL authentication complete");
+ VIR_DEBUG("SASL authentication complete");
priv->saslconn = saslconn;
ret = 0;
@@ -3718,7 +3718,7 @@ remoteAuthPolkit (virConnectPtr conn, struct private_data *priv, int in_open,
virConnectAuthPtr auth ATTRIBUTE_UNUSED)
{
remote_auth_polkit_ret ret;
- VIR_DEBUG0("Client initialize PolicyKit-1 authentication");
+ VIR_DEBUG("Client initialize PolicyKit-1 authentication");
memset (&ret, 0, sizeof ret);
if (call (conn, priv, in_open, REMOTE_PROC_AUTH_POLKIT,
@@ -3727,7 +3727,7 @@ remoteAuthPolkit (virConnectPtr conn, struct private_data *priv, int in_open,
return -1; /* virError already set by call */
}
- VIR_DEBUG0("PolicyKit-1 authentication complete");
+ VIR_DEBUG("PolicyKit-1 authentication complete");
return 0;
}
# elif HAVE_POLKIT0
@@ -3747,7 +3747,7 @@ remoteAuthPolkit (virConnectPtr conn, struct private_data *priv, int in_open,
NULL,
0,
};
- VIR_DEBUG0("Client initialize PolicyKit-0 authentication");
+ VIR_DEBUG("Client initialize PolicyKit-0 authentication");
if (auth && auth->cb) {
/* Check if the necessary credential type for PolicyKit is supported */
@@ -3757,7 +3757,7 @@ remoteAuthPolkit (virConnectPtr conn, struct private_data *priv, int in_open,
}
if (allowcb) {
- VIR_DEBUG0("Client run callback for PolicyKit authentication");
+ VIR_DEBUG("Client run callback for PolicyKit authentication");
/* Run the authentication callback */
if ((*(auth->cb))(&cred, 1, auth->cbdata) < 0) {
remoteError(VIR_ERR_AUTH_FAILED, "%s",
@@ -3765,10 +3765,10 @@ remoteAuthPolkit (virConnectPtr conn, struct private_data *priv, int in_open,
return -1;
}
} else {
- VIR_DEBUG0("Client auth callback does not support PolicyKit");
+ VIR_DEBUG("Client auth callback does not support PolicyKit");
}
} else {
- VIR_DEBUG0("No auth callback provided");
+ VIR_DEBUG("No auth callback provided");
}
memset (&ret, 0, sizeof ret);
@@ -3778,7 +3778,7 @@ remoteAuthPolkit (virConnectPtr conn, struct private_data *priv, int in_open,
return -1; /* virError already set by call */
}
- VIR_DEBUG0("PolicyKit-0 authentication complete");
+ VIR_DEBUG("PolicyKit-0 authentication complete");
return 0;
}
# endif /* HAVE_POLKIT0 */
@@ -4190,10 +4190,10 @@ remoteStreamEventTimerUpdate(struct private_stream_data *privst)
if ((privst->incomingOffset &&
(privst->cbEvents & VIR_STREAM_EVENT_READABLE)) ||
(privst->cbEvents & VIR_STREAM_EVENT_WRITABLE)) {
- VIR_DEBUG0("Enabling event timer");
+ VIR_DEBUG("Enabling event timer");
virEventUpdateTimeout(privst->cbTimer, 0);
} else {
- VIR_DEBUG0("Disabling event timer");
+ VIR_DEBUG("Disabling event timer");
virEventUpdateTimeout(privst->cbTimer, -1);
}
}
@@ -4303,7 +4303,7 @@ remoteStreamHasError(virStreamPtr st) {
return 0;
}
- VIR_DEBUG0("Raising async error");
+ VIR_DEBUG("Raising async error");
virRaiseErrorFull(__FILE__, __FUNCTION__, __LINE__,
privst->err.domain,
privst->err.code,
@@ -4395,7 +4395,7 @@ remoteStreamRecv(virStreamPtr st,
int ret;
if (st->flags & VIR_STREAM_NONBLOCK) {
- VIR_DEBUG0("Non-blocking mode and no data available");
+ VIR_DEBUG("Non-blocking mode and no data available");
rv = -2;
goto cleanup;
}
@@ -5550,7 +5550,7 @@ processCallDispatchMessage(virConnectPtr conn, struct private_data *priv,
if (virDomainEventQueuePush(priv->domainEvents,
event) < 0) {
- VIR_DEBUG0("Error adding event to queue");
+ VIR_DEBUG("Error adding event to queue");
virDomainEventFree(event);
}
virEventUpdateTimeout(priv->eventFlushTimer, 0);
@@ -5594,7 +5594,7 @@ processCallDispatchStream(virConnectPtr conn ATTRIBUTE_UNUSED,
case REMOTE_CONTINUE: {
int avail = privst->incomingLength - privst->incomingOffset;
int need = priv->bufferLength - priv->bufferOffset;
- VIR_DEBUG0("Got a stream data packet");
+ VIR_DEBUG("Got a stream data packet");
/* XXX flag stream as complete somwhere if need==0 */
@@ -5602,7 +5602,7 @@ processCallDispatchStream(virConnectPtr conn ATTRIBUTE_UNUSED,
int extra = need - avail;
if (VIR_REALLOC_N(privst->incoming,
privst->incomingLength + extra) < 0) {
- VIR_DEBUG0("Out of memory handling stream data");
+ VIR_DEBUG("Out of memory handling stream data");
return -1;
}
privst->incomingLength += extra;
@@ -5624,9 +5624,9 @@ processCallDispatchStream(virConnectPtr conn ATTRIBUTE_UNUSED,
}
case REMOTE_OK:
- VIR_DEBUG0("Got a synchronous confirm");
+ VIR_DEBUG("Got a synchronous confirm");
if (!thecall) {
- VIR_DEBUG0("Got unexpected stream finish confirmation");
+ VIR_DEBUG("Got unexpected stream finish confirmation");
return -1;
}
thecall->mode = REMOTE_MODE_COMPLETE;
@@ -5634,7 +5634,7 @@ processCallDispatchStream(virConnectPtr conn ATTRIBUTE_UNUSED,
case REMOTE_ERROR:
if (thecall && thecall->want_reply) {
- VIR_DEBUG0("Got a synchronous error");
+ VIR_DEBUG("Got a synchronous error");
/* Give the error straight to this call */
memset (&thecall->err, 0, sizeof thecall->err);
if (!xdr_remote_error (xdr, &thecall->err)) {
@@ -5643,16 +5643,16 @@ processCallDispatchStream(virConnectPtr conn ATTRIBUTE_UNUSED,
}
thecall->mode = REMOTE_MODE_ERROR;
} else {
- VIR_DEBUG0("Got a asynchronous error");
+ VIR_DEBUG("Got a asynchronous error");
/* No call, so queue the error against the stream */
if (privst->has_error) {
- VIR_DEBUG0("Got unexpected duplicate stream error");
+ VIR_DEBUG("Got unexpected duplicate stream error");
return -1;
}
privst->has_error = 1;
memset (&privst->err, 0, sizeof privst->err);
if (!xdr_remote_error (xdr, &privst->err)) {
- VIR_DEBUG0("Failed to unmarshall error");
+ VIR_DEBUG("Failed to unmarshall error");
return -1;
}
}
@@ -5813,7 +5813,7 @@ remoteIOEventLoop(virConnectPtr conn,
if (fds[1].revents) {
ssize_t s;
- VIR_DEBUG0("Woken up from poll by other thread");
+ VIR_DEBUG("Woken up from poll by other thread");
s = saferead(priv->wakeupReadFD, &ignore, sizeof(ignore));
if (s < 0) {
virReportSystemError(errno, "%s",
@@ -6199,7 +6199,7 @@ remoteDomainEventFired(int watch,
}
if (remoteIOHandleInput(conn, priv, 0) < 0)
- VIR_DEBUG0("Something went wrong during async message processing");
+ VIR_DEBUG("Something went wrong during async message processing");
done:
remoteDriverUnlock(priv);
diff --git a/src/secret/secret_driver.c b/src/secret/secret_driver.c
index 5ca5006..752da98 100644
--- a/src/secret/secret_driver.c
+++ b/src/secret/secret_driver.c
@@ -1021,7 +1021,7 @@ secretDriverStartup(int privileged)
return 0;
out_of_memory:
- VIR_ERROR0(_("Out of memory initializing secrets"));
+ VIR_ERROR(_("Out of memory initializing secrets"));
error:
VIR_FREE(base);
secretDriverUnlock(driverState);
diff --git a/src/storage/storage_backend_logical.c b/src/storage/storage_backend_logical.c
index 7809324..a1ff35b 100644
--- a/src/storage/storage_backend_logical.c
+++ b/src/storage/storage_backend_logical.c
@@ -332,7 +332,7 @@ virStorageBackendLogicalFindPoolSources(virConnectPtr conn ATTRIBUTE_UNUSED,
* worst that happens is that scanning doesn't pick everything up
*/
if (virRun(scanprog, &exitstatus) < 0) {
- VIR_WARN0("Failure when running vgscan to refresh physical volumes");
+ VIR_WARN("Failure when running vgscan to refresh physical volumes");
}
memset(&sourceList, 0, sizeof(sourceList));
diff --git a/src/test/test_driver.c b/src/test/test_driver.c
index 0978214..525fc9a 100644
--- a/src/test/test_driver.c
+++ b/src/test/test_driver.c
@@ -1164,7 +1164,7 @@ static virDrvOpenStatus testOpen(virConnectPtr conn,
if ((privconn->domainEventTimer =
virEventAddTimeout(-1, testDomainEventFlush, privconn, NULL)) < 0)
- VIR_DEBUG0("virEventAddTimeout failed: No addTimeoutImpl defined. "
+ VIR_DEBUG("virEventAddTimeout failed: No addTimeoutImpl defined. "
"continuing without events.");
testDriverUnlock(privconn);
}
diff --git a/src/uml/uml_conf.c b/src/uml/uml_conf.c
index 84b74f3..1673a20 100644
--- a/src/uml/uml_conf.c
+++ b/src/uml/uml_conf.c
@@ -73,7 +73,7 @@ virCapsPtr umlCapsInit(void) {
*/
if (nodeCapsInitNUMA(caps) < 0) {
virCapabilitiesFreeNUMAInfo(caps);
- VIR_WARN0("Failed to query host NUMA topology, disabling NUMA capabilities");
+ VIR_WARN("Failed to query host NUMA topology, disabling NUMA capabilities");
}
if (virGetHostUUID(caps->host.host_uuid)) {
diff --git a/src/uml/uml_driver.c b/src/uml/uml_driver.c
index 33849a0..3a725aa 100644
--- a/src/uml/uml_driver.c
+++ b/src/uml/uml_driver.c
@@ -123,7 +123,7 @@ static int umlSetCloseExec(int fd) {
goto error;
return 0;
error:
- VIR_ERROR0(_("Failed to set close-on-exec file descriptor flag"));
+ VIR_ERROR(_("Failed to set close-on-exec file descriptor flag"));
return -1;
}
@@ -322,10 +322,10 @@ reread:
dom->state = VIR_DOMAIN_RUNNING;
if (umlOpenMonitor(driver, dom) < 0) {
- VIR_WARN0("Could not open monitor for new domain");
+ VIR_WARN("Could not open monitor for new domain");
umlShutdownVMDaemon(NULL, driver, dom);
} else if (umlIdentifyChrPTY(driver, dom) < 0) {
- VIR_WARN0("Could not identify charater devices for new domain");
+ VIR_WARN("Could not identify charater devices for new domain");
umlShutdownVMDaemon(NULL, driver, dom);
}
}
@@ -413,7 +413,7 @@ umlStartup(int privileged)
uml_driver->caps->privateDataFreeFunc = umlDomainObjPrivateFree;
if ((uml_driver->inotifyFD = inotify_init()) < 0) {
- VIR_ERROR0(_("cannot initialize inotify"));
+ VIR_ERROR(_("cannot initialize inotify"));
goto error;
}
@@ -451,7 +451,7 @@ umlStartup(int privileged)
return 0;
out_of_memory:
- VIR_ERROR0(_("umlStartup: out of memory"));
+ VIR_ERROR(_("umlStartup: out of memory"));
error:
VIR_FREE(userdir);
@@ -782,7 +782,7 @@ static int umlCleanupTapDevices(virConnectPtr conn ATTRIBUTE_UNUSED,
int err;
int ret = 0;
brControl *brctl = NULL;
- VIR_ERROR0(_("Cleanup tap"));
+ VIR_ERROR(_("Cleanup tap"));
if (brInit(&brctl) < 0)
return -1;
@@ -800,7 +800,7 @@ static int umlCleanupTapDevices(virConnectPtr conn ATTRIBUTE_UNUSED,
ret = -1;
}
}
- VIR_ERROR0(_("Cleanup tap done"));
+ VIR_ERROR(_("Cleanup tap done"));
brShutdown(brctl);
return ret;
}
diff --git a/src/util/bridge.c b/src/util/bridge.c
index 3ed71be..98169ae 100644
--- a/src/util/bridge.c
+++ b/src/util/bridge.c
@@ -428,13 +428,13 @@ brProbeVnetHdr(int tapfd)
struct ifreq dummy;
if (ioctl(tapfd, TUNGETFEATURES, &features) != 0) {
- VIR_INFO0(_("Not enabling IFF_VNET_HDR; "
+ VIR_INFO(_("Not enabling IFF_VNET_HDR; "
"TUNGETFEATURES ioctl() not implemented"));
return 0;
}
if (!(features & IFF_VNET_HDR)) {
- VIR_INFO0(_("Not enabling IFF_VNET_HDR; "
+ VIR_INFO(_("Not enabling IFF_VNET_HDR; "
"TUNGETFEATURES ioctl() reports no IFF_VNET_HDR"));
return 0;
}
@@ -443,17 +443,17 @@ brProbeVnetHdr(int tapfd)
* If TUNGETIFF is not implemented then errno == EBADFD.
*/
if (ioctl(tapfd, TUNGETIFF, &dummy) != -1 || errno != EBADFD) {
- VIR_INFO0(_("Not enabling IFF_VNET_HDR; "
+ VIR_INFO(_("Not enabling IFF_VNET_HDR; "
"TUNGETIFF ioctl() not implemented"));
return 0;
}
- VIR_INFO0(_("Enabling IFF_VNET_HDR"));
+ VIR_INFO(_("Enabling IFF_VNET_HDR"));
return 1;
# else
(void) tapfd;
- VIR_INFO0(_("Not enabling IFF_VNET_HDR; disabled at build time"));
+ VIR_INFO(_("Not enabling IFF_VNET_HDR; disabled at build time"));
return 0;
# endif
}
diff --git a/src/util/cgroup.c b/src/util/cgroup.c
index 62b371d..2e5ef46 100644
--- a/src/util/cgroup.c
+++ b/src/util/cgroup.c
@@ -100,7 +100,7 @@ static int virCgroupDetectMounts(virCgroupPtr group)
mounts = fopen("/proc/mounts", "r");
if (mounts == NULL) {
- VIR_ERROR0(_("Unable to open /proc/mounts"));
+ VIR_ERROR(_("Unable to open /proc/mounts"));
return -ENOENT;
}
@@ -152,7 +152,7 @@ static int virCgroupDetectPlacement(virCgroupPtr group)
mapping = fopen("/proc/self/cgroup", "r");
if (mapping == NULL) {
- VIR_ERROR0(_("Unable to open /proc/self/cgroup"));
+ VIR_ERROR(_("Unable to open /proc/self/cgroup"));
return -ENOENT;
}
diff --git a/src/util/command.c b/src/util/command.c
index 862a913..bf47263 100644
--- a/src/util/command.c
+++ b/src/util/command.c
@@ -559,7 +559,7 @@ virCommandSetWorkingDirectory(virCommandPtr cmd, const char *pwd)
if (cmd->pwd) {
cmd->has_error = -1;
- VIR_DEBUG0("cannot set directory twice");
+ VIR_DEBUG("cannot set directory twice");
} else {
cmd->pwd = strdup(pwd);
if (!cmd->pwd)
@@ -579,7 +579,7 @@ virCommandSetInputBuffer(virCommandPtr cmd, const char *inbuf)
if (cmd->infd != -1 || cmd->inbuf) {
cmd->has_error = -1;
- VIR_DEBUG0("cannot specify input twice");
+ VIR_DEBUG("cannot specify input twice");
return;
}
@@ -604,7 +604,7 @@ virCommandSetOutputBuffer(virCommandPtr cmd, char **outbuf)
if (cmd->outfdptr) {
cmd->has_error = -1;
- VIR_DEBUG0("cannot specify output twice");
+ VIR_DEBUG("cannot specify output twice");
return;
}
@@ -628,7 +628,7 @@ virCommandSetErrorBuffer(virCommandPtr cmd, char **errbuf)
if (cmd->errfdptr) {
cmd->has_error = -1;
- VIR_DEBUG0("cannot specify stderr twice");
+ VIR_DEBUG("cannot specify stderr twice");
return;
}
@@ -648,12 +648,12 @@ virCommandSetInputFD(virCommandPtr cmd, int infd)
if (cmd->infd != -1 || cmd->inbuf) {
cmd->has_error = -1;
- VIR_DEBUG0("cannot specify input twice");
+ VIR_DEBUG("cannot specify input twice");
return;
}
if (infd < 0) {
cmd->has_error = -1;
- VIR_DEBUG0("cannot specify invalid input fd");
+ VIR_DEBUG("cannot specify invalid input fd");
return;
}
@@ -672,7 +672,7 @@ virCommandSetOutputFD(virCommandPtr cmd, int *outfd)
if (cmd->outfdptr) {
cmd->has_error = -1;
- VIR_DEBUG0("cannot specify output twice");
+ VIR_DEBUG("cannot specify output twice");
return;
}
@@ -691,7 +691,7 @@ virCommandSetErrorFD(virCommandPtr cmd, int *errfd)
if (cmd->errfdptr) {
cmd->has_error = -1;
- VIR_DEBUG0("cannot specify stderr twice");
+ VIR_DEBUG("cannot specify stderr twice");
return;
}
@@ -712,7 +712,7 @@ virCommandSetPreExecHook(virCommandPtr cmd, virExecHook hook, void *opaque)
if (cmd->hook) {
cmd->has_error = -1;
- VIR_DEBUG0("cannot specify hook twice");
+ VIR_DEBUG("cannot specify hook twice");
return;
}
cmd->hook = hook;
diff --git a/src/util/event.c b/src/util/event.c
index bc0129c..cfaffc8 100644
--- a/src/util/event.c
+++ b/src/util/event.c
@@ -145,7 +145,7 @@ void virEventRegisterImpl(virEventAddHandleFunc addHandle,
*/
int virEventRegisterDefaultImpl(void)
{
- VIR_DEBUG0("");
+ VIR_DEBUG(" ");
virResetLastError();
@@ -185,7 +185,7 @@ int virEventRegisterDefaultImpl(void)
*/
int virEventRunDefaultImpl(void)
{
- VIR_DEBUG0("");
+ VIR_DEBUG(" ");
virResetLastError();
if (virEventPollRunOnce() < 0) {
diff --git a/src/util/event_poll.c b/src/util/event_poll.c
index c5eedd3..df2b28c 100644
--- a/src/util/event_poll.c
+++ b/src/util/event_poll.c
@@ -687,7 +687,7 @@ static int virEventPollInterruptLocked(void)
return 0;
}
- VIR_DEBUG0("Interrupting");
+ VIR_DEBUG("Interrupting");
if (safewrite(eventLoop.wakeupfd[1], &c, sizeof(c)) != sizeof(c))
return -1;
return 0;
diff --git a/src/util/hash.c b/src/util/hash.c
index 5366dd6..b5ec6af 100644
--- a/src/util/hash.c
+++ b/src/util/hash.c
@@ -37,7 +37,7 @@
#define virHashIterationError(ret) \
do { \
- VIR_ERROR0(_("Hash operation not allowed during iteration")); \
+ VIR_ERROR(_("Hash operation not allowed during iteration")); \
return ret; \
} while (0)
diff --git a/src/util/json.c b/src/util/json.c
index 0daeae9..850c859 100644
--- a/src/util/json.c
+++ b/src/util/json.c
@@ -630,7 +630,7 @@ static int virJSONParserInsertValue(virJSONParserPtr parser,
} else {
virJSONParserStatePtr state;
if (!parser->nstate) {
- VIR_DEBUG0("got a value to insert without a container");
+ VIR_DEBUG("got a value to insert without a container");
return -1;
}
@@ -639,7 +639,7 @@ static int virJSONParserInsertValue(virJSONParserPtr parser,
switch (state->value->type) {
case VIR_JSON_TYPE_OBJECT: {
if (!state->key) {
- VIR_DEBUG0("missing key when inserting object value");
+ VIR_DEBUG("missing key when inserting object value");
return -1;
}
@@ -653,7 +653,7 @@ static int virJSONParserInsertValue(virJSONParserPtr parser,
case VIR_JSON_TYPE_ARRAY: {
if (state->key) {
- VIR_DEBUG0("unexpected key when inserting array value");
+ VIR_DEBUG("unexpected key when inserting array value");
return -1;
}
@@ -663,7 +663,7 @@ static int virJSONParserInsertValue(virJSONParserPtr parser,
} break;
default:
- VIR_DEBUG0("unexpected value type, not a container");
+ VIR_DEBUG("unexpected value type, not a container");
return -1;
}
}
diff --git a/src/util/logging.c b/src/util/logging.c
index 90d5a99..823e506 100644
--- a/src/util/logging.c
+++ b/src/util/logging.c
@@ -217,7 +217,7 @@ int virLogStartup(void) {
virLogDefaultPriority = VIR_LOG_DEFAULT;
virLogUnlock();
if (pbm)
- VIR_WARN0(pbm);
+ VIR_WARN("%s", pbm);
return 0;
}
@@ -478,7 +478,7 @@ virLogEmergencyDumpAll(int signum) {
*/
int virLogSetDefaultPriority(int priority) {
if ((priority < VIR_LOG_DEBUG) || (priority > VIR_LOG_ERROR)) {
- VIR_WARN0("Ignoring invalid log level setting.");
+ VIR_WARN("Ignoring invalid log level setting.");
return -1;
}
if (!virLogInitialized)
@@ -1007,7 +1007,7 @@ int virLogParseOutputs(const char *outputs) {
ret = count;
cleanup:
if (ret == -1)
- VIR_WARN0("Ignoring invalid log output setting.");
+ VIR_WARN("Ignoring invalid log output setting.");
return ret;
}
@@ -1063,7 +1063,7 @@ int virLogParseFilters(const char *filters) {
ret = count;
cleanup:
if (ret == -1)
- VIR_WARN0("Ignoring invalid log filter setting.");
+ VIR_WARN("Ignoring invalid log filter setting.");
return ret;
}
@@ -1185,7 +1185,7 @@ int virLogParseDefaultPriority(const char *priority) {
else if (STREQ(priority, "4") || STREQ(priority, "error"))
ret = virLogSetDefaultPriority(VIR_LOG_ERROR);
else
- VIR_WARN0("Ignoring invalid log level setting");
+ VIR_WARN("Ignoring invalid log level setting");
return ret;
}
diff --git a/src/util/logging.h b/src/util/logging.h
index 0dba78c..e948077 100644
--- a/src/util/logging.h
+++ b/src/util/logging.h
@@ -32,35 +32,27 @@
*/
# ifdef ENABLE_DEBUG
# define VIR_DEBUG_INT(category, f, l, fmt,...) \
- virLogMessage(category, VIR_LOG_DEBUG, f, l, 0, fmt, __VA_ARGS__)
+ virLogMessage(category, VIR_LOG_DEBUG, f, l, 0, fmt, ##__VA_ARGS__)
# else
# define VIR_DEBUG_INT(category, f, l, fmt,...) \
do { } while (0)
# endif /* !ENABLE_DEBUG */
# define VIR_INFO_INT(category, f, l, fmt,...) \
- virLogMessage(category, VIR_LOG_INFO, f, l, 0, fmt, __VA_ARGS__)
+ virLogMessage(category, VIR_LOG_INFO, f, l, 0, fmt, ##__VA_ARGS__)
# define VIR_WARN_INT(category, f, l, fmt,...) \
- virLogMessage(category, VIR_LOG_WARN, f, l, 0, fmt, __VA_ARGS__)
+ virLogMessage(category, VIR_LOG_WARN, f, l, 0, fmt, ##__VA_ARGS__)
# define VIR_ERROR_INT(category, f, l, fmt,...) \
- virLogMessage(category, VIR_LOG_ERROR, f, l, 0, fmt, __VA_ARGS__)
+ virLogMessage(category, VIR_LOG_ERROR, f, l, 0, fmt, ##__VA_ARGS__)
# define VIR_DEBUG(fmt,...) \
- VIR_DEBUG_INT("file." __FILE__, __func__, __LINE__, fmt, __VA_ARGS__)
-# define VIR_DEBUG0(msg) \
- VIR_DEBUG_INT("file." __FILE__, __func__, __LINE__, "%s", msg)
+ VIR_DEBUG_INT("file." __FILE__, __func__, __LINE__, fmt, ##__VA_ARGS__)
# define VIR_INFO(fmt,...) \
- VIR_INFO_INT("file." __FILE__, __func__, __LINE__, fmt, __VA_ARGS__)
-# define VIR_INFO0(msg) \
- VIR_INFO_INT("file." __FILE__, __func__, __LINE__, "%s", msg)
+ VIR_INFO_INT("file." __FILE__, __func__, __LINE__, fmt, ##__VA_ARGS__)
# define VIR_WARN(fmt,...) \
- VIR_WARN_INT("file." __FILE__, __func__, __LINE__, fmt, __VA_ARGS__)
-# define VIR_WARN0(msg) \
- VIR_WARN_INT("file." __FILE__, __func__, __LINE__, "%s", msg)
+ VIR_WARN_INT("file." __FILE__, __func__, __LINE__, fmt, ##__VA_ARGS__)
# define VIR_ERROR(fmt,...) \
- VIR_ERROR_INT("file." __FILE__, __func__, __LINE__, fmt, __VA_ARGS__)
-# define VIR_ERROR0(msg) \
- VIR_ERROR_INT("file." __FILE__, __func__, __LINE__, "%s", msg)
+ VIR_ERROR_INT("file." __FILE__, __func__, __LINE__, fmt, ##__VA_ARGS__)
/*
* To be made public
diff --git a/src/util/pci.c b/src/util/pci.c
index d7f74f9..9cc7b20 100644
--- a/src/util/pci.c
+++ b/src/util/pci.c
@@ -293,7 +293,7 @@ pciIterDevices(pciIterPredicate predicate,
dir = opendir(PCI_SYSFS "devices");
if (!dir) {
- VIR_WARN0("Failed to open " PCI_SYSFS "devices");
+ VIR_WARN("Failed to open " PCI_SYSFS "devices");
return -1;
}
@@ -1195,7 +1195,7 @@ pciWaitForDeviceCleanup(pciDevice *dev, const char *matcher)
* unbind might succeed anyway, and besides, it's very likely we have
* no way to report the error
*/
- VIR_DEBUG0("Failed to open /proc/iomem, trying to continue anyway");
+ VIR_DEBUG("Failed to open /proc/iomem, trying to continue anyway");
return 0;
}
diff --git a/src/util/util.c b/src/util/util.c
index 4c50fcb..01ba771 100644
--- a/src/util/util.c
+++ b/src/util/util.c
@@ -295,7 +295,7 @@ static int virClearCapabilities(void)
# else
static int virClearCapabilities(void)
{
-// VIR_WARN0("libcap-ng support not compiled in, unable to clear capabilities");
+// VIR_WARN("libcap-ng support not compiled in, unable to clear capabilities");
return 0;
}
# endif
@@ -682,7 +682,7 @@ __virExec(const char *const*argv,
}
if ((hook)(data) != 0) {
- VIR_DEBUG0("Hook function failed.");
+ VIR_DEBUG("Hook function failed.");
goto fork_error;
}
@@ -761,7 +761,7 @@ virExecWithHook(const char *const*argv,
VIR_DEBUG("%s %s", envp_str, argv_str);
VIR_FREE(envp_str);
} else {
- VIR_DEBUG0(argv_str);
+ VIR_DEBUG("%s", argv_str);
}
VIR_FREE(argv_str);
@@ -871,7 +871,7 @@ virRunWithHook(const char *const*argv,
virReportOOMError();
goto error;
}
- VIR_DEBUG0(argv_str);
+ VIR_DEBUG("%s", argv_str);
if ((execret = __virExec(argv, NULL, NULL,
&childpid, -1, &outfd, &errfd,
diff --git a/src/util/virtaudit.c b/src/util/virtaudit.c
index de7b357..2f1a529 100644
--- a/src/util/virtaudit.c
+++ b/src/util/virtaudit.c
@@ -96,7 +96,7 @@ void virAuditSend(const char *file ATTRIBUTE_UNUSED, const char *func,
va_start(args, fmt);
if (virVasprintf(&str, fmt, args) < 0) {
- VIR_WARN0("Out of memory while formatting audit message");
+ VIR_WARN("Out of memory while formatting audit message");
str = NULL;
}
va_end(args);
diff --git a/src/vbox/vbox_driver.c b/src/vbox/vbox_driver.c
index fc43b8c..eab4679 100644
--- a/src/vbox/vbox_driver.c
+++ b/src/vbox/vbox_driver.c
@@ -98,36 +98,36 @@ int vboxRegister(void) {
* number 51, thus the version ranges in the if statements below.
*/
if (uVersion >= 2001052 && uVersion < 2002051) {
- VIR_DEBUG0("VirtualBox API version: 2.2");
+ VIR_DEBUG("VirtualBox API version: 2.2");
driver = &vbox22Driver;
networkDriver = &vbox22NetworkDriver;
storageDriver = &vbox22StorageDriver;
} else if (uVersion >= 2002051 && uVersion < 3000051) {
- VIR_DEBUG0("VirtualBox API version: 3.0");
+ VIR_DEBUG("VirtualBox API version: 3.0");
driver = &vbox30Driver;
networkDriver = &vbox30NetworkDriver;
storageDriver = &vbox30StorageDriver;
} else if (uVersion >= 3000051 && uVersion < 3001051) {
- VIR_DEBUG0("VirtualBox API version: 3.1");
+ VIR_DEBUG("VirtualBox API version: 3.1");
driver = &vbox31Driver;
networkDriver = &vbox31NetworkDriver;
storageDriver = &vbox31StorageDriver;
} else if (uVersion >= 3001051 && uVersion < 3002051) {
- VIR_DEBUG0("VirtualBox API version: 3.2");
+ VIR_DEBUG("VirtualBox API version: 3.2");
driver = &vbox32Driver;
networkDriver = &vbox32NetworkDriver;
storageDriver = &vbox32StorageDriver;
} else if (uVersion >= 3002051 && uVersion < 4000051) {
- VIR_DEBUG0("VirtualBox API version: 4.0");
+ VIR_DEBUG("VirtualBox API version: 4.0");
driver = &vbox40Driver;
networkDriver = &vbox40NetworkDriver;
storageDriver = &vbox40StorageDriver;
} else {
- VIR_DEBUG0("Unsupport VirtualBox API version");
+ VIR_DEBUG("Unsupport VirtualBox API version");
}
} else {
- VIR_DEBUG0("VBoxCGlueInit failed, using dummy driver");
+ VIR_DEBUG("VBoxCGlueInit failed, using dummy driver");
}
if (virRegisterDriver(driver) < 0)
diff --git a/src/vbox/vbox_tmpl.c b/src/vbox/vbox_tmpl.c
index 8241d34..80e0a46 100644
--- a/src/vbox/vbox_tmpl.c
+++ b/src/vbox/vbox_tmpl.c
@@ -1026,7 +1026,7 @@ static virDrvOpenStatus vboxOpen(virConnectPtr conn,
#endif /* !(VBOX_API_VERSION == 2002) */
conn->privateData = data;
- VIR_DEBUG0("in vboxOpen");
+ VIR_DEBUG("in vboxOpen");
return VIR_DRV_OPEN_SUCCESS;
}
@@ -3733,15 +3733,15 @@ vboxAttachDrives(virDomainDefPtr def, vboxGlobalData *data, IMachine *machine)
if (def->disks[i]->readonly) {
hardDisk->vtbl->SetType(hardDisk,
HardDiskType_Immutable);
- VIR_DEBUG0("setting harddisk to readonly");
+ VIR_DEBUG("setting harddisk to readonly");
} else if (!def->disks[i]->readonly) {
hardDisk->vtbl->SetType(hardDisk,
HardDiskType_Normal);
- VIR_DEBUG0("setting harddisk type to normal");
+ VIR_DEBUG("setting harddisk type to normal");
}
if (def->disks[i]->bus == VIR_DOMAIN_DISK_BUS_IDE) {
if (STREQ(def->disks[i]->dst, "hdc")) {
- VIR_DEBUG0("Not connecting harddisk to hdc as hdc"
+ VIR_DEBUG("Not connecting harddisk to hdc as hdc"
" is taken by CD/DVD Drive");
} else {
PRInt32 channel = 0;
@@ -4021,10 +4021,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);
- VIR_DEBUG0("setting harddisk to immutable");
+ VIR_DEBUG("setting harddisk to immutable");
} else if (!def->disks[i]->readonly) {
medium->vtbl->SetType(medium, MediumType_Normal);
- VIR_DEBUG0("setting harddisk type to normal");
+ VIR_DEBUG("setting harddisk type to normal");
}
}
@@ -4450,7 +4450,7 @@ vboxAttachDisplay(virDomainDefPtr def, vboxGlobalData *data, IMachine *machine)
#endif /* VBOX_API_VERSION >= 4000 */
if (VRDxServer) {
VRDxServer->vtbl->SetEnabled(VRDxServer, PR_TRUE);
- VIR_DEBUG0("VRDP Support turned ON.");
+ VIR_DEBUG("VRDP Support turned ON.");
#if VBOX_API_VERSION < 3001
if (def->graphics[i]->data.rdp.port) {
@@ -4463,7 +4463,7 @@ vboxAttachDisplay(virDomainDefPtr def, vboxGlobalData *data, IMachine *machine)
* the default one which is 3389 currently
*/
VRDxServer->vtbl->SetPort(VRDxServer, 0);
- VIR_DEBUG0("VRDP Port changed to default, which is 3389 currently");
+ VIR_DEBUG("VRDP Port changed to default, which is 3389 currently");
}
#elif VBOX_API_VERSION < 4000 /* 3001 <= VBOX_API_VERSION < 4000 */
PRUnichar *portUtf16 = NULL;
@@ -4484,13 +4484,13 @@ vboxAttachDisplay(virDomainDefPtr def, vboxGlobalData *data, IMachine *machine)
if (def->graphics[i]->data.rdp.replaceUser) {
VRDxServer->vtbl->SetReuseSingleConnection(VRDxServer,
PR_TRUE);
- VIR_DEBUG0("VRDP set to reuse single connection");
+ VIR_DEBUG("VRDP set to reuse single connection");
}
if (def->graphics[i]->data.rdp.multiUser) {
VRDxServer->vtbl->SetAllowMultiConnection(VRDxServer,
PR_TRUE);
- VIR_DEBUG0("VRDP set to allow multiple connection");
+ VIR_DEBUG("VRDP set to allow multiple connection");
}
if (def->graphics[i]->data.rdp.listenAddr) {
@@ -6885,7 +6885,7 @@ static virDrvOpenStatus vboxNetworkOpen(virConnectPtr conn,
(data->vboxSession == NULL))
goto cleanup;
- VIR_DEBUG0("network initialized");
+ VIR_DEBUG("network initialized");
/* conn->networkPrivateData = some network specific data */
return VIR_DRV_OPEN_SUCCESS;
@@ -6894,7 +6894,7 @@ cleanup:
}
static int vboxNetworkClose(virConnectPtr conn) {
- VIR_DEBUG0("network uninitialized");
+ VIR_DEBUG("network uninitialized");
conn->networkPrivateData = NULL;
return 0;
}
@@ -7239,7 +7239,7 @@ static virNetworkPtr vboxNetworkDefineCreateXML(virConnectPtr conn, const char *
data->vboxObj->vtbl->CreateDHCPServer(data->vboxObj,
networkNameUtf16,
&dhcpServer);
- VIR_DEBUG0("couldn't find dhcp server so creating one");
+ VIR_DEBUG("couldn't find dhcp server so creating one");
}
if (dhcpServer) {
PRUnichar *ipAddressUtf16 = NULL;
@@ -7696,7 +7696,7 @@ static virDrvOpenStatus vboxStorageOpen (virConnectPtr conn,
(data->vboxSession == NULL))
goto cleanup;
- VIR_DEBUG0("vbox storage initialized");
+ VIR_DEBUG("vbox storage initialized");
/* conn->storagePrivateData = some storage specific data */
return VIR_DRV_OPEN_SUCCESS;
@@ -7705,7 +7705,7 @@ cleanup:
}
static int vboxStorageClose (virConnectPtr conn) {
- VIR_DEBUG0("vbox storage uninitialized");
+ VIR_DEBUG("vbox storage uninitialized");
conn->storagePrivateData = NULL;
return 0;
}
@@ -8245,7 +8245,7 @@ static int vboxStorageVolDelete(virStorageVolPtr vol,
#endif /* VBOX_API_VERSION >= 3001 */
if (NS_SUCCEEDED(rc)) {
rc = machine->vtbl->SaveSettings(machine);
- VIR_DEBUG0("saving machine settings");
+ VIR_DEBUG("saving machine settings");
}
if (NS_SUCCEEDED(rc)) {
diff --git a/src/vmx/vmx.c b/src/vmx/vmx.c
index 7758314..b37f03b 100644
--- a/src/vmx/vmx.c
+++ b/src/vmx/vmx.c
@@ -1789,7 +1789,7 @@ virVMXParseVNC(virConfPtr conf, virDomainGraphicsDefPtr *def)
}
if (port < 0) {
- VIR_WARN0("VNC is enabled but VMX entry 'RemoteDisplay.vnc.port' "
+ VIR_WARN("VNC is enabled but VMX entry 'RemoteDisplay.vnc.port' "
"is missing, the VNC port is unknown");
(*def)->data.vnc.port = 0;
@@ -3204,7 +3204,7 @@ virVMXFormatVNC(virDomainGraphicsDefPtr def, virBufferPtr buffer)
virBufferAsprintf(buffer, "RemoteDisplay.vnc.enabled = \"true\"\n");
if (def->data.vnc.autoport) {
- VIR_WARN0("VNC autoport is enabled, but the automatically assigned "
+ VIR_WARN("VNC autoport is enabled, but the automatically assigned "
"VNC port cannot be read back");
} else {
if (def->data.vnc.port < 5900 || def->data.vnc.port > 5964) {
diff --git a/src/xen/xen_driver.c b/src/xen/xen_driver.c
index dd94fbc..40130e0 100644
--- a/src/xen/xen_driver.c
+++ b/src/xen/xen_driver.c
@@ -350,35 +350,35 @@ xenUnifiedOpen (virConnectPtr conn, virConnectAuthPtr auth, int flags)
/* Hypervisor is only run with privilege & required to succeed */
if (xenHavePrivilege()) {
- VIR_DEBUG0("Trying hypervisor sub-driver");
+ VIR_DEBUG("Trying hypervisor sub-driver");
if (drivers[XEN_UNIFIED_HYPERVISOR_OFFSET]->open(conn, auth, flags) ==
VIR_DRV_OPEN_SUCCESS) {
- VIR_DEBUG0("Activated hypervisor sub-driver");
+ VIR_DEBUG("Activated hypervisor sub-driver");
priv->opened[XEN_UNIFIED_HYPERVISOR_OFFSET] = 1;
}
}
/* XenD is required to succeed if privileged */
- VIR_DEBUG0("Trying XenD sub-driver");
+ VIR_DEBUG("Trying XenD sub-driver");
if (drivers[XEN_UNIFIED_XEND_OFFSET]->open(conn, auth, flags) ==
VIR_DRV_OPEN_SUCCESS) {
- VIR_DEBUG0("Activated XenD sub-driver");
+ VIR_DEBUG("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) {
- VIR_DEBUG0("Trying XM sub-driver");
+ VIR_DEBUG("Trying XM sub-driver");
if (drivers[XEN_UNIFIED_XM_OFFSET]->open(conn, auth, flags) ==
VIR_DRV_OPEN_SUCCESS) {
- VIR_DEBUG0("Activated XM sub-driver");
+ VIR_DEBUG("Activated XM sub-driver");
priv->opened[XEN_UNIFIED_XM_OFFSET] = 1;
}
}
- VIR_DEBUG0("Trying XS sub-driver");
+ VIR_DEBUG("Trying XS sub-driver");
if (drivers[XEN_UNIFIED_XS_OFFSET]->open(conn, auth, flags) ==
VIR_DRV_OPEN_SUCCESS) {
- VIR_DEBUG0("Activated XS sub-driver");
+ VIR_DEBUG("Activated XS sub-driver");
priv->opened[XEN_UNIFIED_XS_OFFSET] = 1;
} else {
if (xenHavePrivilege())
@@ -388,7 +388,7 @@ xenUnifiedOpen (virConnectPtr conn, virConnectAuthPtr auth, int flags)
if (xenHavePrivilege()) {
goto fail; /* XenD is mandatory when privileged */
} else {
- VIR_DEBUG0("Handing off for remote driver");
+ VIR_DEBUG("Handing off for remote driver");
ret = VIR_DRV_OPEN_DECLINED; /* Let remote_driver try instead */
goto clean;
}
@@ -397,16 +397,16 @@ xenUnifiedOpen (virConnectPtr conn, virConnectAuthPtr auth, int flags)
xenNumaInit(conn);
if (!(priv->caps = xenHypervisorMakeCapabilities(conn))) {
- VIR_DEBUG0("Failed to make capabilities");
+ VIR_DEBUG("Failed to make capabilities");
goto fail;
}
#if WITH_XEN_INOTIFY
if (xenHavePrivilege()) {
- VIR_DEBUG0("Trying Xen inotify sub-driver");
+ VIR_DEBUG("Trying Xen inotify sub-driver");
if (drivers[XEN_UNIFIED_INOTIFY_OFFSET]->open(conn, auth, flags) ==
VIR_DRV_OPEN_SUCCESS) {
- VIR_DEBUG0("Activated Xen inotify sub-driver");
+ VIR_DEBUG("Activated Xen inotify sub-driver");
priv->opened[XEN_UNIFIED_INOTIFY_OFFSET] = 1;
}
}
@@ -417,7 +417,7 @@ xenUnifiedOpen (virConnectPtr conn, virConnectAuthPtr auth, int flags)
fail:
ret = VIR_DRV_OPEN_ERROR;
clean:
- VIR_DEBUG0("Failed to activate a mandatory sub-driver");
+ VIR_DEBUG("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);
@@ -2270,7 +2270,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)) {
- VIR_DEBUG0("WARNING: dom already tracked");
+ VIR_DEBUG("WARNING: dom already tracked");
return -1;
}
}
diff --git a/src/xen/xen_hypervisor.c b/src/xen/xen_hypervisor.c
index 9a5b41d..ac1b685 100644
--- a/src/xen/xen_hypervisor.c
+++ b/src/xen/xen_hypervisor.c
@@ -2092,13 +2092,13 @@ xenHypervisorInit(void)
/* RHEL 5.0 */
dom_interface_version = 3; /* XEN_DOMCTL_INTERFACE_VERSION */
if (virXen_getvcpusinfo(fd, 0, 0, ipt, NULL, 0) == 0){
- VIR_DEBUG0("Using hypervisor call v2, sys ver2 dom ver3");
+ VIR_DEBUG("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){
- VIR_DEBUG0("Using hypervisor call v2, sys ver2 dom ver4");
+ VIR_DEBUG("Using hypervisor call v2, sys ver2 dom ver4");
goto done;
}
}
@@ -2108,7 +2108,7 @@ xenHypervisorInit(void)
/* xen-3.1 */
dom_interface_version = 5; /* XEN_DOMCTL_INTERFACE_VERSION */
if (virXen_getvcpusinfo(fd, 0, 0, ipt, NULL, 0) == 0){
- VIR_DEBUG0("Using hypervisor call v2, sys ver3 dom ver5");
+ VIR_DEBUG("Using hypervisor call v2, sys ver3 dom ver5");
goto done;
}
}
@@ -2118,7 +2118,7 @@ xenHypervisorInit(void)
/* Fedora 8 */
dom_interface_version = 5; /* XEN_DOMCTL_INTERFACE_VERSION */
if (virXen_getvcpusinfo(fd, 0, 0, ipt, NULL, 0) == 0){
- VIR_DEBUG0("Using hypervisor call v2, sys ver4 dom ver5");
+ VIR_DEBUG("Using hypervisor call v2, sys ver4 dom ver5");
goto done;
}
}
@@ -2128,7 +2128,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){
- VIR_DEBUG0("Using hypervisor call v2, sys ver6 dom ver5");
+ VIR_DEBUG("Using hypervisor call v2, sys ver6 dom ver5");
goto done;
}
}
@@ -2137,7 +2137,7 @@ 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 */
- VIR_DEBUG0("Using hypervisor call v2, sys ver7 dom ver6");
+ VIR_DEBUG("Using hypervisor call v2, sys ver7 dom ver6");
goto done;
}
@@ -2148,14 +2148,14 @@ xenHypervisorInit(void)
sys_interface_version = 8; /* XEN_SYSCTL_INTERFACE_VERSION */
if (virXen_getdomaininfo(fd, 0, &info) == 1) {
dom_interface_version = 7; /* XEN_DOMCTL_INTERFACE_VERSION */
- VIR_DEBUG0("Using hypervisor call v2, sys ver8 dom ver7\n");
+ VIR_DEBUG("Using hypervisor call v2, sys ver8 dom ver7\n");
goto done;
}
hypervisor_version = 1;
sys_interface_version = -1;
if (virXen_getdomaininfo(fd, 0, &info) == 1) {
- VIR_DEBUG0("Using hypervisor call v1");
+ VIR_DEBUG("Using hypervisor call v1");
goto done;
}
@@ -2163,7 +2163,7 @@ xenHypervisorInit(void)
* we failed to make the getdomaininfolist hypercall
*/
- VIR_DEBUG0("Failed to find any Xen hypervisor method");
+ VIR_DEBUG("Failed to find any Xen hypervisor method");
hypervisor_version = -1;
virXenError(VIR_ERR_XEN_CALL, " ioctl %lu",
(unsigned long)IOCTL_PRIVCMD_HYPERCALL);
diff --git a/src/xen/xen_inotify.c b/src/xen/xen_inotify.c
index 9dde72c..6ef5359 100644
--- a/src/xen/xen_inotify.c
+++ b/src/xen/xen_inotify.c
@@ -105,7 +105,7 @@ xenInotifyXenCacheLookup(virConnectPtr conn,
memcpy(uuid, entry->def->uuid, VIR_UUID_BUFLEN);
if (!*name) {
- VIR_DEBUG0("Error getting dom from def");
+ VIR_DEBUG("Error getting dom from def");
virReportOOMError();
return -1;
}
@@ -149,7 +149,7 @@ xenInotifyXendDomainsDirLookup(virConnectPtr conn, const char *filename,
return -1;
}
memcpy(uuid, priv->configInfoList->doms[i]->uuid, VIR_UUID_BUFLEN);
- VIR_DEBUG0("Found dom on list");
+ VIR_DEBUG("Found dom on list");
return 0;
}
}
@@ -288,7 +288,7 @@ xenInotifyEvent(int watch ATTRIBUTE_UNUSED,
virConnectPtr conn = data;
xenUnifiedPrivatePtr priv = NULL;
- VIR_DEBUG0("got inotify event");
+ VIR_DEBUG("got inotify event");
if( conn && conn->privateData ) {
priv = conn->privateData;
@@ -450,18 +450,18 @@ xenInotifyOpen(virConnectPtr conn,
return -1;
}
- VIR_DEBUG0("Building initial config cache");
+ VIR_DEBUG("Building initial config cache");
if (priv->useXenConfigCache &&
xenXMConfigCacheRefresh (conn) < 0) {
VIR_DEBUG("Failed to enable XM config cache %s", conn->err.message);
return -1;
}
- VIR_DEBUG0("Registering with event loop");
+ VIR_DEBUG("Registering with event loop");
/* Add the handle for monitoring */
if ((priv->inotifyWatch = virEventAddHandle(priv->inotifyFD, VIR_EVENT_HANDLE_READABLE,
xenInotifyEvent, conn, NULL)) < 0) {
- VIR_DEBUG0("Failed to add inotify handle, disabling events");
+ VIR_DEBUG("Failed to add inotify handle, disabling events");
}
return 0;
diff --git a/src/xen/xend_internal.c b/src/xen/xend_internal.c
index a4420d8..375c8c6 100644
--- a/src/xen/xend_internal.c
+++ b/src/xen/xend_internal.c
@@ -3279,7 +3279,7 @@ xenDaemonDomainMigratePerform (virDomainPtr domain,
if (ret == 0 && undefined_source)
xenDaemonDomainUndefine (domain);
- VIR_DEBUG0("migration done");
+ VIR_DEBUG("migration done");
return ret;
}
diff --git a/src/xen/xs_internal.c b/src/xen/xs_internal.c
index c318f6c..5d8dc3d 100644
--- a/src/xen/xs_internal.c
+++ b/src/xen/xs_internal.c
@@ -327,7 +327,7 @@ xenStoreOpen(virConnectPtr conn,
xenStoreWatchEvent,
conn,
NULL)) < 0)
- VIR_DEBUG0("Failed to add event handle, disabling events");
+ VIR_DEBUG("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) {
- VIR_DEBUG0("Warning, could not remove @introduceDomain watch");
+ VIR_DEBUG("Warning, could not remove @introduceDomain watch");
/* not fatal */
}
if (xenStoreRemoveWatch(conn, "@releaseDomain", "releaseDomain") < 0) {
- VIR_DEBUG0("Warning, could not remove @releaseDomain watch");
+ VIR_DEBUG("Warning, could not remove @releaseDomain watch");
/* not fatal */
}
@@ -1196,7 +1196,7 @@ int xenStoreRemoveWatch(virConnectPtr conn,
list->watches[i]->path,
list->watches[i]->token))
{
- VIR_DEBUG0("WARNING: Could not remove watch");
+ VIR_DEBUG("WARNING: Could not remove watch");
/* Not fatal, continue */
}
@@ -1351,7 +1351,7 @@ retry:
VIR_FREE(new_domids);
if (missing && retries--) {
- VIR_DEBUG0("Some domains were missing, trying again");
+ VIR_DEBUG("Some domains were missing, trying again");
usleep(100 * 1000);
goto retry;
}
@@ -1426,7 +1426,7 @@ retry:
VIR_FREE(new_domids);
if (!removed && retries--) {
- VIR_DEBUG0("No domains removed, retrying");
+ VIR_DEBUG("No domains removed, retrying");
usleep(100 * 1000);
goto retry;
}
diff --git a/src/xenxs/xen_sxpr.c b/src/xenxs/xen_sxpr.c
index 8690286..a517359 100644
--- a/src/xenxs/xen_sxpr.c
+++ b/src/xenxs/xen_sxpr.c
@@ -1979,7 +1979,7 @@ xenFormatSxpr(virConnectPtr conn,
char *bufout;
int hvm = 0, i;
- VIR_DEBUG0("Formatting domain sexpr");
+ VIR_DEBUG("Formatting domain sexpr");
virBufferAddLit(&buf, "(vm ");
virBufferEscapeSexpr(&buf, "(name '%s')", def->name);
13 years, 6 months
Re: [libvirt] [PATCH 0/9] add DHCP snooping support to nwfilter
by David Stevens
Stefan Berger/Watson/IBM wrote on 05/11/2011 11:59:21 AM:
> Looking at patch 8 I would assume you need to store the IP leases
> you track into
> a file so you can handle the cases of libvirt restart while a VM is
> running. How
> does the DHCP snooping currently deal with libvirt restarts or a
> SIGHUP to libvirt.
> Both I believe are currently rebuilding all filters when libvirt
> restarts and on
> those interfaces where it is necessary the learning will again start up.
But the problem with that is a guest can circumvent the whole
point of
the filters by tricking it into allowing an address not officially
assigned
to it. With this patch set, the guest would have to recycle the interface
to trigger another DHCP request/ACK, but saving in a lease file is a
better
idea; I'll look into that.
>
> > With DHCP snooping, only addresses acknowledged by a DHCP server
can
> > be used by the guest, and only for the given lease time if the address
lease
> > is not renewed.
>
> How do you treat VMs with statically configured interfaces? Are they
> permanently blocked
> from sending?
Just as with your learning code, if the IP variable is set, it'll
use that as the static address in the filters (and not require DHCP).
+-DLS
13 years, 6 months
[libvirt] [PATCH] fix xdr detection and use with recent glibc
by Christophe Fergeau
glibc 2.13.90 has obsoleted its rpc implementation in favour of
the one provided by the TI-RPC library:
> * The RPC implementation in libc is obsoleted. Old programs keep working
> but new programs cannot be linked with the routines in libc anymore.
> Programs in need of RPC functionality must be linked against TI-RPC.
> The TI-RPC implemtation is IPv6 enabled and there are other benefits.
>
> Visible changes of this change include (obviously) the inability to
> link
> programs using RPC functions without referencing the TI-RPC library,
> the
> removal of the RPC headers from the glibc headers, and the lack of
> symbols defined in <rpc/netdb.h> when <netdb.h> is installed.
> Implemented by Ulrich Drepper.
(from glibc NEWS)
Thus with recent glibc, we need to try linking with -ltirpc when looking
for the XDR functions. The daemon also needs to use XDR_CFLAGS to be able
to find the XDR headers stored in /usr/include/tirpc.
When using TI-RPC, there are some warnings about redundant declarations, but
the fix probably belongs in other modules:
/usr/include/tirpc/rpc/rpcent.h:68:13: warning: redundant redeclaration of
'setrpcent' [-Wredundant-decls]
/usr/include/rpc/netdb.h:53:13: note: previous declaration of 'setrpcent'
was here
/usr/include/tirpc/rpc/rpcent.h:69:13: warning: redundant redeclaration of
'endrpcent' [-Wredundant-decls]
/usr/include/rpc/netdb.h:54:13: note: previous declaration of 'endrpcent'
was here
/usr/include/tirpc/rpc/rpc.h:84:12: warning: redundant redeclaration of
'bindresvport' [-Wredundant-decls]
/usr/include/netinet/in.h:440:12: note: previous declaration of
'bindresvport' was here
---
configure.ac | 6 +++---
daemon/Makefile.am | 2 +-
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/configure.ac b/configure.ac
index dcec371..db1c0e6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -366,16 +366,16 @@ if test x"$with_remote" = x"yes" || test x"$with_libvirtd" = x"yes"; then
dnl Where are the XDR functions?
dnl If portablexdr is installed, prefer that.
dnl Otherwise try -lrpc (Cygwin) -lxdr (some MinGW), -lnsl (Solaris)
- dnl or none (most Unix)
+ dnl -ltirpc (glibc 2.13.90 or newer) or none (most Unix)
AC_CHECK_LIB([portablexdr],[xdrmem_create],[],[
- AC_SEARCH_LIBS([xdrmem_create],[rpc xdr nsl],[],
+ AC_SEARCH_LIBS([xdrmem_create],[rpc xdr nsl tirpc],[],
[AC_MSG_ERROR([Cannot find a XDR library])])
])
dnl check for cygwin's variation in xdr function names
AC_CHECK_FUNCS([xdr_u_int64_t],[],[],[#include <rpc/xdr.h>])
- dnl Cygwin requires -I/usr/include/tirpc for <rpc/rpc.h>
+ dnl Cygwin/recent glibc requires -I/usr/include/tirpc for <rpc/rpc.h>
old_CFLAGS=$CFLAGS
AC_CACHE_CHECK([where to find <rpc/rpc.h>], [lv_cv_xdr_cflags], [
for add_CFLAGS in '' '-I/usr/include/tirpc' 'missing'; do
diff --git a/daemon/Makefile.am b/daemon/Makefile.am
index af71188..ef1804b 100644
--- a/daemon/Makefile.am
+++ b/daemon/Makefile.am
@@ -80,7 +80,7 @@ libvirtd_CFLAGS = \
-I$(top_srcdir)/src/conf \
-I$(top_srcdir)/src/remote \
$(LIBXML_CFLAGS) $(GNUTLS_CFLAGS) $(SASL_CFLAGS) \
- $(POLKIT_CFLAGS) \
+ $(XDR_CFLAGS) $(POLKIT_CFLAGS) \
$(WARN_CFLAGS) \
$(COVERAGE_CFLAGS) \
-DQEMUD_PID_FILE="\"$(QEMUD_PID_FILE)\"" \
--
1.7.5.1
13 years, 6 months