[libvirt] [PATCH] Spice: support auid, images and stream compression
by Michal Privoznik
This extends the SPICE XML to allow variable compression settings for audio,
images and streaming:
<graphics type='spice' port='5901' tlsPort='-1' autoport='yes'>
<image compression='auto_glz'/>
<jpeg compression='auto'/>
<zlib compression='auto'/>
<playback compression='on'/>
</graphics>
All new element are optional.
---
docs/formatdomain.html.in | 12 ++
docs/schemas/domain.rng | 50 ++++++++
src/conf/domain_conf.c | 130 ++++++++++++++++++++
src/conf/domain_conf.h | 42 +++++++
src/libvirt_private.syms | 8 ++
src/qemu/qemu_command.c | 16 +++
.../qemuxml2argv-graphics-spice.args | 4 +-
.../qemuxml2argv-graphics-spice.xml | 4 +
8 files changed, 265 insertions(+), 1 deletions(-)
diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in
index 3c4c656..c5edf53 100644
--- a/docs/formatdomain.html.in
+++ b/docs/formatdomain.html.in
@@ -1664,6 +1664,18 @@ qemu-kvm -net nic,model=? /dev/null
<channel name='main' mode='secure'/>
<channel name='record' mode='insecure'/>
</graphics></pre>
+ <p>
+Spice supports variable compression settings for audio, images and streaming.
+This setting are accessible via <code>compression</code> attribute in all
+following elements: <code>image</code> to set image compression (accept
+<code>auto_glz</code>, <code>auto_lz</code>, <code>quic</code>,
+<code>glz</code>, <code>lz</code>, <code>off</code>), <code>jpeg</code> for
+JPEG compression for images over wan (accept <code>auto</code>,
+<code>never</code>, <code>always</code>), <code>zlib</code> for configuring
+wan image compression (accept <code>auto</code>, <code>never</code>,
+<code>always</code>) and <code>playback</code> for enabling audio stream
+compression (accept <code>on</code> or <code>off</code>)
+ </p>
</dd>
<dt><code>"rdp"</code></dt>
<dd>
diff --git a/docs/schemas/domain.rng b/docs/schemas/domain.rng
index 0fbf326..f0578f8 100644
--- a/docs/schemas/domain.rng
+++ b/docs/schemas/domain.rng
@@ -1283,6 +1283,56 @@
<empty/>
</element>
</zeroOrMore>
+ <optional>
+ <element name="image">
+ <attribute name="compression">
+ <choice>
+ <value>auto_glz</value>
+ <value>auto_lz</value>
+ <value>quic</value>
+ <value>glz</value>
+ <value>lz</value>
+ <value>off</value>
+ </choice>
+ </attribute>
+ <empty/>
+ </element>
+ </optional>
+ <optional>
+ <element name="jpeg">
+ <attribute name="compression">
+ <choice>
+ <value>auto</value>
+ <value>never</value>
+ <value>always</value>
+ </choice>
+ </attribute>
+ <empty/>
+ </element>
+ </optional>
+ <optional>
+ <element name="zlib">
+ <attribute name="compression">
+ <choice>
+ <value>auto</value>
+ <value>never</value>
+ <value>always</value>
+ </choice>
+ </attribute>
+ <empty/>
+ </element>
+ </optional>
+ <optional>
+ <element name="playback">
+ <attribute name="compression">
+ <choice>
+ <value>on</value>
+ <value>off</value>
+ </choice>
+ </attribute>
+ <empty/>
+ </element>
+ </optional>
</group>
<group>
<attribute name="type">
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 90a1317..f215e7d 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -322,6 +322,32 @@ VIR_ENUM_IMPL(virDomainGraphicsSpiceChannelMode,
"secure",
"insecure");
+VIR_ENUM_IMPL(virDomainGraphicsSpiceImageCompression,
+ VIR_DOMAIN_GRAPHICS_SPICE_IMAGE_COMPRESSION_LAST,
+ "auto_glz",
+ "auto_lz",
+ "quic",
+ "glz",
+ "lz",
+ "off");
+
+VIR_ENUM_IMPL(virDomainGraphicsSpiceJpegCompression,
+ VIR_DOMAIN_GRAPHICS_SPICE_JPEG_COMPRESSION_LAST,
+ "auto",
+ "never",
+ "always");
+
+VIR_ENUM_IMPL(virDomainGraphicsSpiceZlibCompression,
+ VIR_DOMAIN_GRAPHICS_SPICE_ZLIB_COMPRESSION_LAST,
+ "auto",
+ "never",
+ "always");
+
+VIR_ENUM_IMPL(virDomainGraphicsSpicePlaybackCompression,
+ VIR_DOMAIN_GRAPHICS_SPICE_PLAYBACK_COMPRESSION_LAST,
+ "on",
+ "off");
+
VIR_ENUM_IMPL(virDomainHostdevMode, VIR_DOMAIN_HOSTDEV_MODE_LAST,
"subsystem",
"capabilities")
@@ -3917,6 +3943,11 @@ virDomainGraphicsDefParseXML(xmlNodePtr node, int flags) {
if (virDomainGraphicsAuthDefParseXML(node, &def->data.spice.auth) < 0)
goto error;
+ def->data.spice.image = VIR_DOMAIN_GRAPHICS_SPICE_IMAGE_COMPRESSION_LAST;
+ def->data.spice.jpeg = VIR_DOMAIN_GRAPHICS_SPICE_JPEG_COMPRESSION_LAST;
+ def->data.spice.zlib = VIR_DOMAIN_GRAPHICS_SPICE_ZLIB_COMPRESSION_LAST;
+ def->data.spice.playback = VIR_DOMAIN_GRAPHICS_SPICE_PLAYBACK_COMPRESSION_LAST;
+
cur = node->children;
while (cur != NULL) {
if (cur->type == XML_ELEMENT_NODE) {
@@ -3954,6 +3985,89 @@ virDomainGraphicsDefParseXML(xmlNodePtr node, int flags) {
VIR_FREE(mode);
def->data.spice.channels[nameval] = modeval;
+ } else if (xmlStrEqual(cur->name, BAD_CAST "image")) {
+ const char *compression = virXMLPropString(cur, "compression");
+ int compressionVal;
+
+ if (!compression) {
+ virDomainReportError(VIR_ERR_INTERNAL_ERROR, "%s",
+ _("spice image missing compression"));
+ goto error;
+ }
+
+ if ((compressionVal =
+ virDomainGraphicsSpiceImageCompressionTypeFromString(compression)) < 0) {
+ virDomainReportError(VIR_ERR_INTERNAL_ERROR,
+ _("unknown spice image compression %s"),
+ compression);
+ VIR_FREE(compression);
+ goto error;
+ }
+ VIR_FREE(compression);
+
+ def->data.spice.image = compressionVal;
+ } else if (xmlStrEqual(cur->name, BAD_CAST "jpeg")) {
+ const char *compression = virXMLPropString(cur, "compression");
+ int compressionVal;
+
+ if (!compression) {
+ virDomainReportError(VIR_ERR_INTERNAL_ERROR, "%s",
+ _("spice jpeg missing compression"));
+ goto error;
+ }
+
+ if ((compressionVal =
+ virDomainGraphicsSpiceJpegCompressionTypeFromString(compression)) < 0) {
+ virDomainReportError(VIR_ERR_INTERNAL_ERROR,
+ _("unknown spice jpeg compression %s"),
+ compression);
+ VIR_FREE(compression);
+ goto error;
+ }
+ VIR_FREE(compression);
+
+ def->data.spice.jpeg = compressionVal;
+ } else if (xmlStrEqual(cur->name, BAD_CAST "zlib")) {
+ const char *compression = virXMLPropString(cur, "compression");
+ int compressionVal;
+
+ if (!compression) {
+ virDomainReportError(VIR_ERR_INTERNAL_ERROR, "%s",
+ _("spice zlib missing compression"));
+ goto error;
+ }
+
+ if ((compressionVal =
+ virDomainGraphicsSpiceZlibCompressionTypeFromString(compression)) < 0) {
+ virDomainReportError(VIR_ERR_INTERNAL_ERROR,
+ _("unknown spice zlib compression %s"),
+ compression);
+ VIR_FREE(compression);
+ goto error;
+ }
+
+ def->data.spice.zlib = compressionVal;
+ } else if (xmlStrEqual(cur->name, BAD_CAST "playback")) {
+ const char *compression = virXMLPropString(cur, "compression");
+ int compressionVal;
+
+ if (!compression) {
+ virDomainReportError(VIR_ERR_INTERNAL_ERROR, "%s",
+ _("spice playback missing compression"));
+ goto error;
+ }
+
+ if ((compressionVal =
+ virDomainGraphicsSpicePlaybackCompressionTypeFromString(compression)) < 0) {
+ virDomainReportError(VIR_ERR_INTERNAL_ERROR,
+ _("unknown spice playback compression"));
+ VIR_FREE(compression);
+ goto error;
+
+ }
+ VIR_FREE(compression);
+
+ def->data.spice.playback = compressionVal;
}
}
cur = cur->next;
@@ -7817,6 +7931,22 @@ virDomainGraphicsDefFormat(virBufferPtr buf,
virDomainGraphicsSpiceChannelNameTypeToString(i),
virDomainGraphicsSpiceChannelModeTypeToString(mode));
}
+ if (def->data.spice.image !=
+ VIR_DOMAIN_GRAPHICS_SPICE_IMAGE_COMPRESSION_LAST)
+ virBufferVSprintf(buf, " <image compression='%s'/>\n",
+ virDomainGraphicsSpiceImageCompressionTypeToString(def->data.spice.image));
+ if (def->data.spice.jpeg !=
+ VIR_DOMAIN_GRAPHICS_SPICE_JPEG_COMPRESSION_LAST)
+ virBufferVSprintf(buf, " <jpeg compression='%s'/>\n",
+ virDomainGraphicsSpiceJpegCompressionTypeToString(def->data.spice.jpeg));
+ if (def->data.spice.zlib !=
+ VIR_DOMAIN_GRAPHICS_SPICE_ZLIB_COMPRESSION_LAST)
+ virBufferVSprintf(buf, " <zlib compression='%s'/>\n",
+ virDomainGraphicsSpiceZlibCompressionTypeToString(def->data.spice.zlib));
+ if (def->data.spice.playback !=
+ VIR_DOMAIN_GRAPHICS_SPICE_PLAYBACK_COMPRESSION_LAST)
+ virBufferVSprintf(buf, " <playback compression='%s'/>\n",
+ virDomainGraphicsSpicePlaybackCompressionTypeToString(def->data.spice.playback));
}
if (children) {
diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h
index 95bd11e..e36f0ed 100644
--- a/src/conf/domain_conf.h
+++ b/src/conf/domain_conf.h
@@ -658,6 +658,40 @@ enum virDomainGraphicsSpiceChannelMode {
VIR_DOMAIN_GRAPHICS_SPICE_CHANNEL_MODE_LAST
};
+enum virDomainGraphicsSpiceImageCompression {
+ VIR_DOMAIN_GRAPHICS_SPICE_IMAGE_COMPRESSION_AUTO_GLZ,
+ VIR_DOMAIN_GRAPHICS_SPICE_IMAGE_COMPRESSION_AUTO_LZ,
+ VIR_DOMAIN_GRAPHICS_SPICE_IMAGE_COMPRESSION_QUIC,
+ VIR_DOMAIN_GRAPHICS_SPICE_IMAGE_COMPRESSION_GLZ,
+ VIR_DOMAIN_GRAPHICS_SPICE_IMAGE_COMPRESSION_LZ,
+ VIR_DOMAIN_GRAPHICS_SPICE_IMAGE_COMPRESSION_OFF,
+
+ VIR_DOMAIN_GRAPHICS_SPICE_IMAGE_COMPRESSION_LAST
+};
+
+enum virDomainGraphicsSpiceJpegCompression {
+ VIR_DOMAIN_GRAPHICS_SPICE_JPEG_COMPRESSION_AUTO,
+ VIR_DOMAIN_GRAPHICS_SPICE_JPEG_COMPRESSION_NEVER,
+ VIR_DOMAIN_GRAPHICS_SPICE_JPEG_COMPRESSION_ALWAYS,
+
+ VIR_DOMAIN_GRAPHICS_SPICE_JPEG_COMPRESSION_LAST
+};
+
+enum virDomainGraphicsSpiceZlibCompression {
+ VIR_DOMAIN_GRAPHICS_SPICE_ZLIB_COMPRESSION_AUTO,
+ VIR_DOMAIN_GRAPHICS_SPICE_ZLIB_COMPRESSION_NEVER,
+ VIR_DOMAIN_GRAPHICS_SPICE_ZLIB_COMPRESSION_ALWAYS,
+
+ VIR_DOMAIN_GRAPHICS_SPICE_ZLIB_COMPRESSION_LAST
+};
+
+enum virDomainGraphicsSpicePlaybackCompression {
+ VIR_DOMAIN_GRAPHICS_SPICE_PLAYBACK_COMPRESSION_ON,
+ VIR_DOMAIN_GRAPHICS_SPICE_PLAYBACK_COMPRESSION_OFF,
+
+ VIR_DOMAIN_GRAPHICS_SPICE_PLAYBACK_COMPRESSION_LAST
+};
+
typedef struct _virDomainGraphicsDef virDomainGraphicsDef;
typedef virDomainGraphicsDef *virDomainGraphicsDefPtr;
struct _virDomainGraphicsDef {
@@ -695,6 +729,10 @@ struct _virDomainGraphicsDef {
virDomainGraphicsAuthDef auth;
unsigned int autoport :1;
int channels[VIR_DOMAIN_GRAPHICS_SPICE_CHANNEL_LAST];
+ int image;
+ int jpeg;
+ int zlib;
+ int playback;
} spice;
} data;
};
@@ -1423,6 +1461,10 @@ VIR_ENUM_DECL(virDomainInputBus)
VIR_ENUM_DECL(virDomainGraphics)
VIR_ENUM_DECL(virDomainGraphicsSpiceChannelName)
VIR_ENUM_DECL(virDomainGraphicsSpiceChannelMode)
+VIR_ENUM_DECL(virDomainGraphicsSpiceImageCompression)
+VIR_ENUM_DECL(virDomainGraphicsSpiceJpegCompression)
+VIR_ENUM_DECL(virDomainGraphicsSpiceZlibCompression)
+VIR_ENUM_DECL(virDomainGraphicsSpicePlaybackCompression)
/* from libvirt.h */
VIR_ENUM_DECL(virDomainState)
VIR_ENUM_DECL(virDomainSeclabel)
diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms
index 54e4482..d2aa077 100644
--- a/src/libvirt_private.syms
+++ b/src/libvirt_private.syms
@@ -262,6 +262,14 @@ virDomainGraphicsSpiceChannelModeTypeFromString;
virDomainGraphicsSpiceChannelModeTypeToString;
virDomainGraphicsSpiceChannelNameTypeFromString;
virDomainGraphicsSpiceChannelNameTypeToString;
+virDomainGraphicsSpiceImageCompressionTypeToString;
+virDomainGraphicsSpiceImageCompressionTypeFromString;
+virDomainGraphicsSpiceJpegCompressionTypeFromString;
+virDomainGraphicsSpiceJpegCompressionTypeToString;
+virDomainGraphicsSpicePlaybackCompressionTypeFromString;
+virDomainGraphicsSpicePlaybackCompressionTypeToString;
+virDomainGraphicsSpiceZlibCompressionTypeFromString;
+virDomainGraphicsSpiceZlibCompressionTypeToString;
virDomainGraphicsTypeFromString;
virDomainGraphicsTypeToString;
virDomainHostdevDefFree;
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index fea0068..6272910 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -4032,6 +4032,22 @@ qemuBuildCommandLine(virConnectPtr conn,
break;
}
}
+ if (def->graphics[0]->data.spice.image !=
+ VIR_DOMAIN_GRAPHICS_SPICE_IMAGE_COMPRESSION_LAST)
+ virBufferVSprintf(&opt, ",image-compression=%s",
+ virDomainGraphicsSpiceImageCompressionTypeToString(def->graphics[0]->data.spice.image));
+ if (def->graphics[0]->data.spice.jpeg !=
+ VIR_DOMAIN_GRAPHICS_SPICE_JPEG_COMPRESSION_LAST)
+ virBufferVSprintf(&opt, ",jpeg-wan-compression=%s",
+ virDomainGraphicsSpiceJpegCompressionTypeToString(def->graphics[0]->data.spice.jpeg));
+ if (def->graphics[0]->data.spice.zlib !=
+ VIR_DOMAIN_GRAPHICS_SPICE_ZLIB_COMPRESSION_LAST)
+ virBufferVSprintf(&opt, ",zlib-glz-wan-compression=%s",
+ virDomainGraphicsSpiceZlibCompressionTypeToString(def->graphics[0]->data.spice.zlib));
+ if (def->graphics[0]->data.spice.playback !=
+ VIR_DOMAIN_GRAPHICS_SPICE_PLAYBACK_COMPRESSION_LAST)
+ virBufferVSprintf(&opt, ",playback-compression=%s",
+ virDomainGraphicsSpicePlaybackCompressionTypeToString(def->graphics[0]->data.spice.playback));
virCommandAddArg(cmd, "-spice");
virCommandAddArgBuffer(cmd, &opt);
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice.args b/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice.args
index c788bb6..70cd35b 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice.args
+++ b/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice.args
@@ -2,6 +2,8 @@ LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test QEMU_AUDIO_DRV=spice \
/usr/bin/qemu -S -M pc -m 214 -smp 1 -nodefaults -monitor \
unix:/tmp/test-monitor,server,nowait -no-acpi -boot c -hda \
/dev/HostVG/QEMUGuest1 -usb -spice port=5903,tls-port=5904,addr=127.0.0.1,\
-x509-dir=/etc/pki/libvirt-spice,tls-channel=main,plaintext-channel=inputs -vga \
+x509-dir=/etc/pki/libvirt-spice,tls-channel=main,plaintext-channel=inputs,\
+image-compression=auto_glz,jpeg-wan-compression=auto,zlib-glz-wan-compression=auto,\
+playback-compression=on -vga \
qxl -global qxl.vram_size=18874368 -device qxl,id=video1,vram_size=33554432,bus=pci.0,addr=0x4 \
-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice.xml b/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice.xml
index 5d46509..a29f50d 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice.xml
@@ -24,6 +24,10 @@
<graphics type='spice' port='5903' tlsPort='5904' autoport='no' listen='127.0.0.1'>
<channel name='main' mode='secure'/>
<channel name='inputs' mode='insecure'/>
+ <image compression='auto_glz'/>
+ <jpeg compression='auto'/>
+ <zlib compression='auto'/>
+ <playback compression='on'/>
</graphics>
<video>
<model type='qxl' vram='18432' heads='1'/>
--
1.7.4.2
13 years, 8 months
[libvirt] [PATCH 0/3] PHYP: Adding network management support
by Eduardo Otubo
This is a series of 3 patches to add network management support for
pHyp driver.
Eduardo Otubo (3):
PHYP: Separating UUID functions in another file
PHYP: Adding basic network functions
PHYP: create, destroy and other network functions
po/POTFILES.in | 1 +
src/Makefile.am | 3 +-
src/phyp/phyp_driver.c | 1066 +++++++++++++++++++++++++++---------------------
src/phyp/phyp_driver.h | 43 ++-
src/phyp/phyp_uuid.c | 834 +++++++++++++++++++++++++++++++++++++
src/phyp/phyp_uuid.h | 44 ++
6 files changed, 1520 insertions(+), 471 deletions(-)
create mode 100644 src/phyp/phyp_uuid.c
create mode 100644 src/phyp/phyp_uuid.h
13 years, 8 months
[libvirt] [PATCH] - added mapping to Network object - added implementation of select networking functions - virsh net-list and net-info commands now work for esx
by jbarkley
From: jbarkely <jbarkley(a)willo.(none)>
---
src/esx/esx_network_driver.c | 181 +++++++++++++++++++++++++++++++++++++++-
src/esx/esx_vi.c | 104 ++++++++++++++++++++++-
src/esx/esx_vi.h | 9 ++
src/esx/esx_vi_generator.input | 78 +++++++++++++++++
4 files changed, 366 insertions(+), 6 deletions(-)
diff --git a/src/esx/esx_network_driver.c b/src/esx/esx_network_driver.c
index a64bb8e..c4cc7b4 100644
--- a/src/esx/esx_network_driver.c
+++ b/src/esx/esx_network_driver.c
@@ -34,6 +34,7 @@
#include "esx_vi.h"
#include "esx_vi_methods.h"
#include "esx_util.h"
+#include "md5.h"
#define VIR_FROM_THIS VIR_FROM_ESX
@@ -63,18 +64,190 @@ esxNetworkClose(virConnectPtr conn)
return 0;
}
+static virNetworkPtr
+esxNetworkLookupByName(virConnectPtr conn, const char *name) {
+ //esxPrivate *priv = conn->networkPrivateData;
+ esxPrivate *priv = conn->networkPrivateData;
+ esxVI_String *propertyNameList = NULL;
+ esxVI_ObjectContent *network = NULL;
+ virNetworkPtr virNetwork = NULL;
+ unsigned char uuid[VIR_UUID_BUFLEN];
+ unsigned char md5[MD5_DIGEST_SIZE]; /* MD5_DIGEST_SIZE = VIR_UUID_BUFLEN = 16 */
+
+ if (esxVI_EnsureSession(priv->primary) < 0) {
+ return NULL;
+ }
+
+ if (esxVI_LookupNetworkByName(priv->primary, name, propertyNameList,
+ &network,
+ esxVI_Occurrence_OptionalItem) < 0) {
+ goto cleanup;
+ }
+
+ if (NULL==network) {
+ // raise error
+ ESX_ERROR(VIR_ERR_NO_NETWORK, _("No network with name '%s'"), name);
+ goto cleanup;
+
+ }
+
+ char *name_candidate = NULL;
+ esxVI_GetStringValue(network, "name", &name_candidate, esxVI_Occurrence_OptionalItem);
+
+ md5_buffer(name, strlen(name), md5);
+ virNetwork = virGetNetwork(conn, name, md5);
+
+ cleanup:
+ esxVI_String_Free(&propertyNameList);
+ //esxVI_ObjectContent_Free(&network);
+// printf("virNetwork=%s\n", virNetwork->name);
+ return virNetwork;
+}
+
+static int
+esxListNetworks(virConnectPtr conn, char **const names, int nnames)
+{
+ //setup
+ bool success = false;
+ esxPrivate *priv = conn->networkPrivateData;
+ esxVI_String *propertyNameList = NULL;
+ esxVI_DynamicProperty *dynamicProperty = NULL;
+ esxVI_ObjectContent *networkList = NULL;
+ esxVI_ObjectContent *network = NULL;
+ int count = 0;
+ int i;
+
+ //check args
+ if (names == NULL || nnames < 0) {
+ ESX_ERROR(VIR_ERR_INVALID_ARG, "%s", _("Invalid argument"));
+ return -1;
+ }
+
+ if (nnames == 0) {
+ return 0;
+ }
+
+ //check connection
+ if (esxVI_EnsureSession(priv->primary) < 0) {
+ return -1;
+ }
+
+ //get network(s)
+ if (esxVI_String_AppendValueToList(&propertyNameList,
+ "summary.name") < 0 ||
+ esxVI_LookupNetworkList(priv->primary, propertyNameList,
+ &networkList) < 0) {
+ goto cleanup;
+ }
+
+ for (network = networkList; network != NULL;
+ network = network->_next) {
+ for (dynamicProperty = network->propSet; dynamicProperty != NULL;
+ dynamicProperty = dynamicProperty->_next) {
+ if (STREQ(dynamicProperty->name, "summary.name")) {
+ if (esxVI_AnyType_ExpectType(dynamicProperty->val,
+ esxVI_Type_String) < 0) {
+ goto cleanup;
+ }
+
+ names[count] = strdup(dynamicProperty->val->string);
+
+ if (names[count] == NULL) {
+ virReportOOMError();
+ goto cleanup;
+ }
+
+ ++count;
+ break;
+ } else {
+ VIR_WARN("Unexpected '%s' property", dynamicProperty->name);
+ }
+ }
+ }
+
+ success = true;
+
+ //cleanup
+ cleanup:
+ if (! success) {
+ for (i = 0; i < count; ++i) {
+ VIR_FREE(names[i]);
+ }
+
+ count = -1;
+ }
+
+ esxVI_String_Free(&propertyNameList);
+ esxVI_ObjectContent_Free(&networkList);
+
+ return count;
+}
+
+static int
+esxNumOfNetworks(virConnectPtr conn)
+{
+ //setup
+ esxPrivate *priv = conn->networkPrivateData;
+ esxVI_String *propertyNameList = NULL;
+ esxVI_DynamicProperty *dynamicProperty = NULL;
+ esxVI_ObjectContent *networkList = NULL;
+ esxVI_ObjectContent *network = NULL;
+ int count = 0;
+ int i;
+
+ //check connection
+ if (esxVI_EnsureSession(priv->primary) < 0) {
+ return -1;
+ }
+
+ //get network(s)
+ if (esxVI_String_AppendValueToList(&propertyNameList,
+ "summary.name") < 0 ||
+ esxVI_LookupNetworkList(priv->primary, propertyNameList,
+ &networkList) < 0) {
+ esxVI_String_Free(&propertyNameList);
+ esxVI_ObjectContent_Free(&networkList);
+
+ return -1;
+ }
+
+ for (network = networkList; network != NULL;
+ network = network->_next) {
+ for (dynamicProperty = network->propSet; dynamicProperty != NULL;
+ dynamicProperty = dynamicProperty->_next) {
+ if (STREQ(dynamicProperty->name, "summary.name")) {
+ ++count;
+ break;
+ } else {
+ VIR_WARN("Unexpected '%s' property", dynamicProperty->name);
+ }
+ }
+ }
+
+
+ esxVI_String_Free(&propertyNameList);
+ esxVI_ObjectContent_Free(&networkList);
+
+ return count;
+}
+
+static int esxNumOfDefinedNetworks(virConnectPtr conn)
+{
+ printf("JB-BUG C\n");
+ return 8;
+}
static virNetworkDriver esxNetworkDriver = {
"ESX", /* name */
esxNetworkOpen, /* open */
esxNetworkClose, /* close */
- NULL, /* numOfNetworks */
- NULL, /* listNetworks */
- NULL, /* numOfDefinedNetworks */
+ esxNumOfNetworks, /* numOfNetworks */
+ esxListNetworks, /* listNetworks */
+ esxNumOfDefinedNetworks, /* numOfDefinedNetworks */
NULL, /* listDefinedNetworks */
NULL, /* networkLookupByUUID */
- NULL, /* networkLookupByName */
+ esxNetworkLookupByName, /* networkLookupByName */
NULL, /* networkCreateXML */
NULL, /* networkDefineXML */
NULL, /* networkUndefine */
diff --git a/src/esx/esx_vi.c b/src/esx/esx_vi.c
index 7446ec5..509cf07 100644
--- a/src/esx/esx_vi.c
+++ b/src/esx/esx_vi.c
@@ -109,6 +109,7 @@ ESX_VI__TEMPLATE__FREE(Context,
esxVI_SelectionSpec_Free(&item->selectSet_hostSystemToParent);
esxVI_SelectionSpec_Free(&item->selectSet_hostSystemToVm);
esxVI_SelectionSpec_Free(&item->selectSet_hostSystemToDatastore);
+ esxVI_SelectionSpec_Free(&item->selectSet_hostSystemToNetwork);
esxVI_SelectionSpec_Free(&item->selectSet_computeResourceToHost);
esxVI_SelectionSpec_Free(&item->selectSet_computeResourceToParentToParent);
});
@@ -1483,6 +1484,13 @@ esxVI_BuildSelectSetCollection(esxVI_Context *ctx)
return -1;
}
+ /* HostSystem -> network (Network) */
+ if (esxVI_BuildSelectSet(&ctx->selectSet_hostSystemToNetwork,
+ "hostSystemToNetwork",
+ "HostSystem", "network", NULL) < 0) {
+ return -1;
+ }
+
/* Folder -> parent (Folder, Datacenter) */
if (esxVI_BuildSelectSet(&ctx->selectSet_computeResourceToParentToParent,
"managedEntityToParent",
@@ -1543,9 +1551,13 @@ esxVI_EnsureSession(esxVI_Context *ctx)
* Query the session manager for the current session of this connection
* and re-login if there is no current session for this connection.
*/
+
if (esxVI_String_AppendValueToList(&propertyNameList,
- "currentSession") < 0 ||
- esxVI_LookupObjectContentByType(ctx, ctx->service->sessionManager,
+ "currentSession") < 0) {
+ goto cleanup;
+ }
+
+ if (esxVI_LookupObjectContentByType(ctx, ctx->service->sessionManager,
"SessionManager", propertyNameList,
&sessionManager,
esxVI_Occurrence_RequiredItem) < 0) {
@@ -1649,6 +1661,8 @@ esxVI_LookupObjectContentByType(esxVI_Context *ctx,
objectSpec->selectSet = ctx->selectSet_hostSystemToVm;
} else if (STREQ(type, "Datastore")) {
objectSpec->selectSet = ctx->selectSet_hostSystemToDatastore;
+ } else if (STREQ(type, "Network")) {
+ objectSpec->selectSet = ctx->selectSet_hostSystemToNetwork;
} else {
ESX_VI_ERROR(VIR_ERR_INTERNAL_ERROR,
_("Invalid lookup of '%s' from '%s'"),
@@ -2474,6 +2488,92 @@ esxVI_LookupDatastoreList(esxVI_Context *ctx, esxVI_String *propertyNameList,
esxVI_Occurrence_OptionalList);
}
+int
+esxVI_LookupNetworkList(esxVI_Context *ctx,
+ esxVI_String *propertyNameList,
+ esxVI_ObjectContent **networkList)
+{
+ return esxVI_LookupObjectContentByType(ctx, ctx->hostSystem->_reference,
+ "Network", propertyNameList,
+ networkList,
+ esxVI_Occurrence_OptionalList);
+}
+
+int
+esxVI_LookupNetworkByName(esxVI_Context *ctx, const char *name,
+ esxVI_String *propertyNameList,
+ esxVI_ObjectContent **network,
+ esxVI_Occurrence occurrence)
+{
+ int result = -1;
+ esxVI_String *completePropertyNameList = NULL;
+ esxVI_ObjectContent *networkList = NULL;
+ esxVI_ObjectContent *candidate = NULL;
+ char *name_candidate = NULL;
+
+ if (network == NULL || *network != NULL) {
+ ESX_VI_ERROR(VIR_ERR_INTERNAL_ERROR, "%s", _("Invalid argument"));
+ return -1;
+ }
+
+
+ if (esxVI_String_DeepCopyList(&completePropertyNameList,
+ propertyNameList) < 0 ||
+ esxVI_String_AppendValueToList(&completePropertyNameList, "name") < 0 ||
+ esxVI_LookupNetworkList(ctx, completePropertyNameList,
+ &networkList) < 0) {
+ goto cleanup;
+ }
+
+ for (candidate = networkList; candidate != NULL;
+ candidate = candidate->_next) {
+ VIR_FREE(name_candidate);
+
+ /*
+ if (esxVI_GetVirtualMachineIdentity(candidate, NULL, &name_candidate,
+ NULL) < 0) {
+ goto cleanup;
+ }
+ */
+ if (esxVI_GetStringValue(candidate, "name", &name_candidate,
+ esxVI_Occurrence_OptionalItem) < 0) {
+ goto cleanup;
+ }
+
+ if (STRNEQ(name, name_candidate)) {
+ continue;
+ }
+
+ if (esxVI_ObjectContent_DeepCopy(network, candidate) < 0) {
+ goto cleanup;
+ }
+
+ break;
+ }
+
+ /*
+ if (*network == NULL) {
+ if (occurrence == esxVI_Occurrence_OptionalItem) {
+ result = 0;
+
+ goto cleanup;
+ } else {
+ ESX_VI_ERROR(VIR_ERR_NO_NETWORK,
+ _("Could not find network with name '%s'"), name);
+ goto cleanup;
+ }
+ }
+ */
+
+ result = 0;
+
+ cleanup:
+ esxVI_String_Free(&completePropertyNameList);
+ esxVI_ObjectContent_Free(&networkList);
+ //VIR_FREE(name_candidate);
+
+ return result;
+}
int
diff --git a/src/esx/esx_vi.h b/src/esx/esx_vi.h
index e150dbf..cbd6068 100644
--- a/src/esx/esx_vi.h
+++ b/src/esx/esx_vi.h
@@ -165,6 +165,7 @@ struct _esxVI_Context {
esxVI_SelectionSpec *selectSet_hostSystemToParent;
esxVI_SelectionSpec *selectSet_hostSystemToVm;
esxVI_SelectionSpec *selectSet_hostSystemToDatastore;
+ esxVI_SelectionSpec *selectSet_hostSystemToNetwork;
esxVI_SelectionSpec *selectSet_computeResourceToHost;
esxVI_SelectionSpec *selectSet_computeResourceToParentToParent;
bool hasQueryVirtualDiskUuid;
@@ -367,11 +368,19 @@ int esxVI_LookupVirtualMachineByUuidAndPrepareForTask
int esxVI_LookupDatastoreList(esxVI_Context *ctx, esxVI_String *propertyNameList,
esxVI_ObjectContent **datastoreList);
+int esxVI_LookupNetworkList(esxVI_Context *ctx, esxVI_String *propertyNameList,
+ esxVI_ObjectContent **networkList);
+
int esxVI_LookupDatastoreByName(esxVI_Context *ctx, const char *name,
esxVI_String *propertyNameList,
esxVI_ObjectContent **datastore,
esxVI_Occurrence occurrence);
+int esxVI_LookupNetworkByName(esxVI_Context *ctx, const char *name,
+ esxVI_String *propertyNameList,
+ esxVI_ObjectContent **network,
+ esxVI_Occurrence occurrence);
+
int esxVI_LookupDatastoreByAbsolutePath(esxVI_Context *ctx,
const char *absolutePath,
esxVI_String *propertyNameList,
diff --git a/src/esx/esx_vi_generator.input b/src/esx/esx_vi_generator.input
index 44d1d9b..86c4b12 100644
--- a/src/esx/esx_vi_generator.input
+++ b/src/esx/esx_vi_generator.input
@@ -334,6 +334,84 @@ object HostNasVolume extends HostFileSystemVolume
String userName o
end
+object HostNetCapabilities
+end
+
+object HostIpRouteConfig
+end
+
+object HostDnsConfig
+end
+
+object HostIpRouteConfig
+end
+
+object HostNetworkConfig
+end
+
+object HostNetworkInfo
+end
+
+object HostNetworkSystem
+ HostNetCapabilities capabilities rl
+ HostIpRouteConfig consoleIpRuteConfig r
+ HostDnsConfig dnsConfig r
+ HostIpRouteConfig ipRouteConfig r
+ HostNetworkConfig networkConfig r
+ HostNetworkInfo networkInfo r
+end
+
+
+object HostIpRouteConfig
+end
+
+object HostVirtualNic
+end
+
+object HostDhcpService
+end
+
+object HostDnsConfig
+end
+
+object HostNatService
+end
+
+object PhysicalNic
+end
+
+object HostPortGroup
+end
+
+object HostProxySwitch
+end
+
+object HostIpRouteTableInfo
+end
+
+object HostVirtualNic
+end
+
+object HostVirtualSwitch
+end
+
+object HostNetworkInfo
+ Boolean atBootIpV6Enabled r
+ HostIpRouteConfig consoleIpRouteConfig r
+ HostVirtualNic consoleVnic rl
+ HostDhcpService dhcp rl
+ HostDnsConfig dnsConfig r
+ HostIpRouteConfig ipRouteConfig r
+ Boolean ipV6Enabled r
+ HostNatService nat rl
+ PhysicalNic pnic rl
+ HostPortGroup portgroup rl
+ HostProxySwitch proxySwitch rl
+ HostIpRouteTableInfo routeTableInfo r
+ HostVirtualNic vnic rl
+ HostVirtualSwitch vswitch rl
+end
+
object HostScsiDiskPartition
String diskName r
--
1.7.4.1
13 years, 8 months
Re: [libvirt] How to get the IP address of a Domain? (Philipp Hahn)
by 徐滕
Thanks , Hahn!
I think I get your point ,libvirt or the host machine is independent from the guest OS.
but ,as I know ,on the VMware ESX server , they supply an extra tool called vmware-tools which can get more information
about the Guest OS,including the network info. How did they do this?
Now I had to write a tool to get more information about the active Guest OS using KVM hypervisor , have no idea how to
who can help me ?
Sincerely
wade
13 years, 8 months
[libvirt] [PATCH 0/5] RFC: configure inactive domains' memory size
by Taku Izumi
Hi all,
Currently "virsh setmem" is not allowed to use against an inactive domain.
This is yet another approach to configure inactive domain's memory size.
The approach before was closed in "virsh" command:
http://www.redhat.com/archives/libvir-list/2011-February/msg01074.html
This time a new libvirt API is introduced to achieve this.
*[PATCH 1/5] setmem: introduce a new libvirt API (virDomainSetMemoryFlags)
*[PATCH 2/5] setmem: implement the call back member for new API on each driver
*[PATCH 3/5] setmem: implement the code to address the new API in the qemu driver
*[PATCH 4/5] setmem: implement the remote protocol to address the new API
*[PATCH 5/5] setmem: add the new options to "virsh setmem" command
Best regards,
Taku Izumi
13 years, 8 months
[libvirt] [PATCH 0/3] Expose the libvirtd event loop to apps as an API
by Daniel P. Berrange
We provide the virEventRegister() API to let applications provide
a set of callbacks to integrate with their existing event loop.
Not all apps have an existing event loop and forcing them to write
one themselves is an undue burden, which they often get wrong. We
have an event loop impl used by libvirtd that could be used by
applications. This series exposes it via two new public APIs. Apps
are free to ignore these new APIs and provide their own impl, but
this should help the common case.
13 years, 8 months
[libvirt] [PATCH] Replace REMOTE_DEBUG with VIR_DEBUG in daemon dispatcher
by Daniel P. Berrange
The daemon dispatcher code had an obsolete macro
#define REMOTE_DEBUG(fmt, ...) VIR_DEBUG(fmt, __VA_ARGS__)
This can be trivially removed
* daemon/remote.c: s/REMOTE_DEBUG/VIR_DEBUG/
---
daemon/remote.c | 59 +++++++++++++++++++++++++++----------------------------
1 files changed, 29 insertions(+), 30 deletions(-)
diff --git a/daemon/remote.c b/daemon/remote.c
index 2a56d91..3ecf85f 100644
--- a/daemon/remote.c
+++ b/daemon/remote.c
@@ -63,7 +63,6 @@
#include "command.h"
#define VIR_FROM_THIS VIR_FROM_REMOTE
-#define REMOTE_DEBUG(fmt, ...) VIR_DEBUG(fmt, __VA_ARGS__)
static virDomainPtr get_nonnull_domain(virConnectPtr conn, remote_nonnull_domain domain);
static virNetworkPtr get_nonnull_network(virConnectPtr conn, remote_nonnull_network network);
@@ -134,7 +133,7 @@ static int remoteRelayDomainEventLifecycle(virConnectPtr conn ATTRIBUTE_UNUSED,
if (!client)
return -1;
- REMOTE_DEBUG("Relaying domain lifecycle event %d %d", event, detail);
+ VIR_DEBUG("Relaying domain lifecycle event %d %d", event, detail);
virMutexLock(&client->lock);
@@ -163,7 +162,7 @@ static int remoteRelayDomainEventReboot(virConnectPtr conn ATTRIBUTE_UNUSED,
if (!client)
return -1;
- REMOTE_DEBUG("Relaying domain reboot event %s %d", dom->name, dom->id);
+ VIR_DEBUG("Relaying domain reboot event %s %d", dom->name, dom->id);
virMutexLock(&client->lock);
@@ -192,7 +191,7 @@ static int remoteRelayDomainEventRTCChange(virConnectPtr conn ATTRIBUTE_UNUSED,
if (!client)
return -1;
- REMOTE_DEBUG("Relaying domain rtc change event %s %d %lld", dom->name, dom->id, offset);
+ VIR_DEBUG("Relaying domain rtc change event %s %d %lld", dom->name, dom->id, offset);
virMutexLock(&client->lock);
@@ -222,7 +221,7 @@ static int remoteRelayDomainEventWatchdog(virConnectPtr conn ATTRIBUTE_UNUSED,
if (!client)
return -1;
- REMOTE_DEBUG("Relaying domain watchdog event %s %d %d", dom->name, dom->id, action);
+ VIR_DEBUG("Relaying domain watchdog event %s %d %d", dom->name, dom->id, action);
virMutexLock(&client->lock);
@@ -254,7 +253,7 @@ static int remoteRelayDomainEventIOError(virConnectPtr conn ATTRIBUTE_UNUSED,
if (!client)
return -1;
- REMOTE_DEBUG("Relaying domain io error %s %d %s %s %d", dom->name, dom->id, srcPath, devAlias, action);
+ VIR_DEBUG("Relaying domain io error %s %d %s %s %d", dom->name, dom->id, srcPath, devAlias, action);
virMutexLock(&client->lock);
@@ -289,8 +288,8 @@ static int remoteRelayDomainEventIOErrorReason(virConnectPtr conn ATTRIBUTE_UNUS
if (!client)
return -1;
- REMOTE_DEBUG("Relaying domain io error %s %d %s %s %d %s",
- dom->name, dom->id, srcPath, devAlias, action, reason);
+ VIR_DEBUG("Relaying domain io error %s %d %s %s %d %s",
+ dom->name, dom->id, srcPath, devAlias, action, reason);
virMutexLock(&client->lock);
@@ -328,14 +327,14 @@ static int remoteRelayDomainEventGraphics(virConnectPtr conn ATTRIBUTE_UNUSED,
if (!client)
return -1;
- REMOTE_DEBUG("Relaying domain graphics event %s %d %d - %d %s %s - %d %s %s - %s", dom->name, dom->id, phase,
- local->family, local->service, local->node,
- remote->family, remote->service, remote->node,
- authScheme);
+ VIR_DEBUG("Relaying domain graphics event %s %d %d - %d %s %s - %d %s %s - %s", dom->name, dom->id, phase,
+ local->family, local->service, local->node,
+ remote->family, remote->service, remote->node,
+ authScheme);
- REMOTE_DEBUG("Subject %d", subject->nidentity);
+ VIR_DEBUG("Subject %d", subject->nidentity);
for (i = 0 ; i < subject->nidentity ; i++) {
- REMOTE_DEBUG(" %s=%s", subject->identities[i].type, subject->identities[i].name);
+ VIR_DEBUG(" %s=%s", subject->identities[i].type, subject->identities[i].name);
}
virMutexLock(&client->lock);
@@ -4309,7 +4308,7 @@ remoteDispatchAuthSaslInit(struct qemud_server *server,
virMutexLock(&client->lock);
virMutexUnlock(&server->lock);
- REMOTE_DEBUG("Initialize SASL auth %d", client->fd);
+ 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"));
@@ -4428,7 +4427,7 @@ remoteDispatchAuthSaslInit(struct qemud_server *server,
client->saslconn = NULL;
goto authfail;
}
- REMOTE_DEBUG("Available mechanisms for client: '%s'", mechlist);
+ VIR_DEBUG("Available mechanisms for client: '%s'", mechlist);
ret->mechlist = strdup(mechlist);
if (!ret->mechlist) {
VIR_ERROR0(_("cannot allocate mechlist"));
@@ -4473,7 +4472,7 @@ remoteSASLCheckSSF(struct qemud_client *client,
return -1;
}
ssf = *(const int *)val;
- REMOTE_DEBUG("negotiated an SSF of %d", ssf);
+ VIR_DEBUG("negotiated an SSF of %d", ssf);
if (ssf < 56) { /* 56 is good for Kerberos */
VIR_ERROR(_("negotiated SSF %d was not strong enough"), ssf);
remoteDispatchAuthError(rerr);
@@ -4521,7 +4520,7 @@ remoteSASLCheckAccess(struct qemud_server *server,
client->saslconn = NULL;
return -1;
}
- REMOTE_DEBUG("SASL client username %s", (const char *)val);
+ VIR_DEBUG("SASL client username %s", (const char *)val);
client->saslUsername = strdup((const char*)val);
if (client->saslUsername == NULL) {
@@ -4572,15 +4571,15 @@ remoteDispatchAuthSaslStart(struct qemud_server *server,
virMutexLock(&client->lock);
virMutexUnlock(&server->lock);
- REMOTE_DEBUG("Start SASL auth %d", client->fd);
+ 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"));
goto authfail;
}
- REMOTE_DEBUG("Using SASL mechanism %s. Data %d bytes, nil: %d",
- args->mech, args->data.data_len, args->nil);
+ VIR_DEBUG("Using SASL mechanism %s. Data %d bytes, nil: %d",
+ args->mech, args->data.data_len, args->nil);
err = sasl_server_start(client->saslconn,
args->mech,
/* NB, distinction of NULL vs "" is *critical* in SASL */
@@ -4616,7 +4615,7 @@ remoteDispatchAuthSaslStart(struct qemud_server *server,
ret->nil = serverout ? 0 : 1;
ret->data.data_len = serveroutlen;
- REMOTE_DEBUG("SASL return data %d bytes, nil; %d", ret->data.data_len, ret->nil);
+ VIR_DEBUG("SASL return data %d bytes, nil; %d", ret->data.data_len, ret->nil);
if (err == SASL_CONTINUE) {
ret->complete = 0;
} else {
@@ -4629,7 +4628,7 @@ remoteDispatchAuthSaslStart(struct qemud_server *server,
goto authfail;
}
- REMOTE_DEBUG("Authentication successful %d", client->fd);
+ VIR_DEBUG("Authentication successful %d", client->fd);
PROBE(CLIENT_AUTH_ALLOW, "fd=%d, auth=%d, username=%s",
client->fd, REMOTE_AUTH_SASL, client->saslUsername);
ret->complete = 1;
@@ -4672,15 +4671,15 @@ remoteDispatchAuthSaslStep(struct qemud_server *server,
virMutexLock(&client->lock);
virMutexUnlock(&server->lock);
- REMOTE_DEBUG("Step SASL auth %d", client->fd);
+ 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"));
goto authfail;
}
- REMOTE_DEBUG("Using SASL Data %d bytes, nil: %d",
- args->data.data_len, args->nil);
+ VIR_DEBUG("Using SASL Data %d bytes, nil: %d",
+ args->data.data_len, args->nil);
err = sasl_server_step(client->saslconn,
/* NB, distinction of NULL vs "" is *critical* in SASL */
args->nil ? NULL : args->data.data_val,
@@ -4717,7 +4716,7 @@ remoteDispatchAuthSaslStep(struct qemud_server *server,
ret->nil = serverout ? 0 : 1;
ret->data.data_len = serveroutlen;
- REMOTE_DEBUG("SASL return data %d bytes, nil; %d", ret->data.data_len, ret->nil);
+ VIR_DEBUG("SASL return data %d bytes, nil; %d", ret->data.data_len, ret->nil);
if (err == SASL_CONTINUE) {
ret->complete = 0;
} else {
@@ -4730,7 +4729,7 @@ remoteDispatchAuthSaslStep(struct qemud_server *server,
goto authfail;
}
- REMOTE_DEBUG("Authentication successful %d", client->fd);
+ VIR_DEBUG("Authentication successful %d", client->fd);
PROBE(CLIENT_AUTH_ALLOW, "fd=%d, auth=%d, username=%s",
client->fd, REMOTE_AUTH_SASL, client->saslUsername);
ret->complete = 1;
@@ -4840,7 +4839,7 @@ remoteDispatchAuthPolkit(struct qemud_server *server,
NULL
};
- REMOTE_DEBUG("Start PolicyKit auth %d", client->fd);
+ VIR_DEBUG("Start PolicyKit auth %d", client->fd);
if (client->auth != REMOTE_AUTH_POLKIT) {
VIR_ERROR0(_("client tried invalid PolicyKit init request"));
goto authfail;
@@ -4932,7 +4931,7 @@ remoteDispatchAuthPolkit(struct qemud_server *server,
"org.libvirt.unix.monitor" :
"org.libvirt.unix.manage";
- REMOTE_DEBUG("Start PolicyKit auth %d", client->fd);
+ VIR_DEBUG("Start PolicyKit auth %d", client->fd);
if (client->auth != REMOTE_AUTH_POLKIT) {
VIR_ERROR0(_("client tried invalid PolicyKit init request"));
goto authfail;
--
1.7.4.2
13 years, 8 months
[libvirt] [PATCH] Add missing checks for whether the connection is open in dispatcher
by Daniel P. Berrange
Many functions did not check for whether a connection was
open. Replace the macro which obscures control flow, with
explicit checks, and ensure all dispatcher code has checks.
* daemon/remote.c: Add connection checks
---
daemon/remote.c | 986 +++++++++++++++++++++++++++++++++++++++++++++++++++++--
1 files changed, 959 insertions(+), 27 deletions(-)
diff --git a/daemon/remote.c b/daemon/remote.c
index 8a2a71f..2a56d91 100644
--- a/daemon/remote.c
+++ b/daemon/remote.c
@@ -432,11 +432,6 @@ remoteDispatchOpen(struct qemud_server *server,
return rc;
}
-#define CHECK_CONN(client) \
- if (!client->conn) { \
- remoteDispatchFormatError(rerr, "%s", _("connection not open")); \
- return -1; \
- }
static int
remoteDispatchClose(struct qemud_server *server ATTRIBUTE_UNUSED,
@@ -464,6 +459,12 @@ remoteDispatchSupportsFeature(struct qemud_server *server ATTRIBUTE_UNUSED,
remote_error *rerr,
remote_supports_feature_args *args, remote_supports_feature_ret *ret)
{
+
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
+
ret->supported = virDrvSupportsFeature(conn, args->feature);
if (ret->supported == -1) {
@@ -484,6 +485,11 @@ remoteDispatchGetType(struct qemud_server *server ATTRIBUTE_UNUSED,
{
const char *type;
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
+
type = virConnectGetType(conn);
if (type == NULL) {
remoteDispatchConnError(rerr, conn);
@@ -513,6 +519,11 @@ remoteDispatchGetVersion(struct qemud_server *server ATTRIBUTE_UNUSED,
{
unsigned long hvVer;
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
+
if (virConnectGetVersion(conn, &hvVer) == -1) {
remoteDispatchConnError(rerr, conn);
return -1;
@@ -533,6 +544,11 @@ remoteDispatchGetLibVersion(struct qemud_server *server ATTRIBUTE_UNUSED,
{
unsigned long libVer;
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
+
if (virConnectGetLibVersion(conn, &libVer) == -1) {
remoteDispatchConnError(rerr, conn);
return -1;
@@ -553,6 +569,11 @@ remoteDispatchGetHostname(struct qemud_server *server ATTRIBUTE_UNUSED,
{
char *hostname;
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
+
hostname = virConnectGetHostname(conn);
if (hostname == NULL) {
remoteDispatchConnError(rerr, conn);
@@ -573,7 +594,11 @@ remoteDispatchGetUri(struct qemud_server *server ATTRIBUTE_UNUSED,
remote_get_uri_ret *ret)
{
char *uri;
- CHECK_CONN(client);
+
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
uri = virConnectGetURI(conn);
if (uri == NULL) {
@@ -597,6 +622,11 @@ remoteDispatchGetSysinfo(struct qemud_server *server ATTRIBUTE_UNUSED,
unsigned int flags;
char *sysinfo;
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
+
flags = args->flags;
sysinfo = virConnectGetSysinfo(conn, flags);
if (sysinfo == NULL) {
@@ -619,6 +649,11 @@ remoteDispatchGetMaxVcpus(struct qemud_server *server ATTRIBUTE_UNUSED,
{
char *type;
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
+
type = args->type ? *args->type : NULL;
ret->max_vcpus = virConnectGetMaxVcpus(conn, type);
if (ret->max_vcpus == -1) {
@@ -640,6 +675,11 @@ remoteDispatchNodeGetInfo(struct qemud_server *server ATTRIBUTE_UNUSED,
{
virNodeInfo info;
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
+
if (virNodeGetInfo(conn, &info) == -1) {
remoteDispatchConnError(rerr, conn);
return -1;
@@ -668,6 +708,11 @@ remoteDispatchGetCapabilities(struct qemud_server *server ATTRIBUTE_UNUSED,
{
char *caps;
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
+
caps = virConnectGetCapabilities(conn);
if (caps == NULL) {
remoteDispatchConnError(rerr, conn);
@@ -689,6 +734,11 @@ remoteDispatchNodeGetCellsFreeMemory(struct qemud_server *server ATTRIBUTE_UNUSE
{
int err;
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
+
if (args->maxCells > REMOTE_NODE_MAX_CELLS) {
remoteDispatchFormatError(rerr,
"%s", _("maxCells > REMOTE_NODE_MAX_CELLS"));
@@ -727,6 +777,11 @@ remoteDispatchNodeGetFreeMemory(struct qemud_server *server ATTRIBUTE_UNUSED,
{
unsigned long long freeMem;
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
+
freeMem = virNodeGetFreeMemory(conn);
if (freeMem == 0) {
remoteDispatchConnError(rerr, conn);
@@ -750,6 +805,11 @@ remoteDispatchDomainGetSchedulerType(struct qemud_server *server ATTRIBUTE_UNUSE
char *type;
int nparams;
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
+
dom = get_nonnull_domain(conn, args->dom);
if (dom == NULL) {
remoteDispatchConnError(rerr, conn);
@@ -782,6 +842,11 @@ remoteDispatchDomainGetSchedulerParameters(struct qemud_server *server ATTRIBUTE
virSchedParameterPtr params;
int i, r, nparams;
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
+
nparams = args->nparams;
if (nparams > REMOTE_DOMAIN_SCHEDULER_PARAMETERS_MAX) {
@@ -866,6 +931,11 @@ remoteDispatchDomainSetSchedulerParameters(struct qemud_server *server ATTRIBUTE
int i, r, nparams;
virSchedParameterPtr params;
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
+
nparams = args->params.params_len;
if (nparams > REMOTE_DOMAIN_SCHEDULER_PARAMETERS_MAX) {
@@ -933,6 +1003,11 @@ remoteDispatchDomainBlockStats(struct qemud_server *server ATTRIBUTE_UNUSED,
char *path;
struct _virDomainBlockStats stats;
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
+
dom = get_nonnull_domain(conn, args->dom);
if (dom == NULL) {
remoteDispatchConnError(rerr, conn);
@@ -969,6 +1044,11 @@ remoteDispatchDomainInterfaceStats(struct qemud_server *server ATTRIBUTE_UNUSED,
char *path;
struct _virDomainInterfaceStats stats;
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
+
dom = get_nonnull_domain(conn, args->dom);
if (dom == NULL) {
remoteDispatchConnError(rerr, conn);
@@ -1008,6 +1088,11 @@ remoteDispatchDomainMemoryStats(struct qemud_server *server ATTRIBUTE_UNUSED,
struct _virDomainMemoryStat *stats;
unsigned int nr_stats, i;
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
+
if (args->maxStats > REMOTE_DOMAIN_MEMORY_STATS_MAX) {
remoteDispatchFormatError(rerr, "%s",
_("maxStats > REMOTE_DOMAIN_MEMORY_STATS_MAX"));
@@ -1068,6 +1153,11 @@ remoteDispatchDomainBlockPeek(struct qemud_server *server ATTRIBUTE_UNUSED,
size_t size;
unsigned int flags;
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
+
dom = get_nonnull_domain(conn, args->dom);
if (dom == NULL) {
remoteDispatchConnError(rerr, conn);
@@ -1118,6 +1208,11 @@ remoteDispatchDomainMemoryPeek(struct qemud_server *server ATTRIBUTE_UNUSED,
size_t size;
unsigned int flags;
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
+
dom = get_nonnull_domain(conn, args->dom);
if (dom == NULL) {
remoteDispatchConnError(rerr, conn);
@@ -1164,6 +1259,11 @@ remoteDispatchDomainAttachDevice(struct qemud_server *server ATTRIBUTE_UNUSED,
{
virDomainPtr dom;
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
+
dom = get_nonnull_domain(conn, args->dom);
if (dom == NULL) {
remoteDispatchConnError(rerr, conn);
@@ -1190,6 +1290,11 @@ remoteDispatchDomainAttachDeviceFlags(struct qemud_server *server ATTRIBUTE_UNUS
{
virDomainPtr dom;
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
+
dom = get_nonnull_domain(conn, args->dom);
if (dom == NULL) {
remoteDispatchConnError(rerr, conn);
@@ -1216,6 +1321,11 @@ remoteDispatchDomainUpdateDeviceFlags(struct qemud_server *server ATTRIBUTE_UNUS
{
virDomainPtr dom;
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
+
dom = get_nonnull_domain(conn, args->dom);
if (dom == NULL) {
remoteDispatchConnError(rerr, conn);
@@ -1242,6 +1352,11 @@ remoteDispatchDomainCreate(struct qemud_server *server ATTRIBUTE_UNUSED,
{
virDomainPtr dom;
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
+
dom = get_nonnull_domain(conn, args->dom);
if (dom == NULL) {
remoteDispatchConnError(rerr, conn);
@@ -1296,6 +1411,11 @@ remoteDispatchDomainCreateXml(struct qemud_server *server ATTRIBUTE_UNUSED,
{
virDomainPtr dom;
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
+
dom = virDomainCreateXML(conn, args->xml_desc, args->flags);
if (dom == NULL) {
remoteDispatchConnError(rerr, conn);
@@ -1319,6 +1439,11 @@ remoteDispatchDomainDefineXml(struct qemud_server *server ATTRIBUTE_UNUSED,
{
virDomainPtr dom;
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
+
dom = virDomainDefineXML(conn, args->xml);
if (dom == NULL) {
remoteDispatchConnError(rerr, conn);
@@ -1342,6 +1467,11 @@ remoteDispatchDomainDestroy(struct qemud_server *server ATTRIBUTE_UNUSED,
{
virDomainPtr dom;
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
+
dom = get_nonnull_domain(conn, args->dom);
if (dom == NULL) {
remoteDispatchConnError(rerr, conn);
@@ -1368,6 +1498,11 @@ remoteDispatchDomainDetachDevice(struct qemud_server *server ATTRIBUTE_UNUSED,
{
virDomainPtr dom;
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
+
dom = get_nonnull_domain(conn, args->dom);
if (dom == NULL) {
remoteDispatchConnError(rerr, conn);
@@ -1395,6 +1530,11 @@ remoteDispatchDomainDetachDeviceFlags(struct qemud_server *server ATTRIBUTE_UNUS
{
virDomainPtr dom;
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
+
dom = get_nonnull_domain(conn, args->dom);
if (dom == NULL) {
remoteDispatchConnError(rerr, conn);
@@ -1422,6 +1562,11 @@ remoteDispatchDomainDumpXml(struct qemud_server *server ATTRIBUTE_UNUSED,
{
virDomainPtr dom;
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
+
dom = get_nonnull_domain(conn, args->dom);
if (dom == NULL) {
remoteDispatchConnError(rerr, conn);
@@ -1448,6 +1593,11 @@ remoteDispatchDomainXmlFromNative(struct qemud_server *server ATTRIBUTE_UNUSED,
remote_domain_xml_from_native_args *args,
remote_domain_xml_from_native_ret *ret)
{
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
+
/* remoteDispatchClientRequest will free this. */
ret->domainXml = virConnectDomainXMLFromNative(conn,
args->nativeFormat,
@@ -1469,6 +1619,11 @@ remoteDispatchDomainXmlToNative(struct qemud_server *server ATTRIBUTE_UNUSED,
remote_domain_xml_to_native_args *args,
remote_domain_xml_to_native_ret *ret)
{
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
+
/* remoteDispatchClientRequest will free this. */
ret->nativeConfig = virConnectDomainXMLToNative(conn,
args->nativeFormat,
@@ -1493,6 +1648,11 @@ remoteDispatchDomainGetAutostart(struct qemud_server *server ATTRIBUTE_UNUSED,
{
virDomainPtr dom;
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
+
dom = get_nonnull_domain(conn, args->dom);
if (dom == NULL) {
remoteDispatchConnError(rerr, conn);
@@ -1520,6 +1680,11 @@ remoteDispatchDomainGetInfo(struct qemud_server *server ATTRIBUTE_UNUSED,
virDomainPtr dom;
virDomainInfo info;
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
+
dom = get_nonnull_domain(conn, args->dom);
if (dom == NULL) {
remoteDispatchConnError(rerr, conn);
@@ -1554,6 +1719,11 @@ remoteDispatchDomainGetMaxMemory(struct qemud_server *server ATTRIBUTE_UNUSED,
{
virDomainPtr dom;
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
+
dom = get_nonnull_domain(conn, args->dom);
if (dom == NULL) {
remoteDispatchConnError(rerr, conn);
@@ -1581,6 +1751,11 @@ remoteDispatchDomainGetMaxVcpus(struct qemud_server *server ATTRIBUTE_UNUSED,
{
virDomainPtr dom;
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
+
dom = get_nonnull_domain(conn, args->dom);
if (dom == NULL) {
remoteDispatchConnError(rerr, conn);
@@ -1609,6 +1784,11 @@ remoteDispatchDomainGetSecurityLabel(struct qemud_server *server ATTRIBUTE_UNUSE
virDomainPtr dom;
virSecurityLabelPtr seclabel;
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
+
dom = get_nonnull_domain(conn, args->dom);
if (dom == NULL) {
remoteDispatchConnError(rerr, conn);
@@ -1654,6 +1834,11 @@ remoteDispatchNodeGetSecurityModel(struct qemud_server *server ATTRIBUTE_UNUSED,
{
virSecurityModel secmodel;
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
+
memset(&secmodel, 0, sizeof secmodel);
if (virNodeGetSecurityModel(conn, &secmodel) == -1) {
remoteDispatchConnError(rerr, conn);
@@ -1688,6 +1873,11 @@ remoteDispatchDomainGetOsType(struct qemud_server *server ATTRIBUTE_UNUSED,
{
virDomainPtr dom;
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
+
dom = get_nonnull_domain(conn, args->dom);
if (dom == NULL) {
remoteDispatchConnError(rerr, conn);
@@ -1719,6 +1909,11 @@ remoteDispatchDomainGetVcpus(struct qemud_server *server ATTRIBUTE_UNUSED,
unsigned char *cpumaps = NULL;
int info_len, i;
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
+
dom = get_nonnull_domain(conn, args->dom);
if (dom == NULL) {
remoteDispatchConnError(rerr, conn);
@@ -1797,6 +1992,11 @@ remoteDispatchDomainGetVcpusFlags(struct qemud_server *server ATTRIBUTE_UNUSED,
{
virDomainPtr dom;
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
+
dom = get_nonnull_domain(conn, args->dom);
if (dom == NULL) {
remoteDispatchConnError(rerr, conn);
@@ -1829,6 +2029,11 @@ remoteDispatchDomainMigratePrepare(struct qemud_server *server ATTRIBUTE_UNUSED,
char **uri_out;
char *dname;
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
+
uri_in = args->uri_in == NULL ? NULL : *args->uri_in;
dname = args->dname == NULL ? NULL : *args->dname;
@@ -1875,6 +2080,11 @@ remoteDispatchDomainMigratePerform(struct qemud_server *server ATTRIBUTE_UNUSED,
virDomainPtr dom;
char *dname;
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
+
dom = get_nonnull_domain(conn, args->dom);
if (dom == NULL) {
remoteDispatchConnError(rerr, conn);
@@ -1908,7 +2118,11 @@ remoteDispatchDomainMigrateFinish(struct qemud_server *server ATTRIBUTE_UNUSED,
remote_domain_migrate_finish_ret *ret)
{
virDomainPtr ddom;
- CHECK_CONN(client);
+
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
ddom = virDomainMigrateFinish(conn, args->dname,
args->cookie.cookie_val,
@@ -1940,7 +2154,11 @@ remoteDispatchDomainMigratePrepare2(struct qemud_server *server ATTRIBUTE_UNUSED
char *uri_in;
char **uri_out;
char *dname;
- CHECK_CONN(client);
+
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
uri_in = args->uri_in == NULL ? NULL : *args->uri_in;
dname = args->dname == NULL ? NULL : *args->dname;
@@ -1980,7 +2198,11 @@ remoteDispatchDomainMigrateFinish2(struct qemud_server *server ATTRIBUTE_UNUSED,
remote_domain_migrate_finish2_ret *ret)
{
virDomainPtr ddom;
- CHECK_CONN (client);
+
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
ddom = virDomainMigrateFinish2(conn, args->dname,
args->cookie.cookie_val,
@@ -2011,7 +2233,11 @@ remoteDispatchDomainMigratePrepareTunnel(struct qemud_server *server ATTRIBUTE_U
int r;
char *dname;
struct qemud_client_stream *stream;
- CHECK_CONN(client);
+
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
dname = args->dname == NULL ? NULL : *args->dname;
@@ -2049,6 +2275,10 @@ remoteDispatchListDefinedDomains(struct qemud_server *server ATTRIBUTE_UNUSED,
remote_list_defined_domains_args *args,
remote_list_defined_domains_ret *ret)
{
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
if (args->maxnames > REMOTE_DOMAIN_NAME_LIST_MAX) {
remoteDispatchFormatError(rerr,
@@ -2085,6 +2315,11 @@ remoteDispatchDomainLookupById(struct qemud_server *server ATTRIBUTE_UNUSED,
{
virDomainPtr dom;
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
+
dom = virDomainLookupByID(conn, args->id);
if (dom == NULL) {
remoteDispatchConnError(rerr, conn);
@@ -2107,6 +2342,11 @@ remoteDispatchDomainLookupByName(struct qemud_server *server ATTRIBUTE_UNUSED,
{
virDomainPtr dom;
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
+
dom = virDomainLookupByName(conn, args->name);
if (dom == NULL) {
remoteDispatchConnError(rerr, conn);
@@ -2129,6 +2369,11 @@ remoteDispatchDomainLookupByUuid(struct qemud_server *server ATTRIBUTE_UNUSED,
{
virDomainPtr dom;
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
+
dom = virDomainLookupByUUID(conn, (unsigned char *) args->uuid);
if (dom == NULL) {
remoteDispatchConnError(rerr, conn);
@@ -2149,6 +2394,10 @@ remoteDispatchNumOfDefinedDomains(struct qemud_server *server ATTRIBUTE_UNUSED,
void *args ATTRIBUTE_UNUSED,
remote_num_of_defined_domains_ret *ret)
{
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
ret->num = virConnectNumOfDefinedDomains(conn);
if (ret->num == -1) {
@@ -2171,6 +2420,11 @@ remoteDispatchDomainPinVcpu(struct qemud_server *server ATTRIBUTE_UNUSED,
virDomainPtr dom;
int rv;
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
+
dom = get_nonnull_domain(conn, args->dom);
if (dom == NULL) {
remoteDispatchConnError(rerr, conn);
@@ -2206,6 +2460,11 @@ remoteDispatchDomainReboot(struct qemud_server *server ATTRIBUTE_UNUSED,
{
virDomainPtr dom;
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
+
dom = get_nonnull_domain(conn, args->dom);
if (dom == NULL) {
remoteDispatchConnError(rerr, conn);
@@ -2230,6 +2489,10 @@ remoteDispatchDomainRestore(struct qemud_server *server ATTRIBUTE_UNUSED,
remote_domain_restore_args *args,
void *ret ATTRIBUTE_UNUSED)
{
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
if (virDomainRestore(conn, args->from) == -1) {
remoteDispatchConnError(rerr, conn);
@@ -2250,6 +2513,11 @@ remoteDispatchDomainResume(struct qemud_server *server ATTRIBUTE_UNUSED,
{
virDomainPtr dom;
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
+
dom = get_nonnull_domain(conn, args->dom);
if (dom == NULL) {
remoteDispatchConnError(rerr, conn);
@@ -2276,6 +2544,11 @@ remoteDispatchDomainSave(struct qemud_server *server ATTRIBUTE_UNUSED,
{
virDomainPtr dom;
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
+
dom = get_nonnull_domain(conn, args->dom);
if (dom == NULL) {
remoteDispatchConnError(rerr, conn);
@@ -2302,6 +2575,11 @@ remoteDispatchDomainCoreDump(struct qemud_server *server ATTRIBUTE_UNUSED,
{
virDomainPtr dom;
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
+
dom = get_nonnull_domain(conn, args->dom);
if (dom == NULL) {
remoteDispatchConnError(rerr, conn);
@@ -2328,6 +2606,11 @@ remoteDispatchDomainSetAutostart(struct qemud_server *server ATTRIBUTE_UNUSED,
{
virDomainPtr dom;
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
+
dom = get_nonnull_domain(conn, args->dom);
if (dom == NULL) {
remoteDispatchConnError(rerr, conn);
@@ -2354,6 +2637,11 @@ remoteDispatchDomainSetMaxMemory(struct qemud_server *server ATTRIBUTE_UNUSED,
{
virDomainPtr dom;
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
+
dom = get_nonnull_domain(conn, args->dom);
if (dom == NULL) {
remoteDispatchConnError(rerr, conn);
@@ -2380,6 +2668,11 @@ remoteDispatchDomainSetMemory(struct qemud_server *server ATTRIBUTE_UNUSED,
{
virDomainPtr dom;
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
+
dom = get_nonnull_domain(conn, args->dom);
if (dom == NULL) {
remoteDispatchConnError(rerr, conn);
@@ -2406,6 +2699,11 @@ remoteDispatchDomainSetMemoryFlags(struct qemud_server *server ATTRIBUTE_UNUSED,
{
virDomainPtr dom;
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
+
dom = get_nonnull_domain(conn, args->dom);
if (dom == NULL) {
remoteDispatchConnError(rerr, conn);
@@ -2438,6 +2736,11 @@ remoteDispatchDomainSetMemoryParameters(struct qemud_server *server
virMemoryParameterPtr params;
unsigned int flags;
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
+
nparams = args->params.params_len;
flags = args->flags;
@@ -2533,6 +2836,11 @@ remoteDispatchDomainGetMemoryParameters(struct qemud_server *server
int i, r, nparams;
unsigned int flags;
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
+
nparams = args->nparams;
flags = args->flags;
@@ -2649,6 +2957,11 @@ remoteDispatchDomainSetBlkioParameters(struct qemud_server *server
virBlkioParameterPtr params;
unsigned int flags;
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
+
nparams = args->params.params_len;
flags = args->flags;
@@ -2744,6 +3057,11 @@ remoteDispatchDomainGetBlkioParameters(struct qemud_server *server
int i, r, nparams;
unsigned int flags;
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
+
nparams = args->nparams;
flags = args->flags;
@@ -2854,6 +3172,11 @@ remoteDispatchDomainSetVcpus(struct qemud_server *server ATTRIBUTE_UNUSED,
{
virDomainPtr dom;
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
+
dom = get_nonnull_domain(conn, args->dom);
if (dom == NULL) {
remoteDispatchConnError(rerr, conn);
@@ -2880,6 +3203,11 @@ remoteDispatchDomainSetVcpusFlags(struct qemud_server *server ATTRIBUTE_UNUSED,
{
virDomainPtr dom;
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
+
dom = get_nonnull_domain(conn, args->dom);
if (dom == NULL) {
remoteDispatchConnError(rerr, conn);
@@ -2906,6 +3234,11 @@ remoteDispatchDomainShutdown(struct qemud_server *server ATTRIBUTE_UNUSED,
{
virDomainPtr dom;
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
+
dom = get_nonnull_domain(conn, args->dom);
if (dom == NULL) {
remoteDispatchConnError(rerr, conn);
@@ -2932,6 +3265,11 @@ remoteDispatchDomainSuspend(struct qemud_server *server ATTRIBUTE_UNUSED,
{
virDomainPtr dom;
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
+
dom = get_nonnull_domain(conn, args->dom);
if (dom == NULL) {
remoteDispatchConnError(rerr, conn);
@@ -2958,6 +3296,11 @@ remoteDispatchDomainUndefine(struct qemud_server *server ATTRIBUTE_UNUSED,
{
virDomainPtr dom;
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
+
dom = get_nonnull_domain(conn, args->dom);
if (dom == NULL) {
remoteDispatchConnError(rerr, conn);
@@ -2982,6 +3325,10 @@ remoteDispatchListDefinedNetworks(struct qemud_server *server ATTRIBUTE_UNUSED,
remote_list_defined_networks_args *args,
remote_list_defined_networks_ret *ret)
{
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
if (args->maxnames > REMOTE_NETWORK_NAME_LIST_MAX) {
remoteDispatchFormatError(rerr,
@@ -3016,6 +3363,10 @@ remoteDispatchListDomains(struct qemud_server *server ATTRIBUTE_UNUSED,
remote_list_domains_args *args,
remote_list_domains_ret *ret)
{
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
if (args->maxids > REMOTE_DOMAIN_ID_LIST_MAX) {
remoteDispatchFormatError(rerr,
@@ -3051,6 +3402,11 @@ remoteDispatchDomainManagedSave(struct qemud_server *server ATTRIBUTE_UNUSED,
{
virDomainPtr dom;
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
+
dom = get_nonnull_domain(conn, args->dom);
if (dom == NULL) {
remoteDispatchConnError(rerr, conn);
@@ -3077,6 +3433,11 @@ remoteDispatchDomainHasManagedSaveImage(struct qemud_server *server ATTRIBUTE_UN
{
virDomainPtr dom;
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
+
dom = get_nonnull_domain(conn, args->dom);
if (dom == NULL) {
remoteDispatchConnError(rerr, conn);
@@ -3104,6 +3465,11 @@ remoteDispatchDomainManagedSaveRemove(struct qemud_server *server ATTRIBUTE_UNUS
{
virDomainPtr dom;
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
+
dom = get_nonnull_domain(conn, args->dom);
if (dom == NULL) {
remoteDispatchConnError(rerr, conn);
@@ -3128,6 +3494,10 @@ remoteDispatchListNetworks(struct qemud_server *server ATTRIBUTE_UNUSED,
remote_list_networks_args *args,
remote_list_networks_ret *ret)
{
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
if (args->maxnames > REMOTE_NETWORK_NAME_LIST_MAX) {
remoteDispatchFormatError(rerr,
@@ -3164,6 +3534,11 @@ remoteDispatchNetworkCreate(struct qemud_server *server ATTRIBUTE_UNUSED,
{
virNetworkPtr net;
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
+
net = get_nonnull_network(conn, args->net);
if (net == NULL) {
remoteDispatchConnError(rerr, conn);
@@ -3190,6 +3565,11 @@ remoteDispatchNetworkCreateXml(struct qemud_server *server ATTRIBUTE_UNUSED,
{
virNetworkPtr net;
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
+
net = virNetworkCreateXML(conn, args->xml);
if (net == NULL) {
remoteDispatchConnError(rerr, conn);
@@ -3212,6 +3592,11 @@ remoteDispatchNetworkDefineXml(struct qemud_server *server ATTRIBUTE_UNUSED,
{
virNetworkPtr net;
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
+
net = virNetworkDefineXML(conn, args->xml);
if (net == NULL) {
remoteDispatchConnError(rerr, conn);
@@ -3234,6 +3619,11 @@ remoteDispatchNetworkDestroy(struct qemud_server *server ATTRIBUTE_UNUSED,
{
virNetworkPtr net;
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
+
net = get_nonnull_network(conn, args->net);
if (net == NULL) {
remoteDispatchConnError(rerr, conn);
@@ -3260,6 +3650,11 @@ remoteDispatchNetworkDumpXml(struct qemud_server *server ATTRIBUTE_UNUSED,
{
virNetworkPtr net;
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
+
net = get_nonnull_network(conn, args->net);
if (net == NULL) {
remoteDispatchConnError(rerr, conn);
@@ -3288,6 +3683,11 @@ remoteDispatchNetworkGetAutostart(struct qemud_server *server ATTRIBUTE_UNUSED,
{
virNetworkPtr net;
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
+
net = get_nonnull_network(conn, args->net);
if (net == NULL) {
remoteDispatchConnError(rerr, conn);
@@ -3314,6 +3714,11 @@ remoteDispatchNetworkGetBridgeName(struct qemud_server *server ATTRIBUTE_UNUSED,
{
virNetworkPtr net;
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
+
net = get_nonnull_network(conn, args->net);
if (net == NULL) {
remoteDispatchConnError(rerr, conn);
@@ -3342,6 +3747,11 @@ remoteDispatchNetworkLookupByName(struct qemud_server *server ATTRIBUTE_UNUSED,
{
virNetworkPtr net;
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
+
net = virNetworkLookupByName(conn, args->name);
if (net == NULL) {
remoteDispatchConnError(rerr, conn);
@@ -3364,6 +3774,11 @@ remoteDispatchNetworkLookupByUuid(struct qemud_server *server ATTRIBUTE_UNUSED,
{
virNetworkPtr net;
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
+
net = virNetworkLookupByUUID(conn, (unsigned char *) args->uuid);
if (net == NULL) {
remoteDispatchConnError(rerr, conn);
@@ -3386,8 +3801,13 @@ remoteDispatchNetworkSetAutostart(struct qemud_server *server ATTRIBUTE_UNUSED,
{
virNetworkPtr net;
- net = get_nonnull_network(conn, args->net);
- if (net == NULL) {
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
+
+ net = get_nonnull_network(conn, args->net);
+ if (net == NULL) {
remoteDispatchConnError(rerr, conn);
return -1;
}
@@ -3412,6 +3832,11 @@ remoteDispatchNetworkUndefine(struct qemud_server *server ATTRIBUTE_UNUSED,
{
virNetworkPtr net;
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
+
net = get_nonnull_network(conn, args->net);
if (net == NULL) {
remoteDispatchConnError(rerr, conn);
@@ -3436,6 +3861,10 @@ remoteDispatchNumOfDefinedNetworks(struct qemud_server *server ATTRIBUTE_UNUSED,
void *args ATTRIBUTE_UNUSED,
remote_num_of_defined_networks_ret *ret)
{
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
ret->num = virConnectNumOfDefinedNetworks(conn);
if (ret->num == -1) {
@@ -3455,6 +3884,10 @@ remoteDispatchNumOfDomains(struct qemud_server *server ATTRIBUTE_UNUSED,
void *args ATTRIBUTE_UNUSED,
remote_num_of_domains_ret *ret)
{
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
ret->num = virConnectNumOfDomains(conn);
if (ret->num == -1) {
@@ -3474,6 +3907,10 @@ remoteDispatchNumOfNetworks(struct qemud_server *server ATTRIBUTE_UNUSED,
void *args ATTRIBUTE_UNUSED,
remote_num_of_networks_ret *ret)
{
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
ret->num = virConnectNumOfNetworks(conn);
if (ret->num == -1) {
@@ -3495,6 +3932,10 @@ remoteDispatchNumOfInterfaces(struct qemud_server *server ATTRIBUTE_UNUSED,
void *args ATTRIBUTE_UNUSED,
remote_num_of_interfaces_ret *ret)
{
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
ret->num = virConnectNumOfInterfaces(conn);
if (ret->num == -1) {
@@ -3514,6 +3955,10 @@ remoteDispatchListInterfaces(struct qemud_server *server ATTRIBUTE_UNUSED,
remote_list_interfaces_args *args,
remote_list_interfaces_ret *ret)
{
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
if (args->maxnames > REMOTE_INTERFACE_NAME_LIST_MAX) {
remoteDispatchFormatError(rerr,
@@ -3548,6 +3993,10 @@ remoteDispatchNumOfDefinedInterfaces(struct qemud_server *server ATTRIBUTE_UNUSE
void *args ATTRIBUTE_UNUSED,
remote_num_of_defined_interfaces_ret *ret)
{
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
ret->num = virConnectNumOfDefinedInterfaces(conn);
if (ret->num == -1) {
@@ -3567,6 +4016,10 @@ remoteDispatchListDefinedInterfaces(struct qemud_server *server ATTRIBUTE_UNUSED
remote_list_defined_interfaces_args *args,
remote_list_defined_interfaces_ret *ret)
{
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
if (args->maxnames > REMOTE_DEFINED_INTERFACE_NAME_LIST_MAX) {
remoteDispatchFormatError(rerr,
@@ -3603,6 +4056,11 @@ remoteDispatchInterfaceLookupByName(struct qemud_server *server ATTRIBUTE_UNUSED
{
virInterfacePtr iface;
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
+
iface = virInterfaceLookupByName(conn, args->name);
if (iface == NULL) {
remoteDispatchConnError(rerr, conn);
@@ -3625,6 +4083,11 @@ remoteDispatchInterfaceLookupByMacString(struct qemud_server *server ATTRIBUTE_U
{
virInterfacePtr iface;
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
+
iface = virInterfaceLookupByMACString(conn, args->mac);
if (iface == NULL) {
remoteDispatchConnError(rerr, conn);
@@ -3647,6 +4110,11 @@ remoteDispatchInterfaceGetXmlDesc(struct qemud_server *server ATTRIBUTE_UNUSED,
{
virInterfacePtr iface;
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
+
iface = get_nonnull_interface(conn, args->iface);
if (iface == NULL) {
remoteDispatchConnError(rerr, conn);
@@ -3675,6 +4143,11 @@ remoteDispatchInterfaceDefineXml(struct qemud_server *server ATTRIBUTE_UNUSED,
{
virInterfacePtr iface;
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
+
iface = virInterfaceDefineXML(conn, args->xml, args->flags);
if (iface == NULL) {
remoteDispatchConnError(rerr, conn);
@@ -3697,6 +4170,11 @@ remoteDispatchInterfaceUndefine(struct qemud_server *server ATTRIBUTE_UNUSED,
{
virInterfacePtr iface;
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
+
iface = get_nonnull_interface(conn, args->iface);
if (iface == NULL) {
remoteDispatchConnError(rerr, conn);
@@ -3723,6 +4201,11 @@ remoteDispatchInterfaceCreate(struct qemud_server *server ATTRIBUTE_UNUSED,
{
virInterfacePtr iface;
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
+
iface = get_nonnull_interface(conn, args->iface);
if (iface == NULL) {
remoteDispatchConnError(rerr, conn);
@@ -3749,6 +4232,11 @@ remoteDispatchInterfaceDestroy(struct qemud_server *server ATTRIBUTE_UNUSED,
{
virInterfacePtr iface;
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
+
iface = get_nonnull_interface(conn, args->iface);
if (iface == NULL) {
remoteDispatchConnError(rerr, conn);
@@ -3775,6 +4263,11 @@ remoteDispatchAuthList(struct qemud_server *server,
void *args ATTRIBUTE_UNUSED,
remote_auth_list_ret *ret)
{
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
+
ret->types.types_len = 1;
if (VIR_ALLOC_N(ret->types.types_val, ret->types.types_len) < 0) {
remoteDispatchOOMError(rerr);
@@ -4572,6 +5065,10 @@ remoteDispatchListDefinedStoragePools(struct qemud_server *server ATTRIBUTE_UNUS
remote_list_defined_storage_pools_args *args,
remote_list_defined_storage_pools_ret *ret)
{
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
if (args->maxnames > REMOTE_NETWORK_NAME_LIST_MAX) {
remoteDispatchFormatError(rerr, "%s",
@@ -4606,6 +5103,10 @@ remoteDispatchListStoragePools(struct qemud_server *server ATTRIBUTE_UNUSED,
remote_list_storage_pools_args *args,
remote_list_storage_pools_ret *ret)
{
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
if (args->maxnames > REMOTE_STORAGE_POOL_NAME_LIST_MAX) {
remoteDispatchFormatError(rerr,
@@ -4640,6 +5141,11 @@ remoteDispatchFindStoragePoolSources(struct qemud_server *server ATTRIBUTE_UNUSE
remote_find_storage_pool_sources_args *args,
remote_find_storage_pool_sources_ret *ret)
{
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
+
ret->xml =
virConnectFindStoragePoolSources(conn,
args->type,
@@ -4665,6 +5171,11 @@ remoteDispatchStoragePoolCreate(struct qemud_server *server ATTRIBUTE_UNUSED,
{
virStoragePoolPtr pool;
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
+
pool = get_nonnull_storage_pool(conn, args->pool);
if (pool == NULL) {
remoteDispatchConnError(rerr, conn);
@@ -4691,6 +5202,11 @@ remoteDispatchStoragePoolCreateXml(struct qemud_server *server ATTRIBUTE_UNUSED,
{
virStoragePoolPtr pool;
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
+
pool = virStoragePoolCreateXML(conn, args->xml, args->flags);
if (pool == NULL) {
remoteDispatchConnError(rerr, conn);
@@ -4713,6 +5229,11 @@ remoteDispatchStoragePoolDefineXml(struct qemud_server *server ATTRIBUTE_UNUSED,
{
virStoragePoolPtr pool;
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
+
pool = virStoragePoolDefineXML(conn, args->xml, args->flags);
if (pool == NULL) {
remoteDispatchConnError(rerr, conn);
@@ -4735,6 +5256,11 @@ remoteDispatchStoragePoolBuild(struct qemud_server *server ATTRIBUTE_UNUSED,
{
virStoragePoolPtr pool;
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
+
pool = get_nonnull_storage_pool(conn, args->pool);
if (pool == NULL) {
remoteDispatchConnError(rerr, conn);
@@ -4762,6 +5288,11 @@ remoteDispatchStoragePoolDestroy(struct qemud_server *server ATTRIBUTE_UNUSED,
{
virStoragePoolPtr pool;
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
+
pool = get_nonnull_storage_pool(conn, args->pool);
if (pool == NULL) {
remoteDispatchConnError(rerr, conn);
@@ -4788,6 +5319,11 @@ remoteDispatchStoragePoolDelete(struct qemud_server *server ATTRIBUTE_UNUSED,
{
virStoragePoolPtr pool;
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
+
pool = get_nonnull_storage_pool(conn, args->pool);
if (pool == NULL) {
remoteDispatchConnError(rerr, conn);
@@ -4814,6 +5350,11 @@ remoteDispatchStoragePoolRefresh(struct qemud_server *server ATTRIBUTE_UNUSED,
{
virStoragePoolPtr pool;
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
+
pool = get_nonnull_storage_pool(conn, args->pool);
if (pool == NULL) {
remoteDispatchConnError(rerr, conn);
@@ -4841,6 +5382,11 @@ remoteDispatchStoragePoolGetInfo(struct qemud_server *server ATTRIBUTE_UNUSED,
virStoragePoolPtr pool;
virStoragePoolInfo info;
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
+
pool = get_nonnull_storage_pool(conn, args->pool);
if (pool == NULL) {
remoteDispatchConnError(rerr, conn);
@@ -4874,6 +5420,11 @@ remoteDispatchStoragePoolDumpXml(struct qemud_server *server ATTRIBUTE_UNUSED,
{
virStoragePoolPtr pool;
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
+
pool = get_nonnull_storage_pool(conn, args->pool);
if (pool == NULL) {
remoteDispatchConnError(rerr, conn);
@@ -4902,6 +5453,11 @@ remoteDispatchStoragePoolGetAutostart(struct qemud_server *server ATTRIBUTE_UNUS
{
virStoragePoolPtr pool;
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
+
pool = get_nonnull_storage_pool(conn, args->pool);
if (pool == NULL) {
remoteDispatchConnError(rerr, conn);
@@ -4929,6 +5485,11 @@ remoteDispatchStoragePoolLookupByName(struct qemud_server *server ATTRIBUTE_UNUS
{
virStoragePoolPtr pool;
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
+
pool = virStoragePoolLookupByName(conn, args->name);
if (pool == NULL) {
remoteDispatchConnError(rerr, conn);
@@ -4951,6 +5512,11 @@ remoteDispatchStoragePoolLookupByUuid(struct qemud_server *server ATTRIBUTE_UNUS
{
virStoragePoolPtr pool;
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
+
pool = virStoragePoolLookupByUUID(conn, (unsigned char *) args->uuid);
if (pool == NULL) {
remoteDispatchConnError(rerr, conn);
@@ -4974,6 +5540,11 @@ remoteDispatchStoragePoolLookupByVolume(struct qemud_server *server ATTRIBUTE_UN
virStoragePoolPtr pool;
virStorageVolPtr vol;
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
+
vol = get_nonnull_storage_vol(conn, args->vol);
if (vol == NULL) {
remoteDispatchConnError(rerr, conn);
@@ -5004,6 +5575,11 @@ remoteDispatchStoragePoolSetAutostart(struct qemud_server *server ATTRIBUTE_UNUS
{
virStoragePoolPtr pool;
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
+
pool = get_nonnull_storage_pool(conn, args->pool);
if (pool == NULL) {
remoteDispatchConnError(rerr, conn);
@@ -5030,6 +5606,11 @@ remoteDispatchStoragePoolUndefine(struct qemud_server *server ATTRIBUTE_UNUSED,
{
virStoragePoolPtr pool;
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
+
pool = get_nonnull_storage_pool(conn, args->pool);
if (pool == NULL) {
remoteDispatchConnError(rerr, conn);
@@ -5054,6 +5635,10 @@ remoteDispatchNumOfStoragePools(struct qemud_server *server ATTRIBUTE_UNUSED,
void *args ATTRIBUTE_UNUSED,
remote_num_of_storage_pools_ret *ret)
{
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
ret->num = virConnectNumOfStoragePools(conn);
if (ret->num == -1) {
@@ -5073,6 +5658,10 @@ remoteDispatchNumOfDefinedStoragePools(struct qemud_server *server ATTRIBUTE_UNU
void *args ATTRIBUTE_UNUSED,
remote_num_of_defined_storage_pools_ret *ret)
{
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
ret->num = virConnectNumOfDefinedStoragePools(conn);
if (ret->num == -1) {
@@ -5094,6 +5683,11 @@ remoteDispatchStoragePoolListVolumes(struct qemud_server *server ATTRIBUTE_UNUSE
{
virStoragePoolPtr pool;
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
+
if (args->maxnames > REMOTE_STORAGE_VOL_NAME_LIST_MAX) {
remoteDispatchFormatError(rerr,
"%s", _("maxnames > REMOTE_STORAGE_VOL_NAME_LIST_MAX"));
@@ -5139,6 +5733,11 @@ remoteDispatchStoragePoolNumOfVolumes(struct qemud_server *server ATTRIBUTE_UNUS
{
virStoragePoolPtr pool;
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
+
pool = get_nonnull_storage_pool(conn, args->pool);
if (pool == NULL) {
remoteDispatchConnError(rerr, conn);
@@ -5175,6 +5774,11 @@ remoteDispatchStorageVolCreateXml(struct qemud_server *server ATTRIBUTE_UNUSED,
virStoragePoolPtr pool;
virStorageVolPtr vol;
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
+
pool = get_nonnull_storage_pool(conn, args->pool);
if (pool == NULL) {
remoteDispatchConnError(rerr, conn);
@@ -5206,6 +5810,11 @@ remoteDispatchStorageVolCreateXmlFrom(struct qemud_server *server ATTRIBUTE_UNUS
virStoragePoolPtr pool;
virStorageVolPtr clonevol, newvol;
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
+
pool = get_nonnull_storage_pool(conn, args->pool);
if (pool == NULL) {
remoteDispatchConnError(rerr, conn);
@@ -5246,6 +5855,11 @@ remoteDispatchStorageVolDelete(struct qemud_server *server ATTRIBUTE_UNUSED,
{
virStorageVolPtr vol;
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
+
vol = get_nonnull_storage_vol(conn, args->vol);
if (vol == NULL) {
remoteDispatchConnError(rerr, conn);
@@ -5273,6 +5887,11 @@ remoteDispatchStorageVolWipe(struct qemud_server *server ATTRIBUTE_UNUSED,
int retval = -1;
virStorageVolPtr vol;
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
+
vol = get_nonnull_storage_vol(conn, args->vol);
if (vol == NULL) {
remoteDispatchConnError(rerr, conn);
@@ -5305,6 +5924,11 @@ remoteDispatchStorageVolGetInfo(struct qemud_server *server ATTRIBUTE_UNUSED,
virStorageVolPtr vol;
virStorageVolInfo info;
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
+
vol = get_nonnull_storage_vol(conn, args->vol);
if (vol == NULL) {
remoteDispatchConnError(rerr, conn);
@@ -5337,6 +5961,11 @@ remoteDispatchStorageVolDumpXml(struct qemud_server *server ATTRIBUTE_UNUSED,
{
virStorageVolPtr vol;
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
+
vol = get_nonnull_storage_vol(conn, args->vol);
if (vol == NULL) {
remoteDispatchConnError(rerr, conn);
@@ -5366,6 +5995,11 @@ remoteDispatchStorageVolGetPath(struct qemud_server *server ATTRIBUTE_UNUSED,
{
virStorageVolPtr vol;
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
+
vol = get_nonnull_storage_vol(conn, args->vol);
if (vol == NULL) {
remoteDispatchConnError(rerr, conn);
@@ -5396,6 +6030,11 @@ remoteDispatchStorageVolLookupByName(struct qemud_server *server ATTRIBUTE_UNUSE
virStoragePoolPtr pool;
virStorageVolPtr vol;
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
+
pool = get_nonnull_storage_pool(conn, args->pool);
if (pool == NULL) {
remoteDispatchConnError(rerr, conn);
@@ -5426,6 +6065,11 @@ remoteDispatchStorageVolLookupByKey(struct qemud_server *server ATTRIBUTE_UNUSED
{
virStorageVolPtr vol;
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
+
vol = virStorageVolLookupByKey(conn, args->key);
if (vol == NULL) {
remoteDispatchConnError(rerr, conn);
@@ -5449,6 +6093,11 @@ remoteDispatchStorageVolLookupByPath(struct qemud_server *server ATTRIBUTE_UNUSE
{
virStorageVolPtr vol;
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
+
vol = virStorageVolLookupByPath(conn, args->path);
if (vol == NULL) {
remoteDispatchConnError(rerr, conn);
@@ -5474,7 +6123,10 @@ remoteDispatchNodeNumOfDevices(struct qemud_server *server ATTRIBUTE_UNUSED,
remote_node_num_of_devices_args *args,
remote_node_num_of_devices_ret *ret)
{
- CHECK_CONN(client);
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
ret->num = virNodeNumOfDevices(conn,
args->cap ? *args->cap : NULL,
@@ -5497,7 +6149,10 @@ remoteDispatchNodeListDevices(struct qemud_server *server ATTRIBUTE_UNUSED,
remote_node_list_devices_args *args,
remote_node_list_devices_ret *ret)
{
- CHECK_CONN(client);
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
if (args->maxnames > REMOTE_NODE_DEVICE_NAME_LIST_MAX) {
remoteDispatchFormatError(rerr,
@@ -5536,7 +6191,10 @@ remoteDispatchNodeDeviceLookupByName(struct qemud_server *server ATTRIBUTE_UNUSE
{
virNodeDevicePtr dev;
- CHECK_CONN(client);
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
dev = virNodeDeviceLookupByName(conn, args->name);
if (dev == NULL) {
@@ -5560,7 +6218,11 @@ remoteDispatchNodeDeviceDumpXml(struct qemud_server *server ATTRIBUTE_UNUSED,
remote_node_device_dump_xml_ret *ret)
{
virNodeDevicePtr dev;
- CHECK_CONN(client);
+
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
dev = virNodeDeviceLookupByName(conn, args->name);
if (dev == NULL) {
@@ -5591,7 +6253,11 @@ remoteDispatchNodeDeviceGetParent(struct qemud_server *server ATTRIBUTE_UNUSED,
{
virNodeDevicePtr dev;
const char *parent;
- CHECK_CONN(client);
+
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
dev = virNodeDeviceLookupByName(conn, args->name);
if (dev == NULL) {
@@ -5635,7 +6301,11 @@ remoteDispatchNodeDeviceNumOfCaps(struct qemud_server *server ATTRIBUTE_UNUSED,
remote_node_device_num_of_caps_ret *ret)
{
virNodeDevicePtr dev;
- CHECK_CONN(client);
+
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
dev = virNodeDeviceLookupByName(conn, args->name);
if (dev == NULL) {
@@ -5665,7 +6335,11 @@ remoteDispatchNodeDeviceListCaps(struct qemud_server *server ATTRIBUTE_UNUSED,
remote_node_device_list_caps_ret *ret)
{
virNodeDevicePtr dev;
- CHECK_CONN(client);
+
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
dev = virNodeDeviceLookupByName(conn, args->name);
if (dev == NULL) {
@@ -5712,7 +6386,11 @@ remoteDispatchNodeDeviceDettach(struct qemud_server *server ATTRIBUTE_UNUSED,
void *ret ATTRIBUTE_UNUSED)
{
virNodeDevicePtr dev;
- CHECK_CONN(client);
+
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
dev = virNodeDeviceLookupByName(conn, args->name);
if (dev == NULL) {
@@ -5741,7 +6419,11 @@ remoteDispatchNodeDeviceReAttach(struct qemud_server *server ATTRIBUTE_UNUSED,
void *ret ATTRIBUTE_UNUSED)
{
virNodeDevicePtr dev;
- CHECK_CONN(client);
+
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
dev = virNodeDeviceLookupByName(conn, args->name);
if (dev == NULL) {
@@ -5770,7 +6452,11 @@ remoteDispatchNodeDeviceReset(struct qemud_server *server ATTRIBUTE_UNUSED,
void *ret ATTRIBUTE_UNUSED)
{
virNodeDevicePtr dev;
- CHECK_CONN(client);
+
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
dev = virNodeDeviceLookupByName(conn, args->name);
if (dev == NULL) {
@@ -5800,6 +6486,11 @@ remoteDispatchNodeDeviceCreateXml(struct qemud_server *server ATTRIBUTE_UNUSED,
{
virNodeDevicePtr dev;
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
+
dev = virNodeDeviceCreateXML(conn, args->xml_desc, args->flags);
if (dev == NULL) {
remoteDispatchConnError(rerr, conn);
@@ -5824,6 +6515,11 @@ remoteDispatchNodeDeviceDestroy(struct qemud_server *server ATTRIBUTE_UNUSED,
{
virNodeDevicePtr dev;
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
+
dev = virNodeDeviceLookupByName(conn, args->name);
if (dev == NULL) {
remoteDispatchConnError(rerr, conn);
@@ -5851,6 +6547,11 @@ static int remoteDispatchStorageVolUpload(struct qemud_server *server ATTRIBUTE_
struct qemud_client_stream *stream = NULL;
virStorageVolPtr vol;
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
+
vol = get_nonnull_storage_vol(conn, args->vol);
if (vol == NULL) {
remoteDispatchConnError(rerr, conn);
@@ -5898,6 +6599,11 @@ static int remoteDispatchStorageVolDownload(struct qemud_server *server ATTRIBUT
struct qemud_client_stream *stream = NULL;
virStorageVolPtr vol;
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
+
vol = get_nonnull_storage_vol(conn, args->vol);
if (vol == NULL) {
remoteDispatchConnError(rerr, conn);
@@ -5946,9 +6652,13 @@ remoteDispatchDomainEventsRegister(struct qemud_server *server ATTRIBUTE_UNUSED,
void *args ATTRIBUTE_UNUSED,
remote_domain_events_register_ret *ret ATTRIBUTE_UNUSED)
{
- CHECK_CONN(client);
int callbackID;
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
+
if (client->domainEventCallbackID[VIR_DOMAIN_EVENT_ID_LIFECYCLE] != -1) {
remoteDispatchFormatError(rerr, _("domain event %d already registered"), VIR_DOMAIN_EVENT_ID_LIFECYCLE);
return -1;
@@ -5977,7 +6687,10 @@ remoteDispatchDomainEventsDeregister(struct qemud_server *server ATTRIBUTE_UNUSE
void *args ATTRIBUTE_UNUSED,
remote_domain_events_deregister_ret *ret ATTRIBUTE_UNUSED)
{
- CHECK_CONN(client);
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
if (client->domainEventCallbackID[VIR_DOMAIN_EVENT_ID_LIFECYCLE] == -1) {
remoteDispatchFormatError(rerr, _("domain event %d not registered"), VIR_DOMAIN_EVENT_ID_LIFECYCLE);
@@ -6067,6 +6780,11 @@ remoteDispatchNumOfSecrets(struct qemud_server *server ATTRIBUTE_UNUSED,
void *args ATTRIBUTE_UNUSED,
remote_num_of_secrets_ret *ret)
{
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
+
ret->num = virConnectNumOfSecrets(conn);
if (ret->num == -1) {
remoteDispatchConnError(rerr, conn);
@@ -6085,6 +6803,11 @@ remoteDispatchListSecrets(struct qemud_server *server ATTRIBUTE_UNUSED,
remote_list_secrets_args *args,
remote_list_secrets_ret *ret)
{
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
+
if (args->maxuuids > REMOTE_SECRET_UUID_LIST_MAX) {
remoteDispatchFormatError(rerr, "%s",
_("maxuuids > REMOTE_SECRET_UUID_LIST_MAX"));
@@ -6118,6 +6841,11 @@ remoteDispatchSecretDefineXml(struct qemud_server *server ATTRIBUTE_UNUSED,
{
virSecretPtr secret;
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
+
secret = virSecretDefineXML(conn, args->xml, args->flags);
if (secret == NULL) {
remoteDispatchConnError(rerr, conn);
@@ -6142,6 +6870,11 @@ remoteDispatchSecretGetValue(struct qemud_server *server ATTRIBUTE_UNUSED,
size_t value_size;
unsigned char *value;
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
+
secret = get_nonnull_secret(conn, args->secret);
if (secret == NULL) {
remoteDispatchConnError(rerr, conn);
@@ -6172,6 +6905,11 @@ remoteDispatchSecretGetXmlDesc(struct qemud_server *server ATTRIBUTE_UNUSED,
{
virSecretPtr secret;
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
+
secret = get_nonnull_secret(conn, args->secret);
if (secret == NULL) {
remoteDispatchConnError(rerr, conn);
@@ -6198,6 +6936,11 @@ remoteDispatchSecretLookupByUuid(struct qemud_server *server ATTRIBUTE_UNUSED,
{
virSecretPtr secret;
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
+
secret = virSecretLookupByUUID(conn, (unsigned char *)args->uuid);
if (secret == NULL) {
remoteDispatchConnError(rerr, conn);
@@ -6220,6 +6963,11 @@ remoteDispatchSecretSetValue(struct qemud_server *server ATTRIBUTE_UNUSED,
{
virSecretPtr secret;
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
+
secret = get_nonnull_secret(conn, args->secret);
if (secret == NULL) {
remoteDispatchConnError(rerr, conn);
@@ -6247,6 +6995,11 @@ remoteDispatchSecretUndefine(struct qemud_server *server ATTRIBUTE_UNUSED,
{
virSecretPtr secret;
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
+
secret = get_nonnull_secret(conn, args->secret);
if (secret == NULL) {
remoteDispatchConnError(rerr, conn);
@@ -6273,6 +7026,11 @@ remoteDispatchSecretLookupByUsage(struct qemud_server *server ATTRIBUTE_UNUSED,
{
virSecretPtr secret;
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
+
secret = virSecretLookupByUsage(conn, args->usageType, args->usageID);
if (secret == NULL) {
remoteDispatchConnError(rerr, conn);
@@ -6295,6 +7053,11 @@ static int remoteDispatchDomainIsActive(struct qemud_server *server ATTRIBUTE_UN
{
virDomainPtr domain;
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
+
domain = get_nonnull_domain(conn, args->dom);
if (domain == NULL) {
remoteDispatchConnError(rerr, conn);
@@ -6323,6 +7086,11 @@ static int remoteDispatchDomainIsPersistent(struct qemud_server *server ATTRIBUT
{
virDomainPtr domain;
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
+
domain = get_nonnull_domain(conn, args->dom);
if (domain == NULL) {
remoteDispatchConnError(rerr, conn);
@@ -6351,6 +7119,11 @@ static int remoteDispatchDomainIsUpdated(struct qemud_server *server ATTRIBUTE_U
{
virDomainPtr domain;
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
+
domain = get_nonnull_domain(conn, args->dom);
if (domain == NULL) {
remoteDispatchConnError(rerr, conn);
@@ -6379,6 +7152,11 @@ static int remoteDispatchInterfaceIsActive(struct qemud_server *server ATTRIBUTE
{
virInterfacePtr iface;
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
+
iface = get_nonnull_interface(conn, args->iface);
if (iface == NULL) {
remoteDispatchConnError(rerr, conn);
@@ -6407,6 +7185,11 @@ static int remoteDispatchNetworkIsActive(struct qemud_server *server ATTRIBUTE_U
{
virNetworkPtr network;
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
+
network = get_nonnull_network(conn, args->net);
if (network == NULL) {
remoteDispatchConnError(rerr, conn);
@@ -6435,6 +7218,11 @@ static int remoteDispatchNetworkIsPersistent(struct qemud_server *server ATTRIBU
{
virNetworkPtr network;
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
+
network = get_nonnull_network(conn, args->net);
if (network == NULL) {
remoteDispatchConnError(rerr, conn);
@@ -6463,6 +7251,11 @@ static int remoteDispatchStoragePoolIsActive(struct qemud_server *server ATTRIBU
{
virStoragePoolPtr pool;
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
+
pool = get_nonnull_storage_pool(conn, args->pool);
if (pool == NULL) {
remoteDispatchConnError(rerr, conn);
@@ -6491,6 +7284,11 @@ static int remoteDispatchStoragePoolIsPersistent(struct qemud_server *server ATT
{
virStoragePoolPtr pool;
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
+
pool = get_nonnull_storage_pool(conn, args->pool);
if (pool == NULL) {
remoteDispatchConnError(rerr, conn);
@@ -6518,6 +7316,11 @@ static int remoteDispatchIsSecure(struct qemud_server *server ATTRIBUTE_UNUSED,
void *args ATTRIBUTE_UNUSED,
remote_is_secure_ret *ret)
{
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
+
ret->secure = virConnectIsSecure(conn);
if (ret->secure < 0) {
@@ -6540,6 +7343,11 @@ remoteDispatchCpuCompare(struct qemud_server *server ATTRIBUTE_UNUSED,
{
int result;
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
+
result = virConnectCompareCPU(conn, args->xml, args->flags);
if (result == VIR_CPU_COMPARE_ERROR) {
remoteDispatchConnError(rerr, conn);
@@ -6562,6 +7370,11 @@ remoteDispatchCpuBaseline(struct qemud_server *server ATTRIBUTE_UNUSED,
{
char *cpu;
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
+
cpu = virConnectBaselineCPU(conn,
(const char **) args->xmlCPUs.xmlCPUs_val,
args->xmlCPUs.xmlCPUs_len,
@@ -6589,6 +7402,11 @@ remoteDispatchDomainGetJobInfo(struct qemud_server *server ATTRIBUTE_UNUSED,
virDomainPtr dom;
virDomainJobInfo info;
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
+
dom = get_nonnull_domain(conn, args->dom);
if (dom == NULL) {
remoteDispatchConnError(rerr, conn);
@@ -6631,6 +7449,11 @@ remoteDispatchDomainAbortJob(struct qemud_server *server ATTRIBUTE_UNUSED,
{
virDomainPtr dom;
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
+
dom = get_nonnull_domain(conn, args->dom);
if (dom == NULL) {
remoteDispatchConnError(rerr, conn);
@@ -6660,6 +7483,11 @@ remoteDispatchDomainMigrateSetMaxDowntime(struct qemud_server *server ATTRIBUTE_
{
virDomainPtr dom;
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
+
dom = get_nonnull_domain(conn, args->dom);
if (dom == NULL) {
remoteDispatchConnError(rerr, conn);
@@ -6688,6 +7516,11 @@ remoteDispatchDomainMigrateSetMaxSpeed(struct qemud_server *server ATTRIBUTE_UNU
{
virDomainPtr dom;
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
+
dom = get_nonnull_domain(conn, args->dom);
if (dom == NULL) {
remoteDispatchConnError(rerr, conn);
@@ -6717,6 +7550,11 @@ remoteDispatchDomainSnapshotCreateXml(struct qemud_server *server ATTRIBUTE_UNUS
virDomainSnapshotPtr snapshot;
virDomainPtr domain;
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
+
domain = get_nonnull_domain(conn, args->domain);
if (domain == NULL) {
remoteDispatchConnError(rerr, conn);
@@ -6751,6 +7589,11 @@ remoteDispatchDomainSnapshotDumpXml(struct qemud_server *server ATTRIBUTE_UNUSED
virDomainSnapshotPtr snapshot = NULL;
int rc = -1;
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
+
domain = get_nonnull_domain(conn, args->snap.domain);
if (domain == NULL)
goto cleanup;
@@ -6788,6 +7631,11 @@ remoteDispatchDomainSnapshotNum(struct qemud_server *server ATTRIBUTE_UNUSED,
{
virDomainPtr domain;
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
+
domain = get_nonnull_domain(conn, args->domain);
if (domain == NULL) {
remoteDispatchConnError(rerr, conn);
@@ -6817,6 +7665,11 @@ remoteDispatchDomainSnapshotListNames(struct qemud_server *server ATTRIBUTE_UNUS
{
virDomainPtr domain;
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
+
if (args->nameslen > REMOTE_DOMAIN_SNAPSHOT_LIST_NAMES_MAX) {
remoteDispatchFormatError(rerr, "%s",
_("nameslen > REMOTE_DOMAIN_SNAPSHOT_LIST_NAMES_MAX"));
@@ -6864,6 +7717,11 @@ remoteDispatchDomainSnapshotLookupByName(struct qemud_server *server ATTRIBUTE_U
virDomainSnapshotPtr snapshot;
virDomainPtr domain;
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
+
domain = get_nonnull_domain(conn, args->domain);
if (domain == NULL) {
remoteDispatchConnError(rerr, conn);
@@ -6897,6 +7755,11 @@ remoteDispatchDomainHasCurrentSnapshot(struct qemud_server *server ATTRIBUTE_UNU
virDomainPtr domain;
int result;
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
+
domain = get_nonnull_domain(conn, args->domain);
if (domain == NULL) {
remoteDispatchConnError(rerr, conn);
@@ -6929,6 +7792,11 @@ remoteDispatchDomainSnapshotCurrent(struct qemud_server *server ATTRIBUTE_UNUSED
virDomainSnapshotPtr snapshot;
virDomainPtr domain;
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
+
domain = get_nonnull_domain(conn, args->domain);
if (domain == NULL) {
remoteDispatchConnError(rerr, conn);
@@ -6963,6 +7831,11 @@ remoteDispatchDomainRevertToSnapshot(struct qemud_server *server ATTRIBUTE_UNUSE
virDomainSnapshotPtr snapshot = NULL;
int rc = -1;
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
+
domain = get_nonnull_domain(conn, args->snap.domain);
if (domain == NULL)
goto cleanup;
@@ -7000,6 +7873,11 @@ remoteDispatchDomainSnapshotDelete(struct qemud_server *server ATTRIBUTE_UNUSED,
virDomainSnapshotPtr snapshot = NULL;
int rc = -1;
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
+
domain = get_nonnull_domain(conn, args->snap.domain);
if (domain == NULL)
goto cleanup;
@@ -7034,9 +7912,13 @@ remoteDispatchDomainEventsRegisterAny(struct qemud_server *server ATTRIBUTE_UNUS
remote_domain_events_register_any_args *args,
void *ret ATTRIBUTE_UNUSED)
{
- CHECK_CONN(client);
int callbackID;
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
+
if (args->eventID >= VIR_DOMAIN_EVENT_ID_LAST ||
args->eventID < 0) {
remoteDispatchFormatError(rerr, _("unsupported event ID %d"), args->eventID);
@@ -7072,9 +7954,13 @@ remoteDispatchDomainEventsDeregisterAny(struct qemud_server *server ATTRIBUTE_UN
remote_domain_events_deregister_any_args *args,
void *ret ATTRIBUTE_UNUSED)
{
- CHECK_CONN(client);
int callbackID = -1;
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
+
if (args->eventID >= VIR_DOMAIN_EVENT_ID_LAST ||
args->eventID < 0) {
remoteDispatchFormatError(rerr, _("unsupported event ID %d"), args->eventID);
@@ -7109,6 +7995,11 @@ remoteDispatchNwfilterLookupByName(struct qemud_server *server ATTRIBUTE_UNUSED,
{
virNWFilterPtr nwfilter;
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
+
nwfilter = virNWFilterLookupByName(conn, args->name);
if (nwfilter == NULL) {
remoteDispatchConnError(rerr, conn);
@@ -7131,6 +8022,11 @@ remoteDispatchNwfilterLookupByUuid(struct qemud_server *server ATTRIBUTE_UNUSED,
{
virNWFilterPtr nwfilter;
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
+
nwfilter = virNWFilterLookupByUUID(conn, (unsigned char *) args->uuid);
if (nwfilter == NULL) {
remoteDispatchConnError(rerr, conn);
@@ -7154,6 +8050,11 @@ remoteDispatchNwfilterDefineXml(struct qemud_server *server ATTRIBUTE_UNUSED,
{
virNWFilterPtr nwfilter;
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
+
nwfilter = virNWFilterDefineXML(conn, args->xml);
if (nwfilter == NULL) {
remoteDispatchConnError(rerr, conn);
@@ -7177,6 +8078,11 @@ remoteDispatchNwfilterUndefine(struct qemud_server *server ATTRIBUTE_UNUSED,
{
virNWFilterPtr nwfilter;
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
+
nwfilter = get_nonnull_nwfilter(conn, args->nwfilter);
if (nwfilter == NULL) {
remoteDispatchConnError(rerr, conn);
@@ -7201,6 +8107,10 @@ remoteDispatchListNwfilters(struct qemud_server *server ATTRIBUTE_UNUSED,
remote_list_nwfilters_args *args,
remote_list_nwfilters_ret *ret)
{
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
if (args->maxnames > REMOTE_NWFILTER_NAME_LIST_MAX) {
remoteDispatchFormatError(rerr,
@@ -7238,6 +8148,11 @@ remoteDispatchNwfilterGetXmlDesc(struct qemud_server *server ATTRIBUTE_UNUSED,
{
virNWFilterPtr nwfilter;
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
+
nwfilter = get_nonnull_nwfilter(conn, args->nwfilter);
if (nwfilter == NULL) {
remoteDispatchConnError(rerr, conn);
@@ -7265,6 +8180,10 @@ remoteDispatchNumOfNwfilters(struct qemud_server *server ATTRIBUTE_UNUSED,
void *args ATTRIBUTE_UNUSED,
remote_num_of_nwfilters_ret *ret)
{
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
ret->num = virConnectNumOfNWFilters(conn);
if (ret->num == -1) {
@@ -7288,6 +8207,11 @@ remoteDispatchDomainGetBlockInfo(struct qemud_server *server ATTRIBUTE_UNUSED,
virDomainPtr dom;
virDomainBlockInfo info;
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
+
dom = get_nonnull_domain(conn, args->dom);
if (dom == NULL) {
remoteDispatchConnError(rerr, conn);
@@ -7320,6 +8244,11 @@ qemuDispatchMonitorCommand(struct qemud_server *server ATTRIBUTE_UNUSED,
{
virDomainPtr domain;
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
+
domain = get_nonnull_domain(conn, args->domain);
if (domain == NULL) {
remoteDispatchConnError(rerr, conn);
@@ -7352,7 +8281,10 @@ remoteDispatchDomainOpenConsole(struct qemud_server *server ATTRIBUTE_UNUSED,
struct qemud_client_stream *stream;
virDomainPtr dom;
- CHECK_CONN (client);
+ if (!conn) {
+ remoteDispatchFormatError(rerr, "%s", _("connection not open"));
+ return -1;
+ }
dom = get_nonnull_domain(conn, args->domain);
if (dom == NULL) {
--
1.7.4.2
13 years, 8 months
[libvirt] [PATCH] Standard on error variable name in libvirtd dispatcher
by Daniel P. Berrange
Some dispatcher methods have a parameter
remote_error *err,
Instead of the more normal
remote_error *rerr,
* daemon/remote.c: s/err/rerr/
---
daemon/remote.c | 108 +++++++++++++++++++++++++++---------------------------
1 files changed, 54 insertions(+), 54 deletions(-)
diff --git a/daemon/remote.c b/daemon/remote.c
index d43cfce..8a2a71f 100644
--- a/daemon/remote.c
+++ b/daemon/remote.c
@@ -6063,13 +6063,13 @@ remoteDispatchNumOfSecrets(struct qemud_server *server ATTRIBUTE_UNUSED,
struct qemud_client *client ATTRIBUTE_UNUSED,
virConnectPtr conn,
remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *err,
+ remote_error *rerr,
void *args ATTRIBUTE_UNUSED,
remote_num_of_secrets_ret *ret)
{
ret->num = virConnectNumOfSecrets(conn);
if (ret->num == -1) {
- remoteDispatchConnError(err, conn);
+ remoteDispatchConnError(rerr, conn);
return -1;
}
@@ -6081,18 +6081,18 @@ remoteDispatchListSecrets(struct qemud_server *server ATTRIBUTE_UNUSED,
struct qemud_client *client ATTRIBUTE_UNUSED,
virConnectPtr conn,
remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *err,
+ remote_error *rerr,
remote_list_secrets_args *args,
remote_list_secrets_ret *ret)
{
if (args->maxuuids > REMOTE_SECRET_UUID_LIST_MAX) {
- remoteDispatchFormatError(err, "%s",
+ remoteDispatchFormatError(rerr, "%s",
_("maxuuids > REMOTE_SECRET_UUID_LIST_MAX"));
return -1;
}
if (VIR_ALLOC_N(ret->uuids.uuids_val, args->maxuuids) < 0) {
- remoteDispatchOOMError(err);
+ remoteDispatchOOMError(rerr);
return -1;
}
@@ -6100,7 +6100,7 @@ remoteDispatchListSecrets(struct qemud_server *server ATTRIBUTE_UNUSED,
args->maxuuids);
if (ret->uuids.uuids_len == -1) {
VIR_FREE(ret->uuids.uuids_val);
- remoteDispatchConnError(err, conn);
+ remoteDispatchConnError(rerr, conn);
return -1;
}
@@ -6112,7 +6112,7 @@ remoteDispatchSecretDefineXml(struct qemud_server *server ATTRIBUTE_UNUSED,
struct qemud_client *client ATTRIBUTE_UNUSED,
virConnectPtr conn,
remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *err,
+ remote_error *rerr,
remote_secret_define_xml_args *args,
remote_secret_define_xml_ret *ret)
{
@@ -6120,7 +6120,7 @@ remoteDispatchSecretDefineXml(struct qemud_server *server ATTRIBUTE_UNUSED,
secret = virSecretDefineXML(conn, args->xml, args->flags);
if (secret == NULL) {
- remoteDispatchConnError(err, conn);
+ remoteDispatchConnError(rerr, conn);
return -1;
}
@@ -6134,7 +6134,7 @@ remoteDispatchSecretGetValue(struct qemud_server *server ATTRIBUTE_UNUSED,
struct qemud_client *client ATTRIBUTE_UNUSED,
virConnectPtr conn,
remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *err,
+ remote_error *rerr,
remote_secret_get_value_args *args,
remote_secret_get_value_ret *ret)
{
@@ -6144,13 +6144,13 @@ remoteDispatchSecretGetValue(struct qemud_server *server ATTRIBUTE_UNUSED,
secret = get_nonnull_secret(conn, args->secret);
if (secret == NULL) {
- remoteDispatchConnError(err, conn);
+ remoteDispatchConnError(rerr, conn);
return -1;
}
value = virSecretGetValue(secret, &value_size, args->flags);
if (value == NULL) {
- remoteDispatchConnError(err, conn);
+ remoteDispatchConnError(rerr, conn);
virSecretFree(secret);
return -1;
}
@@ -6166,7 +6166,7 @@ remoteDispatchSecretGetXmlDesc(struct qemud_server *server ATTRIBUTE_UNUSED,
struct qemud_client *client ATTRIBUTE_UNUSED,
virConnectPtr conn,
remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *err,
+ remote_error *rerr,
remote_secret_get_xml_desc_args *args,
remote_secret_get_xml_desc_ret *ret)
{
@@ -6174,12 +6174,12 @@ remoteDispatchSecretGetXmlDesc(struct qemud_server *server ATTRIBUTE_UNUSED,
secret = get_nonnull_secret(conn, args->secret);
if (secret == NULL) {
- remoteDispatchConnError(err, conn);
+ remoteDispatchConnError(rerr, conn);
return -1;
}
ret->xml = virSecretGetXMLDesc(secret, args->flags);
if (ret->xml == NULL) {
- remoteDispatchConnError(err, conn);
+ remoteDispatchConnError(rerr, conn);
virSecretFree(secret);
return -1;
}
@@ -6192,7 +6192,7 @@ remoteDispatchSecretLookupByUuid(struct qemud_server *server ATTRIBUTE_UNUSED,
struct qemud_client *client ATTRIBUTE_UNUSED,
virConnectPtr conn,
remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *err,
+ remote_error *rerr,
remote_secret_lookup_by_uuid_args *args,
remote_secret_lookup_by_uuid_ret *ret)
{
@@ -6200,7 +6200,7 @@ remoteDispatchSecretLookupByUuid(struct qemud_server *server ATTRIBUTE_UNUSED,
secret = virSecretLookupByUUID(conn, (unsigned char *)args->uuid);
if (secret == NULL) {
- remoteDispatchConnError(err, conn);
+ remoteDispatchConnError(rerr, conn);
return -1;
}
@@ -6214,7 +6214,7 @@ remoteDispatchSecretSetValue(struct qemud_server *server ATTRIBUTE_UNUSED,
struct qemud_client *client ATTRIBUTE_UNUSED,
virConnectPtr conn,
remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *err,
+ remote_error *rerr,
remote_secret_set_value_args *args,
void *ret ATTRIBUTE_UNUSED)
{
@@ -6222,12 +6222,12 @@ remoteDispatchSecretSetValue(struct qemud_server *server ATTRIBUTE_UNUSED,
secret = get_nonnull_secret(conn, args->secret);
if (secret == NULL) {
- remoteDispatchConnError(err, conn);
+ remoteDispatchConnError(rerr, conn);
return -1;
}
if (virSecretSetValue(secret, (const unsigned char *)args->value.value_val,
args->value.value_len, args->flags) < 0) {
- remoteDispatchConnError(err, conn);
+ remoteDispatchConnError(rerr, conn);
virSecretFree(secret);
return -1;
}
@@ -6241,7 +6241,7 @@ remoteDispatchSecretUndefine(struct qemud_server *server ATTRIBUTE_UNUSED,
struct qemud_client *client ATTRIBUTE_UNUSED,
virConnectPtr conn,
remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *err,
+ remote_error *rerr,
remote_secret_undefine_args *args,
void *ret ATTRIBUTE_UNUSED)
{
@@ -6249,11 +6249,11 @@ remoteDispatchSecretUndefine(struct qemud_server *server ATTRIBUTE_UNUSED,
secret = get_nonnull_secret(conn, args->secret);
if (secret == NULL) {
- remoteDispatchConnError(err, conn);
+ remoteDispatchConnError(rerr, conn);
return -1;
}
if (virSecretUndefine(secret) < 0) {
- remoteDispatchConnError(err, conn);
+ remoteDispatchConnError(rerr, conn);
virSecretFree(secret);
return -1;
}
@@ -6267,7 +6267,7 @@ remoteDispatchSecretLookupByUsage(struct qemud_server *server ATTRIBUTE_UNUSED,
struct qemud_client *client ATTRIBUTE_UNUSED,
virConnectPtr conn,
remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *err,
+ remote_error *rerr,
remote_secret_lookup_by_usage_args *args,
remote_secret_lookup_by_usage_ret *ret)
{
@@ -6275,7 +6275,7 @@ remoteDispatchSecretLookupByUsage(struct qemud_server *server ATTRIBUTE_UNUSED,
secret = virSecretLookupByUsage(conn, args->usageType, args->usageID);
if (secret == NULL) {
- remoteDispatchConnError(err, conn);
+ remoteDispatchConnError(rerr, conn);
return -1;
}
@@ -6289,7 +6289,7 @@ static int remoteDispatchDomainIsActive(struct qemud_server *server ATTRIBUTE_UN
struct qemud_client *client ATTRIBUTE_UNUSED,
virConnectPtr conn,
remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *err,
+ remote_error *rerr,
remote_domain_is_active_args *args,
remote_domain_is_active_ret *ret)
{
@@ -6297,14 +6297,14 @@ static int remoteDispatchDomainIsActive(struct qemud_server *server ATTRIBUTE_UN
domain = get_nonnull_domain(conn, args->dom);
if (domain == NULL) {
- remoteDispatchConnError(err, conn);
+ remoteDispatchConnError(rerr, conn);
return -1;
}
ret->active = virDomainIsActive(domain);
if (ret->active < 0) {
- remoteDispatchConnError(err, conn);
+ remoteDispatchConnError(rerr, conn);
virDomainFree(domain);
return -1;
}
@@ -6317,7 +6317,7 @@ static int remoteDispatchDomainIsPersistent(struct qemud_server *server ATTRIBUT
struct qemud_client *client ATTRIBUTE_UNUSED,
virConnectPtr conn,
remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *err,
+ remote_error *rerr,
remote_domain_is_persistent_args *args,
remote_domain_is_persistent_ret *ret)
{
@@ -6325,14 +6325,14 @@ static int remoteDispatchDomainIsPersistent(struct qemud_server *server ATTRIBUT
domain = get_nonnull_domain(conn, args->dom);
if (domain == NULL) {
- remoteDispatchConnError(err, conn);
+ remoteDispatchConnError(rerr, conn);
return -1;
}
ret->persistent = virDomainIsPersistent(domain);
if (ret->persistent < 0) {
- remoteDispatchConnError(err, conn);
+ remoteDispatchConnError(rerr, conn);
virDomainFree(domain);
return -1;
}
@@ -6345,7 +6345,7 @@ static int remoteDispatchDomainIsUpdated(struct qemud_server *server ATTRIBUTE_U
struct qemud_client *client ATTRIBUTE_UNUSED,
virConnectPtr conn,
remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *err,
+ remote_error *rerr,
remote_domain_is_updated_args *args,
remote_domain_is_updated_ret *ret)
{
@@ -6353,14 +6353,14 @@ static int remoteDispatchDomainIsUpdated(struct qemud_server *server ATTRIBUTE_U
domain = get_nonnull_domain(conn, args->dom);
if (domain == NULL) {
- remoteDispatchConnError(err, conn);
+ remoteDispatchConnError(rerr, conn);
return -1;
}
ret->updated = virDomainIsUpdated(domain);
if (ret->updated < 0) {
- remoteDispatchConnError(err, conn);
+ remoteDispatchConnError(rerr, conn);
virDomainFree(domain);
return -1;
}
@@ -6373,7 +6373,7 @@ static int remoteDispatchInterfaceIsActive(struct qemud_server *server ATTRIBUTE
struct qemud_client *client ATTRIBUTE_UNUSED,
virConnectPtr conn,
remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *err,
+ remote_error *rerr,
remote_interface_is_active_args *args,
remote_interface_is_active_ret *ret)
{
@@ -6381,14 +6381,14 @@ static int remoteDispatchInterfaceIsActive(struct qemud_server *server ATTRIBUTE
iface = get_nonnull_interface(conn, args->iface);
if (iface == NULL) {
- remoteDispatchConnError(err, conn);
+ remoteDispatchConnError(rerr, conn);
return -1;
}
ret->active = virInterfaceIsActive(iface);
if (ret->active < 0) {
- remoteDispatchConnError(err, conn);
+ remoteDispatchConnError(rerr, conn);
virInterfaceFree(iface);
return -1;
}
@@ -6401,7 +6401,7 @@ static int remoteDispatchNetworkIsActive(struct qemud_server *server ATTRIBUTE_U
struct qemud_client *client ATTRIBUTE_UNUSED,
virConnectPtr conn,
remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *err,
+ remote_error *rerr,
remote_network_is_active_args *args,
remote_network_is_active_ret *ret)
{
@@ -6409,14 +6409,14 @@ static int remoteDispatchNetworkIsActive(struct qemud_server *server ATTRIBUTE_U
network = get_nonnull_network(conn, args->net);
if (network == NULL) {
- remoteDispatchConnError(err, conn);
+ remoteDispatchConnError(rerr, conn);
return -1;
}
ret->active = virNetworkIsActive(network);
if (ret->active < 0) {
- remoteDispatchConnError(err, conn);
+ remoteDispatchConnError(rerr, conn);
virNetworkFree(network);
return -1;
}
@@ -6429,7 +6429,7 @@ static int remoteDispatchNetworkIsPersistent(struct qemud_server *server ATTRIBU
struct qemud_client *client ATTRIBUTE_UNUSED,
virConnectPtr conn,
remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *err,
+ remote_error *rerr,
remote_network_is_persistent_args *args,
remote_network_is_persistent_ret *ret)
{
@@ -6437,14 +6437,14 @@ static int remoteDispatchNetworkIsPersistent(struct qemud_server *server ATTRIBU
network = get_nonnull_network(conn, args->net);
if (network == NULL) {
- remoteDispatchConnError(err, conn);
+ remoteDispatchConnError(rerr, conn);
return -1;
}
ret->persistent = virNetworkIsPersistent(network);
if (ret->persistent < 0) {
- remoteDispatchConnError(err, conn);
+ remoteDispatchConnError(rerr, conn);
virNetworkFree(network);
return -1;
}
@@ -6457,7 +6457,7 @@ static int remoteDispatchStoragePoolIsActive(struct qemud_server *server ATTRIBU
struct qemud_client *client ATTRIBUTE_UNUSED,
virConnectPtr conn,
remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *err,
+ remote_error *rerr,
remote_storage_pool_is_active_args *args,
remote_storage_pool_is_active_ret *ret)
{
@@ -6465,14 +6465,14 @@ static int remoteDispatchStoragePoolIsActive(struct qemud_server *server ATTRIBU
pool = get_nonnull_storage_pool(conn, args->pool);
if (pool == NULL) {
- remoteDispatchConnError(err, conn);
+ remoteDispatchConnError(rerr, conn);
return -1;
}
ret->active = virStoragePoolIsActive(pool);
if (ret->active < 0) {
- remoteDispatchConnError(err, conn);
+ remoteDispatchConnError(rerr, conn);
virStoragePoolFree(pool);
return -1;
}
@@ -6485,7 +6485,7 @@ static int remoteDispatchStoragePoolIsPersistent(struct qemud_server *server ATT
struct qemud_client *client ATTRIBUTE_UNUSED,
virConnectPtr conn,
remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *err,
+ remote_error *rerr,
remote_storage_pool_is_persistent_args *args,
remote_storage_pool_is_persistent_ret *ret)
{
@@ -6493,14 +6493,14 @@ static int remoteDispatchStoragePoolIsPersistent(struct qemud_server *server ATT
pool = get_nonnull_storage_pool(conn, args->pool);
if (pool == NULL) {
- remoteDispatchConnError(err, conn);
+ remoteDispatchConnError(rerr, conn);
return -1;
}
ret->persistent = virStoragePoolIsPersistent(pool);
if (ret->persistent < 0) {
- remoteDispatchConnError(err, conn);
+ remoteDispatchConnError(rerr, conn);
virStoragePoolFree(pool);
return -1;
}
@@ -6514,14 +6514,14 @@ static int remoteDispatchIsSecure(struct qemud_server *server ATTRIBUTE_UNUSED,
struct qemud_client *client ATTRIBUTE_UNUSED,
virConnectPtr conn,
remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *err,
+ remote_error *rerr,
void *args ATTRIBUTE_UNUSED,
remote_is_secure_ret *ret)
{
ret->secure = virConnectIsSecure(conn);
if (ret->secure < 0) {
- remoteDispatchConnError(err, conn);
+ remoteDispatchConnError(rerr, conn);
return -1;
}
@@ -6534,7 +6534,7 @@ remoteDispatchCpuCompare(struct qemud_server *server ATTRIBUTE_UNUSED,
struct qemud_client *client ATTRIBUTE_UNUSED,
virConnectPtr conn,
remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *err,
+ remote_error *rerr,
remote_cpu_compare_args *args,
remote_cpu_compare_ret *ret)
{
@@ -6542,7 +6542,7 @@ remoteDispatchCpuCompare(struct qemud_server *server ATTRIBUTE_UNUSED,
result = virConnectCompareCPU(conn, args->xml, args->flags);
if (result == VIR_CPU_COMPARE_ERROR) {
- remoteDispatchConnError(err, conn);
+ remoteDispatchConnError(rerr, conn);
return -1;
}
@@ -6556,7 +6556,7 @@ remoteDispatchCpuBaseline(struct qemud_server *server ATTRIBUTE_UNUSED,
struct qemud_client *client ATTRIBUTE_UNUSED,
virConnectPtr conn,
remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *err,
+ remote_error *rerr,
remote_cpu_baseline_args *args,
remote_cpu_baseline_ret *ret)
{
@@ -6567,7 +6567,7 @@ remoteDispatchCpuBaseline(struct qemud_server *server ATTRIBUTE_UNUSED,
args->xmlCPUs.xmlCPUs_len,
args->flags);
if (cpu == NULL) {
- remoteDispatchConnError(err, conn);
+ remoteDispatchConnError(rerr, conn);
return -1;
}
--
1.7.4.2
13 years, 8 months
[libvirt] [PATCH] Remove all whitespace before function brackets in daemon dispatcher
by Daniel P. Berrange
Alot of code in libvirtd's dispatcher used the style
dom = get_nonnull_domain (conn, args->dom);
Instead of the normal libvirt style
dom = get_nonnull_domain(conn, args->dom);
* daemon/remote.c: Remove all whitelist before function brackets
---
daemon/remote.c | 3488 +++++++++++++++++++++++++++---------------------------
1 files changed, 1744 insertions(+), 1744 deletions(-)
diff --git a/daemon/remote.c b/daemon/remote.c
index e4aa3db..d43cfce 100644
--- a/daemon/remote.c
+++ b/daemon/remote.c
@@ -117,10 +117,10 @@ const dispatch_data const *qemuGetDispatchData(int proc)
/* Prototypes */
static void
-remoteDispatchDomainEventSend (struct qemud_client *client,
- int procnr,
- xdrproc_t proc,
- void *data);
+remoteDispatchDomainEventSend(struct qemud_client *client,
+ int procnr,
+ xdrproc_t proc,
+ void *data);
static int remoteRelayDomainEventLifecycle(virConnectPtr conn ATTRIBUTE_UNUSED,
virDomainPtr dom,
@@ -140,13 +140,13 @@ static int remoteRelayDomainEventLifecycle(virConnectPtr conn ATTRIBUTE_UNUSED,
/* build return data */
memset(&data, 0, sizeof data);
- make_nonnull_domain (&data.dom, dom);
+ make_nonnull_domain(&data.dom, dom);
data.event = event;
data.detail = detail;
- remoteDispatchDomainEventSend (client,
- REMOTE_PROC_DOMAIN_EVENT_LIFECYCLE,
- (xdrproc_t)xdr_remote_domain_event_lifecycle_msg, &data);
+ remoteDispatchDomainEventSend(client,
+ REMOTE_PROC_DOMAIN_EVENT_LIFECYCLE,
+ (xdrproc_t)xdr_remote_domain_event_lifecycle_msg, &data);
virMutexUnlock(&client->lock);
@@ -169,11 +169,11 @@ static int remoteRelayDomainEventReboot(virConnectPtr conn ATTRIBUTE_UNUSED,
/* build return data */
memset(&data, 0, sizeof data);
- make_nonnull_domain (&data.dom, dom);
+ make_nonnull_domain(&data.dom, dom);
- remoteDispatchDomainEventSend (client,
- REMOTE_PROC_DOMAIN_EVENT_REBOOT,
- (xdrproc_t)xdr_remote_domain_event_reboot_msg, &data);
+ remoteDispatchDomainEventSend(client,
+ REMOTE_PROC_DOMAIN_EVENT_REBOOT,
+ (xdrproc_t)xdr_remote_domain_event_reboot_msg, &data);
virMutexUnlock(&client->lock);
@@ -198,12 +198,12 @@ static int remoteRelayDomainEventRTCChange(virConnectPtr conn ATTRIBUTE_UNUSED,
/* build return data */
memset(&data, 0, sizeof data);
- make_nonnull_domain (&data.dom, dom);
+ make_nonnull_domain(&data.dom, dom);
data.offset = offset;
- remoteDispatchDomainEventSend (client,
- REMOTE_PROC_DOMAIN_EVENT_RTC_CHANGE,
- (xdrproc_t)xdr_remote_domain_event_rtc_change_msg, &data);
+ remoteDispatchDomainEventSend(client,
+ REMOTE_PROC_DOMAIN_EVENT_RTC_CHANGE,
+ (xdrproc_t)xdr_remote_domain_event_rtc_change_msg, &data);
virMutexUnlock(&client->lock);
@@ -228,12 +228,12 @@ static int remoteRelayDomainEventWatchdog(virConnectPtr conn ATTRIBUTE_UNUSED,
/* build return data */
memset(&data, 0, sizeof data);
- make_nonnull_domain (&data.dom, dom);
+ make_nonnull_domain(&data.dom, dom);
data.action = action;
- remoteDispatchDomainEventSend (client,
- REMOTE_PROC_DOMAIN_EVENT_WATCHDOG,
- (xdrproc_t)xdr_remote_domain_event_watchdog_msg, &data);
+ remoteDispatchDomainEventSend(client,
+ REMOTE_PROC_DOMAIN_EVENT_WATCHDOG,
+ (xdrproc_t)xdr_remote_domain_event_watchdog_msg, &data);
virMutexUnlock(&client->lock);
@@ -260,14 +260,14 @@ static int remoteRelayDomainEventIOError(virConnectPtr conn ATTRIBUTE_UNUSED,
/* build return data */
memset(&data, 0, sizeof data);
- make_nonnull_domain (&data.dom, dom);
+ make_nonnull_domain(&data.dom, dom);
data.srcPath = (char*)srcPath;
data.devAlias = (char*)devAlias;
data.action = action;
- remoteDispatchDomainEventSend (client,
- REMOTE_PROC_DOMAIN_EVENT_IO_ERROR,
- (xdrproc_t)xdr_remote_domain_event_io_error_msg, &data);
+ remoteDispatchDomainEventSend(client,
+ REMOTE_PROC_DOMAIN_EVENT_IO_ERROR,
+ (xdrproc_t)xdr_remote_domain_event_io_error_msg, &data);
virMutexUnlock(&client->lock);
@@ -296,15 +296,15 @@ static int remoteRelayDomainEventIOErrorReason(virConnectPtr conn ATTRIBUTE_UNUS
/* build return data */
memset(&data, 0, sizeof data);
- make_nonnull_domain (&data.dom, dom);
+ make_nonnull_domain(&data.dom, dom);
data.srcPath = (char*)srcPath;
data.devAlias = (char*)devAlias;
data.action = action;
data.reason = (char*)reason;
- remoteDispatchDomainEventSend (client,
- REMOTE_PROC_DOMAIN_EVENT_IO_ERROR_REASON,
- (xdrproc_t)xdr_remote_domain_event_io_error_reason_msg, &data);
+ remoteDispatchDomainEventSend(client,
+ REMOTE_PROC_DOMAIN_EVENT_IO_ERROR_REASON,
+ (xdrproc_t)xdr_remote_domain_event_io_error_reason_msg, &data);
virMutexUnlock(&client->lock);
@@ -342,7 +342,7 @@ static int remoteRelayDomainEventGraphics(virConnectPtr conn ATTRIBUTE_UNUSED,
/* build return data */
memset(&data, 0, sizeof data);
- make_nonnull_domain (&data.dom, dom);
+ make_nonnull_domain(&data.dom, dom);
data.phase = phase;
data.authScheme = (char*)authScheme;
@@ -364,9 +364,9 @@ static int remoteRelayDomainEventGraphics(virConnectPtr conn ATTRIBUTE_UNUSED,
data.subject.subject_val[i].name = (char*)subject->identities[i].name;
}
- remoteDispatchDomainEventSend (client,
- REMOTE_PROC_DOMAIN_EVENT_GRAPHICS,
- (xdrproc_t)xdr_remote_domain_event_graphics_msg, &data);
+ remoteDispatchDomainEventSend(client,
+ REMOTE_PROC_DOMAIN_EVENT_GRAPHICS,
+ (xdrproc_t)xdr_remote_domain_event_graphics_msg, &data);
VIR_FREE(data.subject.subject_val);
@@ -391,19 +391,19 @@ verify(ARRAY_CARDINALITY(domainEventCallbacks) == VIR_DOMAIN_EVENT_ID_LAST);
/*----- Functions. -----*/
static int
-remoteDispatchOpen (struct qemud_server *server,
- struct qemud_client *client,
- virConnectPtr conn,
- remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *rerr,
- struct remote_open_args *args, void *ret ATTRIBUTE_UNUSED)
+remoteDispatchOpen(struct qemud_server *server,
+ struct qemud_client *client,
+ virConnectPtr conn,
+ remote_message_header *hdr ATTRIBUTE_UNUSED,
+ remote_error *rerr,
+ struct remote_open_args *args, void *ret ATTRIBUTE_UNUSED)
{
const char *name;
int flags, rc;
/* Already opened? */
if (conn) {
- remoteDispatchFormatError (rerr, "%s", _("connection already open"));
+ remoteDispatchFormatError(rerr, "%s", _("connection already open"));
return -1;
}
@@ -421,8 +421,8 @@ remoteDispatchOpen (struct qemud_server *server,
client->conn =
flags & VIR_CONNECT_RO
- ? virConnectOpenReadOnly (name)
- : virConnectOpen (name);
+ ? virConnectOpenReadOnly(name)
+ : virConnectOpen(name);
if (client->conn == NULL)
remoteDispatchConnError(rerr, NULL);
@@ -434,17 +434,17 @@ remoteDispatchOpen (struct qemud_server *server,
#define CHECK_CONN(client) \
if (!client->conn) { \
- remoteDispatchFormatError (rerr, "%s", _("connection not open")); \
+ remoteDispatchFormatError(rerr, "%s", _("connection not open")); \
return -1; \
}
static int
-remoteDispatchClose (struct qemud_server *server ATTRIBUTE_UNUSED,
- struct qemud_client *client ATTRIBUTE_UNUSED,
- virConnectPtr conn ATTRIBUTE_UNUSED,
- remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *rerr ATTRIBUTE_UNUSED,
- void *args ATTRIBUTE_UNUSED, void *ret ATTRIBUTE_UNUSED)
+remoteDispatchClose(struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client ATTRIBUTE_UNUSED,
+ virConnectPtr conn ATTRIBUTE_UNUSED,
+ remote_message_header *hdr ATTRIBUTE_UNUSED,
+ remote_error *rerr ATTRIBUTE_UNUSED,
+ void *args ATTRIBUTE_UNUSED, void *ret ATTRIBUTE_UNUSED)
{
virMutexLock(&server->lock);
virMutexLock(&client->lock);
@@ -457,14 +457,14 @@ remoteDispatchClose (struct qemud_server *server ATTRIBUTE_UNUSED,
}
static int
-remoteDispatchSupportsFeature (struct qemud_server *server ATTRIBUTE_UNUSED,
- struct qemud_client *client ATTRIBUTE_UNUSED,
- virConnectPtr conn,
- remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *rerr,
- remote_supports_feature_args *args, remote_supports_feature_ret *ret)
+remoteDispatchSupportsFeature(struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client ATTRIBUTE_UNUSED,
+ virConnectPtr conn,
+ remote_message_header *hdr ATTRIBUTE_UNUSED,
+ remote_error *rerr,
+ remote_supports_feature_args *args, remote_supports_feature_ret *ret)
{
- ret->supported = virDrvSupportsFeature (conn, args->feature);
+ ret->supported = virDrvSupportsFeature(conn, args->feature);
if (ret->supported == -1) {
remoteDispatchConnError(rerr, conn);
@@ -475,16 +475,16 @@ remoteDispatchSupportsFeature (struct qemud_server *server ATTRIBUTE_UNUSED,
}
static int
-remoteDispatchGetType (struct qemud_server *server ATTRIBUTE_UNUSED,
- struct qemud_client *client ATTRIBUTE_UNUSED,
- virConnectPtr conn,
- remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *rerr,
- void *args ATTRIBUTE_UNUSED, remote_get_type_ret *ret)
+remoteDispatchGetType(struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client ATTRIBUTE_UNUSED,
+ virConnectPtr conn,
+ remote_message_header *hdr ATTRIBUTE_UNUSED,
+ remote_error *rerr,
+ void *args ATTRIBUTE_UNUSED, remote_get_type_ret *ret)
{
const char *type;
- type = virConnectGetType (conn);
+ type = virConnectGetType(conn);
if (type == NULL) {
remoteDispatchConnError(rerr, conn);
return -1;
@@ -493,7 +493,7 @@ remoteDispatchGetType (struct qemud_server *server ATTRIBUTE_UNUSED,
/* We have to strdup because remoteDispatchClientRequest will
* free this string after it's been serialised.
*/
- ret->type = strdup (type);
+ ret->type = strdup(type);
if (!ret->type) {
remoteDispatchOOMError(rerr);
return -1;
@@ -503,17 +503,17 @@ remoteDispatchGetType (struct qemud_server *server ATTRIBUTE_UNUSED,
}
static int
-remoteDispatchGetVersion (struct qemud_server *server ATTRIBUTE_UNUSED,
- struct qemud_client *client ATTRIBUTE_UNUSED,
- virConnectPtr conn,
- remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *rerr,
- void *args ATTRIBUTE_UNUSED,
- remote_get_version_ret *ret)
+remoteDispatchGetVersion(struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client ATTRIBUTE_UNUSED,
+ virConnectPtr conn,
+ remote_message_header *hdr ATTRIBUTE_UNUSED,
+ remote_error *rerr,
+ void *args ATTRIBUTE_UNUSED,
+ remote_get_version_ret *ret)
{
unsigned long hvVer;
- if (virConnectGetVersion (conn, &hvVer) == -1) {
+ if (virConnectGetVersion(conn, &hvVer) == -1) {
remoteDispatchConnError(rerr, conn);
return -1;
}
@@ -523,17 +523,17 @@ remoteDispatchGetVersion (struct qemud_server *server ATTRIBUTE_UNUSED,
}
static int
-remoteDispatchGetLibVersion (struct qemud_server *server ATTRIBUTE_UNUSED,
- struct qemud_client *client ATTRIBUTE_UNUSED,
- virConnectPtr conn,
- remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *rerr,
- void *args ATTRIBUTE_UNUSED,
- remote_get_lib_version_ret *ret)
+remoteDispatchGetLibVersion(struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client ATTRIBUTE_UNUSED,
+ virConnectPtr conn,
+ remote_message_header *hdr ATTRIBUTE_UNUSED,
+ remote_error *rerr,
+ void *args ATTRIBUTE_UNUSED,
+ remote_get_lib_version_ret *ret)
{
unsigned long libVer;
- if (virConnectGetLibVersion (conn, &libVer) == -1) {
+ if (virConnectGetLibVersion(conn, &libVer) == -1) {
remoteDispatchConnError(rerr, conn);
return -1;
}
@@ -543,17 +543,17 @@ remoteDispatchGetLibVersion (struct qemud_server *server ATTRIBUTE_UNUSED,
}
static int
-remoteDispatchGetHostname (struct qemud_server *server ATTRIBUTE_UNUSED,
- struct qemud_client *client ATTRIBUTE_UNUSED,
- virConnectPtr conn,
- remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *rerr,
- void *args ATTRIBUTE_UNUSED,
- remote_get_hostname_ret *ret)
+remoteDispatchGetHostname(struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client ATTRIBUTE_UNUSED,
+ virConnectPtr conn,
+ remote_message_header *hdr ATTRIBUTE_UNUSED,
+ remote_error *rerr,
+ void *args ATTRIBUTE_UNUSED,
+ remote_get_hostname_ret *ret)
{
char *hostname;
- hostname = virConnectGetHostname (conn);
+ hostname = virConnectGetHostname(conn);
if (hostname == NULL) {
remoteDispatchConnError(rerr, conn);
return -1;
@@ -564,18 +564,18 @@ remoteDispatchGetHostname (struct qemud_server *server ATTRIBUTE_UNUSED,
}
static int
-remoteDispatchGetUri (struct qemud_server *server ATTRIBUTE_UNUSED,
- struct qemud_client *client ATTRIBUTE_UNUSED,
- virConnectPtr conn,
- remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *rerr,
- void *args ATTRIBUTE_UNUSED,
- remote_get_uri_ret *ret)
+remoteDispatchGetUri(struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client ATTRIBUTE_UNUSED,
+ virConnectPtr conn,
+ remote_message_header *hdr ATTRIBUTE_UNUSED,
+ remote_error *rerr,
+ void *args ATTRIBUTE_UNUSED,
+ remote_get_uri_ret *ret)
{
char *uri;
CHECK_CONN(client);
- uri = virConnectGetURI (conn);
+ uri = virConnectGetURI(conn);
if (uri == NULL) {
remoteDispatchConnError(rerr, conn);
return -1;
@@ -586,19 +586,19 @@ remoteDispatchGetUri (struct qemud_server *server ATTRIBUTE_UNUSED,
}
static int
-remoteDispatchGetSysinfo (struct qemud_server *server ATTRIBUTE_UNUSED,
- struct qemud_client *client ATTRIBUTE_UNUSED,
- virConnectPtr conn,
- remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *rerr,
- remote_get_sysinfo_args *args,
- remote_get_sysinfo_ret *ret)
+remoteDispatchGetSysinfo(struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client ATTRIBUTE_UNUSED,
+ virConnectPtr conn,
+ remote_message_header *hdr ATTRIBUTE_UNUSED,
+ remote_error *rerr,
+ remote_get_sysinfo_args *args,
+ remote_get_sysinfo_ret *ret)
{
unsigned int flags;
char *sysinfo;
flags = args->flags;
- sysinfo = virConnectGetSysinfo (conn, flags);
+ sysinfo = virConnectGetSysinfo(conn, flags);
if (sysinfo == NULL) {
remoteDispatchConnError(rerr, conn);
return -1;
@@ -609,18 +609,18 @@ remoteDispatchGetSysinfo (struct qemud_server *server ATTRIBUTE_UNUSED,
}
static int
-remoteDispatchGetMaxVcpus (struct qemud_server *server ATTRIBUTE_UNUSED,
- struct qemud_client *client ATTRIBUTE_UNUSED,
- virConnectPtr conn,
- remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *rerr,
- remote_get_max_vcpus_args *args,
- remote_get_max_vcpus_ret *ret)
+remoteDispatchGetMaxVcpus(struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client ATTRIBUTE_UNUSED,
+ virConnectPtr conn,
+ remote_message_header *hdr ATTRIBUTE_UNUSED,
+ remote_error *rerr,
+ remote_get_max_vcpus_args *args,
+ remote_get_max_vcpus_ret *ret)
{
char *type;
type = args->type ? *args->type : NULL;
- ret->max_vcpus = virConnectGetMaxVcpus (conn, type);
+ ret->max_vcpus = virConnectGetMaxVcpus(conn, type);
if (ret->max_vcpus == -1) {
remoteDispatchConnError(rerr, conn);
return -1;
@@ -630,22 +630,22 @@ remoteDispatchGetMaxVcpus (struct qemud_server *server ATTRIBUTE_UNUSED,
}
static int
-remoteDispatchNodeGetInfo (struct qemud_server *server ATTRIBUTE_UNUSED,
- struct qemud_client *client ATTRIBUTE_UNUSED,
- virConnectPtr conn,
- remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *rerr,
- void *args ATTRIBUTE_UNUSED,
- remote_node_get_info_ret *ret)
+remoteDispatchNodeGetInfo(struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client ATTRIBUTE_UNUSED,
+ virConnectPtr conn,
+ remote_message_header *hdr ATTRIBUTE_UNUSED,
+ remote_error *rerr,
+ void *args ATTRIBUTE_UNUSED,
+ remote_node_get_info_ret *ret)
{
virNodeInfo info;
- if (virNodeGetInfo (conn, &info) == -1) {
+ if (virNodeGetInfo(conn, &info) == -1) {
remoteDispatchConnError(rerr, conn);
return -1;
}
- memcpy (ret->model, info.model, sizeof ret->model);
+ memcpy(ret->model, info.model, sizeof ret->model);
ret->memory = info.memory;
ret->cpus = info.cpus;
ret->mhz = info.mhz;
@@ -658,17 +658,17 @@ remoteDispatchNodeGetInfo (struct qemud_server *server ATTRIBUTE_UNUSED,
}
static int
-remoteDispatchGetCapabilities (struct qemud_server *server ATTRIBUTE_UNUSED,
- struct qemud_client *client ATTRIBUTE_UNUSED,
- virConnectPtr conn,
- remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *rerr,
- void *args ATTRIBUTE_UNUSED,
- remote_get_capabilities_ret *ret)
+remoteDispatchGetCapabilities(struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client ATTRIBUTE_UNUSED,
+ virConnectPtr conn,
+ remote_message_header *hdr ATTRIBUTE_UNUSED,
+ remote_error *rerr,
+ void *args ATTRIBUTE_UNUSED,
+ remote_get_capabilities_ret *ret)
{
char *caps;
- caps = virConnectGetCapabilities (conn);
+ caps = virConnectGetCapabilities(conn);
if (caps == NULL) {
remoteDispatchConnError(rerr, conn);
return -1;
@@ -679,18 +679,18 @@ remoteDispatchGetCapabilities (struct qemud_server *server ATTRIBUTE_UNUSED,
}
static int
-remoteDispatchNodeGetCellsFreeMemory (struct qemud_server *server ATTRIBUTE_UNUSED,
- struct qemud_client *client ATTRIBUTE_UNUSED,
- virConnectPtr conn,
- remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *rerr,
- remote_node_get_cells_free_memory_args *args,
- remote_node_get_cells_free_memory_ret *ret)
+remoteDispatchNodeGetCellsFreeMemory(struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client ATTRIBUTE_UNUSED,
+ virConnectPtr conn,
+ remote_message_header *hdr ATTRIBUTE_UNUSED,
+ remote_error *rerr,
+ remote_node_get_cells_free_memory_args *args,
+ remote_node_get_cells_free_memory_ret *ret)
{
int err;
if (args->maxCells > REMOTE_NODE_MAX_CELLS) {
- remoteDispatchFormatError (rerr,
+ remoteDispatchFormatError(rerr,
"%s", _("maxCells > REMOTE_NODE_MAX_CELLS"));
return -1;
}
@@ -717,13 +717,13 @@ remoteDispatchNodeGetCellsFreeMemory (struct qemud_server *server ATTRIBUTE_UNUS
static int
-remoteDispatchNodeGetFreeMemory (struct qemud_server *server ATTRIBUTE_UNUSED,
- struct qemud_client *client ATTRIBUTE_UNUSED,
- virConnectPtr conn,
- remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *rerr,
- void *args ATTRIBUTE_UNUSED,
- remote_node_get_free_memory_ret *ret)
+remoteDispatchNodeGetFreeMemory(struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client ATTRIBUTE_UNUSED,
+ virConnectPtr conn,
+ remote_message_header *hdr ATTRIBUTE_UNUSED,
+ remote_error *rerr,
+ void *args ATTRIBUTE_UNUSED,
+ remote_node_get_free_memory_ret *ret)
{
unsigned long long freeMem;
@@ -738,25 +738,25 @@ remoteDispatchNodeGetFreeMemory (struct qemud_server *server ATTRIBUTE_UNUSED,
static int
-remoteDispatchDomainGetSchedulerType (struct qemud_server *server ATTRIBUTE_UNUSED,
- struct qemud_client *client ATTRIBUTE_UNUSED,
- virConnectPtr conn,
- remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *rerr,
- remote_domain_get_scheduler_type_args *args,
- remote_domain_get_scheduler_type_ret *ret)
+remoteDispatchDomainGetSchedulerType(struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client ATTRIBUTE_UNUSED,
+ virConnectPtr conn,
+ remote_message_header *hdr ATTRIBUTE_UNUSED,
+ remote_error *rerr,
+ remote_domain_get_scheduler_type_args *args,
+ remote_domain_get_scheduler_type_ret *ret)
{
virDomainPtr dom;
char *type;
int nparams;
- dom = get_nonnull_domain (conn, args->dom);
+ dom = get_nonnull_domain(conn, args->dom);
if (dom == NULL) {
remoteDispatchConnError(rerr, conn);
return -1;
}
- type = virDomainGetSchedulerType (dom, &nparams);
+ type = virDomainGetSchedulerType(dom, &nparams);
if (type == NULL) {
remoteDispatchConnError(rerr, conn);
virDomainFree(dom);
@@ -770,13 +770,13 @@ remoteDispatchDomainGetSchedulerType (struct qemud_server *server ATTRIBUTE_UNUS
}
static int
-remoteDispatchDomainGetSchedulerParameters (struct qemud_server *server ATTRIBUTE_UNUSED,
- struct qemud_client *client ATTRIBUTE_UNUSED,
- virConnectPtr conn,
- remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *rerr,
- remote_domain_get_scheduler_parameters_args *args,
- remote_domain_get_scheduler_parameters_ret *ret)
+remoteDispatchDomainGetSchedulerParameters(struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client ATTRIBUTE_UNUSED,
+ virConnectPtr conn,
+ remote_message_header *hdr ATTRIBUTE_UNUSED,
+ remote_error *rerr,
+ remote_domain_get_scheduler_parameters_args *args,
+ remote_domain_get_scheduler_parameters_ret *ret)
{
virDomainPtr dom;
virSchedParameterPtr params;
@@ -785,7 +785,7 @@ remoteDispatchDomainGetSchedulerParameters (struct qemud_server *server ATTRIBUT
nparams = args->nparams;
if (nparams > REMOTE_DOMAIN_SCHEDULER_PARAMETERS_MAX) {
- remoteDispatchFormatError (rerr, "%s", _("nparams too large"));
+ remoteDispatchFormatError(rerr, "%s", _("nparams too large"));
return -1;
}
if (VIR_ALLOC_N(params, nparams) < 0) {
@@ -793,14 +793,14 @@ remoteDispatchDomainGetSchedulerParameters (struct qemud_server *server ATTRIBUT
return -1;
}
- dom = get_nonnull_domain (conn, args->dom);
+ dom = get_nonnull_domain(conn, args->dom);
if (dom == NULL) {
VIR_FREE(params);
remoteDispatchConnError(rerr, conn);
return -1;
}
- r = virDomainGetSchedulerParameters (dom, params, &nparams);
+ r = virDomainGetSchedulerParameters(dom, params, &nparams);
if (r == -1) {
remoteDispatchConnError(rerr, conn);
virDomainFree(dom);
@@ -815,7 +815,7 @@ remoteDispatchDomainGetSchedulerParameters (struct qemud_server *server ATTRIBUT
for (i = 0; i < nparams; ++i) {
/* remoteDispatchClientRequest will free this: */
- ret->params.params_val[i].field = strdup (params[i].field);
+ ret->params.params_val[i].field = strdup(params[i].field);
if (ret->params.params_val[i].field == NULL)
goto oom;
@@ -834,7 +834,7 @@ remoteDispatchDomainGetSchedulerParameters (struct qemud_server *server ATTRIBUT
case VIR_DOMAIN_SCHED_FIELD_BOOLEAN:
ret->params.params_val[i].value.remote_sched_param_value_u.b = params[i].value.b; break;
default:
- remoteDispatchFormatError (rerr, "%s", _("unknown type"));
+ remoteDispatchFormatError(rerr, "%s", _("unknown type"));
goto cleanup;
}
}
@@ -854,13 +854,13 @@ cleanup:
}
static int
-remoteDispatchDomainSetSchedulerParameters (struct qemud_server *server ATTRIBUTE_UNUSED,
- struct qemud_client *client ATTRIBUTE_UNUSED,
- virConnectPtr conn,
- remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *rerr,
- remote_domain_set_scheduler_parameters_args *args,
- void *ret ATTRIBUTE_UNUSED)
+remoteDispatchDomainSetSchedulerParameters(struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client ATTRIBUTE_UNUSED,
+ virConnectPtr conn,
+ remote_message_header *hdr ATTRIBUTE_UNUSED,
+ remote_error *rerr,
+ remote_domain_set_scheduler_parameters_args *args,
+ void *ret ATTRIBUTE_UNUSED)
{
virDomainPtr dom;
int i, r, nparams;
@@ -869,7 +869,7 @@ remoteDispatchDomainSetSchedulerParameters (struct qemud_server *server ATTRIBUT
nparams = args->params.params_len;
if (nparams > REMOTE_DOMAIN_SCHEDULER_PARAMETERS_MAX) {
- remoteDispatchFormatError (rerr, "%s", _("nparams too large"));
+ remoteDispatchFormatError(rerr, "%s", _("nparams too large"));
return -1;
}
if (VIR_ALLOC_N(params, nparams) < 0) {
@@ -901,14 +901,14 @@ remoteDispatchDomainSetSchedulerParameters (struct qemud_server *server ATTRIBUT
}
}
- dom = get_nonnull_domain (conn, args->dom);
+ dom = get_nonnull_domain(conn, args->dom);
if (dom == NULL) {
VIR_FREE(params);
remoteDispatchConnError(rerr, conn);
return -1;
}
- r = virDomainSetSchedulerParameters (dom, params, nparams);
+ r = virDomainSetSchedulerParameters(dom, params, nparams);
VIR_FREE(params);
if (r == -1) {
remoteDispatchConnError(rerr, conn);
@@ -921,31 +921,31 @@ remoteDispatchDomainSetSchedulerParameters (struct qemud_server *server ATTRIBUT
}
static int
-remoteDispatchDomainBlockStats (struct qemud_server *server ATTRIBUTE_UNUSED,
- struct qemud_client *client ATTRIBUTE_UNUSED,
- virConnectPtr conn,
- remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *rerr,
- remote_domain_block_stats_args *args,
- remote_domain_block_stats_ret *ret)
+remoteDispatchDomainBlockStats(struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client ATTRIBUTE_UNUSED,
+ virConnectPtr conn,
+ remote_message_header *hdr ATTRIBUTE_UNUSED,
+ remote_error *rerr,
+ remote_domain_block_stats_args *args,
+ remote_domain_block_stats_ret *ret)
{
virDomainPtr dom;
char *path;
struct _virDomainBlockStats stats;
- dom = get_nonnull_domain (conn, args->dom);
+ dom = get_nonnull_domain(conn, args->dom);
if (dom == NULL) {
remoteDispatchConnError(rerr, conn);
return -1;
}
path = args->path;
- if (virDomainBlockStats (dom, path, &stats, sizeof stats) == -1) {
+ if (virDomainBlockStats(dom, path, &stats, sizeof stats) == -1) {
remoteDispatchConnError(rerr, conn);
- virDomainFree (dom);
+ virDomainFree(dom);
return -1;
}
- virDomainFree (dom);
+ virDomainFree(dom);
ret->rd_req = stats.rd_req;
ret->rd_bytes = stats.rd_bytes;
@@ -957,31 +957,31 @@ remoteDispatchDomainBlockStats (struct qemud_server *server ATTRIBUTE_UNUSED,
}
static int
-remoteDispatchDomainInterfaceStats (struct qemud_server *server ATTRIBUTE_UNUSED,
- struct qemud_client *client ATTRIBUTE_UNUSED,
- virConnectPtr conn,
- remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *rerr,
- remote_domain_interface_stats_args *args,
- remote_domain_interface_stats_ret *ret)
+remoteDispatchDomainInterfaceStats(struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client ATTRIBUTE_UNUSED,
+ virConnectPtr conn,
+ remote_message_header *hdr ATTRIBUTE_UNUSED,
+ remote_error *rerr,
+ remote_domain_interface_stats_args *args,
+ remote_domain_interface_stats_ret *ret)
{
virDomainPtr dom;
char *path;
struct _virDomainInterfaceStats stats;
- dom = get_nonnull_domain (conn, args->dom);
+ dom = get_nonnull_domain(conn, args->dom);
if (dom == NULL) {
remoteDispatchConnError(rerr, conn);
return -1;
}
path = args->path;
- if (virDomainInterfaceStats (dom, path, &stats, sizeof stats) == -1) {
+ if (virDomainInterfaceStats(dom, path, &stats, sizeof stats) == -1) {
remoteDispatchConnError(rerr, conn);
- virDomainFree (dom);
+ virDomainFree(dom);
return -1;
}
- virDomainFree (dom);
+ virDomainFree(dom);
ret->rx_bytes = stats.rx_bytes;
ret->rx_packets = stats.rx_packets;
@@ -996,25 +996,25 @@ remoteDispatchDomainInterfaceStats (struct qemud_server *server ATTRIBUTE_UNUSED
}
static int
-remoteDispatchDomainMemoryStats (struct qemud_server *server ATTRIBUTE_UNUSED,
- struct qemud_client *client ATTRIBUTE_UNUSED,
- virConnectPtr conn,
- remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *rerr,
- remote_domain_memory_stats_args *args,
- remote_domain_memory_stats_ret *ret)
+remoteDispatchDomainMemoryStats(struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client ATTRIBUTE_UNUSED,
+ virConnectPtr conn,
+ remote_message_header *hdr ATTRIBUTE_UNUSED,
+ remote_error *rerr,
+ remote_domain_memory_stats_args *args,
+ remote_domain_memory_stats_ret *ret)
{
virDomainPtr dom;
struct _virDomainMemoryStat *stats;
unsigned int nr_stats, i;
if (args->maxStats > REMOTE_DOMAIN_MEMORY_STATS_MAX) {
- remoteDispatchFormatError (rerr, "%s",
+ remoteDispatchFormatError(rerr, "%s",
_("maxStats > REMOTE_DOMAIN_MEMORY_STATS_MAX"));
return -1;
}
- dom = get_nonnull_domain (conn, args->dom);
+ dom = get_nonnull_domain(conn, args->dom);
if (dom == NULL) {
remoteDispatchConnError(rerr, conn);
return -1;
@@ -1022,19 +1022,19 @@ remoteDispatchDomainMemoryStats (struct qemud_server *server ATTRIBUTE_UNUSED,
/* Allocate stats array for making dispatch call */
if (VIR_ALLOC_N(stats, args->maxStats) < 0) {
- virDomainFree (dom);
+ virDomainFree(dom);
remoteDispatchOOMError(rerr);
return -1;
}
- nr_stats = virDomainMemoryStats (dom, stats, args->maxStats, 0);
+ nr_stats = virDomainMemoryStats(dom, stats, args->maxStats, 0);
if (nr_stats == -1) {
VIR_FREE(stats);
remoteDispatchConnError(rerr, conn);
- virDomainFree (dom);
+ virDomainFree(dom);
return -1;
}
- virDomainFree (dom);
+ virDomainFree(dom);
/* Allocate return buffer */
if (VIR_ALLOC_N(ret->stats.stats_val, args->maxStats) < 0) {
@@ -1054,13 +1054,13 @@ remoteDispatchDomainMemoryStats (struct qemud_server *server ATTRIBUTE_UNUSED,
}
static int
-remoteDispatchDomainBlockPeek (struct qemud_server *server ATTRIBUTE_UNUSED,
- struct qemud_client *client ATTRIBUTE_UNUSED,
- virConnectPtr conn,
- remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *rerr,
- remote_domain_block_peek_args *args,
- remote_domain_block_peek_ret *ret)
+remoteDispatchDomainBlockPeek(struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client ATTRIBUTE_UNUSED,
+ virConnectPtr conn,
+ remote_message_header *hdr ATTRIBUTE_UNUSED,
+ remote_error *rerr,
+ remote_domain_block_peek_args *args,
+ remote_domain_block_peek_ret *ret)
{
virDomainPtr dom;
char *path;
@@ -1068,7 +1068,7 @@ remoteDispatchDomainBlockPeek (struct qemud_server *server ATTRIBUTE_UNUSED,
size_t size;
unsigned int flags;
- dom = get_nonnull_domain (conn, args->dom);
+ dom = get_nonnull_domain(conn, args->dom);
if (dom == NULL) {
remoteDispatchConnError(rerr, conn);
return -1;
@@ -1079,46 +1079,46 @@ remoteDispatchDomainBlockPeek (struct qemud_server *server ATTRIBUTE_UNUSED,
flags = args->flags;
if (size > REMOTE_DOMAIN_BLOCK_PEEK_BUFFER_MAX) {
- virDomainFree (dom);
- remoteDispatchFormatError (rerr,
+ virDomainFree(dom);
+ remoteDispatchFormatError(rerr,
"%s", _("size > maximum buffer size"));
return -1;
}
ret->buffer.buffer_len = size;
- if (VIR_ALLOC_N (ret->buffer.buffer_val, size) < 0) {
- virDomainFree (dom);
+ if (VIR_ALLOC_N(ret->buffer.buffer_val, size) < 0) {
+ virDomainFree(dom);
remoteDispatchOOMError(rerr);
return -1;
}
- if (virDomainBlockPeek (dom, path, offset, size,
- ret->buffer.buffer_val, flags) == -1) {
- /* free (ret->buffer.buffer_val); - caller frees */
+ if (virDomainBlockPeek(dom, path, offset, size,
+ ret->buffer.buffer_val, flags) == -1) {
+ /* free(ret->buffer.buffer_val); - caller frees */
remoteDispatchConnError(rerr, conn);
- virDomainFree (dom);
+ virDomainFree(dom);
return -1;
}
- virDomainFree (dom);
+ virDomainFree(dom);
return 0;
}
static int
-remoteDispatchDomainMemoryPeek (struct qemud_server *server ATTRIBUTE_UNUSED,
- struct qemud_client *client ATTRIBUTE_UNUSED,
- virConnectPtr conn,
- remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *rerr,
- remote_domain_memory_peek_args *args,
- remote_domain_memory_peek_ret *ret)
+remoteDispatchDomainMemoryPeek(struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client ATTRIBUTE_UNUSED,
+ virConnectPtr conn,
+ remote_message_header *hdr ATTRIBUTE_UNUSED,
+ remote_error *rerr,
+ remote_domain_memory_peek_args *args,
+ remote_domain_memory_peek_ret *ret)
{
virDomainPtr dom;
unsigned long long offset;
size_t size;
unsigned int flags;
- dom = get_nonnull_domain (conn, args->dom);
+ dom = get_nonnull_domain(conn, args->dom);
if (dom == NULL) {
remoteDispatchConnError(rerr, conn);
return -1;
@@ -1128,49 +1128,49 @@ remoteDispatchDomainMemoryPeek (struct qemud_server *server ATTRIBUTE_UNUSED,
flags = args->flags;
if (size > REMOTE_DOMAIN_MEMORY_PEEK_BUFFER_MAX) {
- virDomainFree (dom);
- remoteDispatchFormatError (rerr,
+ virDomainFree(dom);
+ remoteDispatchFormatError(rerr,
"%s", _("size > maximum buffer size"));
return -1;
}
ret->buffer.buffer_len = size;
- if (VIR_ALLOC_N (ret->buffer.buffer_val, size) < 0) {
- virDomainFree (dom);
+ if (VIR_ALLOC_N(ret->buffer.buffer_val, size) < 0) {
+ virDomainFree(dom);
remoteDispatchOOMError(rerr);
return -1;
}
- if (virDomainMemoryPeek (dom, offset, size,
- ret->buffer.buffer_val, flags) == -1) {
- /* free (ret->buffer.buffer_val); - caller frees */
+ if (virDomainMemoryPeek(dom, offset, size,
+ ret->buffer.buffer_val, flags) == -1) {
+ /* free(ret->buffer.buffer_val); - caller frees */
remoteDispatchConnError(rerr, conn);
- virDomainFree (dom);
+ virDomainFree(dom);
return -1;
}
- virDomainFree (dom);
+ virDomainFree(dom);
return 0;
}
static int
-remoteDispatchDomainAttachDevice (struct qemud_server *server ATTRIBUTE_UNUSED,
- struct qemud_client *client ATTRIBUTE_UNUSED,
- virConnectPtr conn,
- remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *rerr,
- remote_domain_attach_device_args *args,
- void *ret ATTRIBUTE_UNUSED)
+remoteDispatchDomainAttachDevice(struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client ATTRIBUTE_UNUSED,
+ virConnectPtr conn,
+ remote_message_header *hdr ATTRIBUTE_UNUSED,
+ remote_error *rerr,
+ remote_domain_attach_device_args *args,
+ void *ret ATTRIBUTE_UNUSED)
{
virDomainPtr dom;
- dom = get_nonnull_domain (conn, args->dom);
+ dom = get_nonnull_domain(conn, args->dom);
if (dom == NULL) {
remoteDispatchConnError(rerr, conn);
return -1;
}
- if (virDomainAttachDevice (dom, args->xml) == -1) {
+ if (virDomainAttachDevice(dom, args->xml) == -1) {
remoteDispatchConnError(rerr, conn);
virDomainFree(dom);
return -1;
@@ -1180,23 +1180,23 @@ remoteDispatchDomainAttachDevice (struct qemud_server *server ATTRIBUTE_UNUSED,
}
static int
-remoteDispatchDomainAttachDeviceFlags (struct qemud_server *server ATTRIBUTE_UNUSED,
- struct qemud_client *client ATTRIBUTE_UNUSED,
- virConnectPtr conn,
- remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *rerr,
- remote_domain_attach_device_flags_args *args,
- void *ret ATTRIBUTE_UNUSED)
+remoteDispatchDomainAttachDeviceFlags(struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client ATTRIBUTE_UNUSED,
+ virConnectPtr conn,
+ remote_message_header *hdr ATTRIBUTE_UNUSED,
+ remote_error *rerr,
+ remote_domain_attach_device_flags_args *args,
+ void *ret ATTRIBUTE_UNUSED)
{
virDomainPtr dom;
- dom = get_nonnull_domain (conn, args->dom);
+ dom = get_nonnull_domain(conn, args->dom);
if (dom == NULL) {
remoteDispatchConnError(rerr, conn);
return -1;
}
- if (virDomainAttachDeviceFlags (dom, args->xml, args->flags) == -1) {
+ if (virDomainAttachDeviceFlags(dom, args->xml, args->flags) == -1) {
remoteDispatchConnError(rerr, conn);
virDomainFree(dom);
return -1;
@@ -1206,23 +1206,23 @@ remoteDispatchDomainAttachDeviceFlags (struct qemud_server *server ATTRIBUTE_UNU
}
static int
-remoteDispatchDomainUpdateDeviceFlags (struct qemud_server *server ATTRIBUTE_UNUSED,
- struct qemud_client *client ATTRIBUTE_UNUSED,
- virConnectPtr conn,
- remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *rerr,
- remote_domain_update_device_flags_args *args,
- void *ret ATTRIBUTE_UNUSED)
+remoteDispatchDomainUpdateDeviceFlags(struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client ATTRIBUTE_UNUSED,
+ virConnectPtr conn,
+ remote_message_header *hdr ATTRIBUTE_UNUSED,
+ remote_error *rerr,
+ remote_domain_update_device_flags_args *args,
+ void *ret ATTRIBUTE_UNUSED)
{
virDomainPtr dom;
- dom = get_nonnull_domain (conn, args->dom);
+ dom = get_nonnull_domain(conn, args->dom);
if (dom == NULL) {
remoteDispatchConnError(rerr, conn);
return -1;
}
- if (virDomainUpdateDeviceFlags (dom, args->xml, args->flags) == -1) {
+ if (virDomainUpdateDeviceFlags(dom, args->xml, args->flags) == -1) {
remoteDispatchConnError(rerr, conn);
virDomainFree(dom);
return -1;
@@ -1232,23 +1232,23 @@ remoteDispatchDomainUpdateDeviceFlags (struct qemud_server *server ATTRIBUTE_UNU
}
static int
-remoteDispatchDomainCreate (struct qemud_server *server ATTRIBUTE_UNUSED,
- struct qemud_client *client ATTRIBUTE_UNUSED,
- virConnectPtr conn,
- remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *rerr,
- remote_domain_create_args *args,
- void *ret ATTRIBUTE_UNUSED)
+remoteDispatchDomainCreate(struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client ATTRIBUTE_UNUSED,
+ virConnectPtr conn,
+ remote_message_header *hdr ATTRIBUTE_UNUSED,
+ remote_error *rerr,
+ remote_domain_create_args *args,
+ void *ret ATTRIBUTE_UNUSED)
{
virDomainPtr dom;
- dom = get_nonnull_domain (conn, args->dom);
+ dom = get_nonnull_domain(conn, args->dom);
if (dom == NULL) {
remoteDispatchConnError(rerr, conn);
return -1;
}
- if (virDomainCreate (dom) == -1) {
+ if (virDomainCreate(dom) == -1) {
remoteDispatchConnError(rerr, conn);
virDomainFree(dom);
return -1;
@@ -1258,97 +1258,97 @@ remoteDispatchDomainCreate (struct qemud_server *server ATTRIBUTE_UNUSED,
}
static int
-remoteDispatchDomainCreateWithFlags (struct qemud_server *server ATTRIBUTE_UNUSED,
- struct qemud_client *client ATTRIBUTE_UNUSED,
- virConnectPtr conn,
- remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *rerr,
- remote_domain_create_with_flags_args *args,
- remote_domain_create_with_flags_ret *ret)
+remoteDispatchDomainCreateWithFlags(struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client ATTRIBUTE_UNUSED,
+ virConnectPtr conn,
+ remote_message_header *hdr ATTRIBUTE_UNUSED,
+ remote_error *rerr,
+ remote_domain_create_with_flags_args *args,
+ remote_domain_create_with_flags_ret *ret)
{
virDomainPtr dom;
- dom = get_nonnull_domain (conn, args->dom);
+ dom = get_nonnull_domain(conn, args->dom);
if (dom == NULL) {
remoteDispatchConnError(rerr, conn);
return -1;
}
- if (virDomainCreateWithFlags (dom, args->flags) == -1) {
+ if (virDomainCreateWithFlags(dom, args->flags) == -1) {
remoteDispatchConnError(rerr, conn);
virDomainFree(dom);
return -1;
}
- make_nonnull_domain (&ret->dom, dom);
+ make_nonnull_domain(&ret->dom, dom);
virDomainFree(dom);
return 0;
}
static int
-remoteDispatchDomainCreateXml (struct qemud_server *server ATTRIBUTE_UNUSED,
- struct qemud_client *client ATTRIBUTE_UNUSED,
- virConnectPtr conn,
- remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *rerr,
- remote_domain_create_xml_args *args,
- remote_domain_create_xml_ret *ret)
+remoteDispatchDomainCreateXml(struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client ATTRIBUTE_UNUSED,
+ virConnectPtr conn,
+ remote_message_header *hdr ATTRIBUTE_UNUSED,
+ remote_error *rerr,
+ remote_domain_create_xml_args *args,
+ remote_domain_create_xml_ret *ret)
{
virDomainPtr dom;
- dom = virDomainCreateXML (conn, args->xml_desc, args->flags);
+ dom = virDomainCreateXML(conn, args->xml_desc, args->flags);
if (dom == NULL) {
remoteDispatchConnError(rerr, conn);
return -1;
}
- make_nonnull_domain (&ret->dom, dom);
+ make_nonnull_domain(&ret->dom, dom);
virDomainFree(dom);
return 0;
}
static int
-remoteDispatchDomainDefineXml (struct qemud_server *server ATTRIBUTE_UNUSED,
- struct qemud_client *client ATTRIBUTE_UNUSED,
- virConnectPtr conn,
- remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *rerr,
- remote_domain_define_xml_args *args,
- remote_domain_define_xml_ret *ret)
+remoteDispatchDomainDefineXml(struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client ATTRIBUTE_UNUSED,
+ virConnectPtr conn,
+ remote_message_header *hdr ATTRIBUTE_UNUSED,
+ remote_error *rerr,
+ remote_domain_define_xml_args *args,
+ remote_domain_define_xml_ret *ret)
{
virDomainPtr dom;
- dom = virDomainDefineXML (conn, args->xml);
+ dom = virDomainDefineXML(conn, args->xml);
if (dom == NULL) {
remoteDispatchConnError(rerr, conn);
return -1;
}
- make_nonnull_domain (&ret->dom, dom);
+ make_nonnull_domain(&ret->dom, dom);
virDomainFree(dom);
return 0;
}
static int
-remoteDispatchDomainDestroy (struct qemud_server *server ATTRIBUTE_UNUSED,
- struct qemud_client *client ATTRIBUTE_UNUSED,
- virConnectPtr conn,
- remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *rerr,
- remote_domain_destroy_args *args,
- void *ret ATTRIBUTE_UNUSED)
+remoteDispatchDomainDestroy(struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client ATTRIBUTE_UNUSED,
+ virConnectPtr conn,
+ remote_message_header *hdr ATTRIBUTE_UNUSED,
+ remote_error *rerr,
+ remote_domain_destroy_args *args,
+ void *ret ATTRIBUTE_UNUSED)
{
virDomainPtr dom;
- dom = get_nonnull_domain (conn, args->dom);
+ dom = get_nonnull_domain(conn, args->dom);
if (dom == NULL) {
remoteDispatchConnError(rerr, conn);
return -1;
}
- if (virDomainDestroy (dom) == -1) {
+ if (virDomainDestroy(dom) == -1) {
remoteDispatchConnError(rerr, conn);
virDomainFree(dom);
return -1;
@@ -1358,23 +1358,23 @@ remoteDispatchDomainDestroy (struct qemud_server *server ATTRIBUTE_UNUSED,
}
static int
-remoteDispatchDomainDetachDevice (struct qemud_server *server ATTRIBUTE_UNUSED,
- struct qemud_client *client ATTRIBUTE_UNUSED,
- virConnectPtr conn,
- remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *rerr,
- remote_domain_detach_device_args *args,
- void *ret ATTRIBUTE_UNUSED)
+remoteDispatchDomainDetachDevice(struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client ATTRIBUTE_UNUSED,
+ virConnectPtr conn,
+ remote_message_header *hdr ATTRIBUTE_UNUSED,
+ remote_error *rerr,
+ remote_domain_detach_device_args *args,
+ void *ret ATTRIBUTE_UNUSED)
{
virDomainPtr dom;
- dom = get_nonnull_domain (conn, args->dom);
+ dom = get_nonnull_domain(conn, args->dom);
if (dom == NULL) {
remoteDispatchConnError(rerr, conn);
return -1;
}
- if (virDomainDetachDevice (dom, args->xml) == -1) {
+ if (virDomainDetachDevice(dom, args->xml) == -1) {
remoteDispatchConnError(rerr, conn);
virDomainFree(dom);
return -1;
@@ -1385,23 +1385,23 @@ remoteDispatchDomainDetachDevice (struct qemud_server *server ATTRIBUTE_UNUSED,
}
static int
-remoteDispatchDomainDetachDeviceFlags (struct qemud_server *server ATTRIBUTE_UNUSED,
- struct qemud_client *client ATTRIBUTE_UNUSED,
- virConnectPtr conn,
- remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *rerr,
- remote_domain_detach_device_flags_args *args,
- void *ret ATTRIBUTE_UNUSED)
+remoteDispatchDomainDetachDeviceFlags(struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client ATTRIBUTE_UNUSED,
+ virConnectPtr conn,
+ remote_message_header *hdr ATTRIBUTE_UNUSED,
+ remote_error *rerr,
+ remote_domain_detach_device_flags_args *args,
+ void *ret ATTRIBUTE_UNUSED)
{
virDomainPtr dom;
- dom = get_nonnull_domain (conn, args->dom);
+ dom = get_nonnull_domain(conn, args->dom);
if (dom == NULL) {
remoteDispatchConnError(rerr, conn);
return -1;
}
- if (virDomainDetachDeviceFlags (dom, args->xml, args->flags) == -1) {
+ if (virDomainDetachDeviceFlags(dom, args->xml, args->flags) == -1) {
remoteDispatchConnError(rerr, conn);
virDomainFree(dom);
return -1;
@@ -1412,24 +1412,24 @@ remoteDispatchDomainDetachDeviceFlags (struct qemud_server *server ATTRIBUTE_UNU
}
static int
-remoteDispatchDomainDumpXml (struct qemud_server *server ATTRIBUTE_UNUSED,
- struct qemud_client *client ATTRIBUTE_UNUSED,
- virConnectPtr conn,
- remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *rerr,
- remote_domain_dump_xml_args *args,
- remote_domain_dump_xml_ret *ret)
+remoteDispatchDomainDumpXml(struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client ATTRIBUTE_UNUSED,
+ virConnectPtr conn,
+ remote_message_header *hdr ATTRIBUTE_UNUSED,
+ remote_error *rerr,
+ remote_domain_dump_xml_args *args,
+ remote_domain_dump_xml_ret *ret)
{
virDomainPtr dom;
- dom = get_nonnull_domain (conn, args->dom);
+ dom = get_nonnull_domain(conn, args->dom);
if (dom == NULL) {
remoteDispatchConnError(rerr, conn);
return -1;
}
/* remoteDispatchClientRequest will free this. */
- ret->xml = virDomainGetXMLDesc (dom, args->flags);
+ ret->xml = virDomainGetXMLDesc(dom, args->flags);
if (!ret->xml) {
remoteDispatchConnError(rerr, conn);
virDomainFree(dom);
@@ -1440,19 +1440,19 @@ remoteDispatchDomainDumpXml (struct qemud_server *server ATTRIBUTE_UNUSED,
}
static int
-remoteDispatchDomainXmlFromNative (struct qemud_server *server ATTRIBUTE_UNUSED,
- struct qemud_client *client ATTRIBUTE_UNUSED,
- virConnectPtr conn,
- remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *rerr,
- remote_domain_xml_from_native_args *args,
- remote_domain_xml_from_native_ret *ret)
+remoteDispatchDomainXmlFromNative(struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client ATTRIBUTE_UNUSED,
+ virConnectPtr conn,
+ remote_message_header *hdr ATTRIBUTE_UNUSED,
+ remote_error *rerr,
+ remote_domain_xml_from_native_args *args,
+ remote_domain_xml_from_native_ret *ret)
{
/* remoteDispatchClientRequest will free this. */
- ret->domainXml = virConnectDomainXMLFromNative (conn,
- args->nativeFormat,
- args->nativeConfig,
- args->flags);
+ ret->domainXml = virConnectDomainXMLFromNative(conn,
+ args->nativeFormat,
+ args->nativeConfig,
+ args->flags);
if (!ret->domainXml) {
remoteDispatchConnError(rerr, conn);
return -1;
@@ -1461,19 +1461,19 @@ remoteDispatchDomainXmlFromNative (struct qemud_server *server ATTRIBUTE_UNUSED,
}
static int
-remoteDispatchDomainXmlToNative (struct qemud_server *server ATTRIBUTE_UNUSED,
- struct qemud_client *client ATTRIBUTE_UNUSED,
- virConnectPtr conn,
- remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *rerr,
- remote_domain_xml_to_native_args *args,
- remote_domain_xml_to_native_ret *ret)
+remoteDispatchDomainXmlToNative(struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client ATTRIBUTE_UNUSED,
+ virConnectPtr conn,
+ remote_message_header *hdr ATTRIBUTE_UNUSED,
+ remote_error *rerr,
+ remote_domain_xml_to_native_args *args,
+ remote_domain_xml_to_native_ret *ret)
{
/* remoteDispatchClientRequest will free this. */
- ret->nativeConfig = virConnectDomainXMLToNative (conn,
- args->nativeFormat,
- args->domainXml,
- args->flags);
+ ret->nativeConfig = virConnectDomainXMLToNative(conn,
+ args->nativeFormat,
+ args->domainXml,
+ args->flags);
if (!ret->nativeConfig) {
remoteDispatchConnError(rerr, conn);
return -1;
@@ -1483,23 +1483,23 @@ remoteDispatchDomainXmlToNative (struct qemud_server *server ATTRIBUTE_UNUSED,
static int
-remoteDispatchDomainGetAutostart (struct qemud_server *server ATTRIBUTE_UNUSED,
- struct qemud_client *client ATTRIBUTE_UNUSED,
- virConnectPtr conn,
- remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *rerr,
- remote_domain_get_autostart_args *args,
- remote_domain_get_autostart_ret *ret)
+remoteDispatchDomainGetAutostart(struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client ATTRIBUTE_UNUSED,
+ virConnectPtr conn,
+ remote_message_header *hdr ATTRIBUTE_UNUSED,
+ remote_error *rerr,
+ remote_domain_get_autostart_args *args,
+ remote_domain_get_autostart_ret *ret)
{
virDomainPtr dom;
- dom = get_nonnull_domain (conn, args->dom);
+ dom = get_nonnull_domain(conn, args->dom);
if (dom == NULL) {
remoteDispatchConnError(rerr, conn);
return -1;
}
- if (virDomainGetAutostart (dom, &ret->autostart) == -1) {
+ if (virDomainGetAutostart(dom, &ret->autostart) == -1) {
remoteDispatchConnError(rerr, conn);
virDomainFree(dom);
return -1;
@@ -1509,24 +1509,24 @@ remoteDispatchDomainGetAutostart (struct qemud_server *server ATTRIBUTE_UNUSED,
}
static int
-remoteDispatchDomainGetInfo (struct qemud_server *server ATTRIBUTE_UNUSED,
- struct qemud_client *client ATTRIBUTE_UNUSED,
- virConnectPtr conn,
- remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *rerr,
- remote_domain_get_info_args *args,
- remote_domain_get_info_ret *ret)
+remoteDispatchDomainGetInfo(struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client ATTRIBUTE_UNUSED,
+ virConnectPtr conn,
+ remote_message_header *hdr ATTRIBUTE_UNUSED,
+ remote_error *rerr,
+ remote_domain_get_info_args *args,
+ remote_domain_get_info_ret *ret)
{
virDomainPtr dom;
virDomainInfo info;
- dom = get_nonnull_domain (conn, args->dom);
+ dom = get_nonnull_domain(conn, args->dom);
if (dom == NULL) {
remoteDispatchConnError(rerr, conn);
return -1;
}
- if (virDomainGetInfo (dom, &info) == -1) {
+ if (virDomainGetInfo(dom, &info) == -1) {
remoteDispatchConnError(rerr, conn);
virDomainFree(dom);
return -1;
@@ -1544,23 +1544,23 @@ remoteDispatchDomainGetInfo (struct qemud_server *server ATTRIBUTE_UNUSED,
}
static int
-remoteDispatchDomainGetMaxMemory (struct qemud_server *server ATTRIBUTE_UNUSED,
- struct qemud_client *client ATTRIBUTE_UNUSED,
- virConnectPtr conn,
- remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *rerr,
- remote_domain_get_max_memory_args *args,
- remote_domain_get_max_memory_ret *ret)
+remoteDispatchDomainGetMaxMemory(struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client ATTRIBUTE_UNUSED,
+ virConnectPtr conn,
+ remote_message_header *hdr ATTRIBUTE_UNUSED,
+ remote_error *rerr,
+ remote_domain_get_max_memory_args *args,
+ remote_domain_get_max_memory_ret *ret)
{
virDomainPtr dom;
- dom = get_nonnull_domain (conn, args->dom);
+ dom = get_nonnull_domain(conn, args->dom);
if (dom == NULL) {
remoteDispatchConnError(rerr, conn);
return -1;
}
- ret->memory = virDomainGetMaxMemory (dom);
+ ret->memory = virDomainGetMaxMemory(dom);
if (ret->memory == 0) {
remoteDispatchConnError(rerr, conn);
virDomainFree(dom);
@@ -1571,23 +1571,23 @@ remoteDispatchDomainGetMaxMemory (struct qemud_server *server ATTRIBUTE_UNUSED,
}
static int
-remoteDispatchDomainGetMaxVcpus (struct qemud_server *server ATTRIBUTE_UNUSED,
- struct qemud_client *client ATTRIBUTE_UNUSED,
- virConnectPtr conn,
- remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *rerr,
- remote_domain_get_max_vcpus_args *args,
- remote_domain_get_max_vcpus_ret *ret)
+remoteDispatchDomainGetMaxVcpus(struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client ATTRIBUTE_UNUSED,
+ virConnectPtr conn,
+ remote_message_header *hdr ATTRIBUTE_UNUSED,
+ remote_error *rerr,
+ remote_domain_get_max_vcpus_args *args,
+ remote_domain_get_max_vcpus_ret *ret)
{
virDomainPtr dom;
- dom = get_nonnull_domain (conn, args->dom);
+ dom = get_nonnull_domain(conn, args->dom);
if (dom == NULL) {
remoteDispatchConnError(rerr, conn);
return -1;
}
- ret->num = virDomainGetMaxVcpus (dom);
+ ret->num = virDomainGetMaxVcpus(dom);
if (ret->num == -1) {
remoteDispatchConnError(rerr, conn);
virDomainFree(dom);
@@ -1678,24 +1678,24 @@ remoteDispatchNodeGetSecurityModel(struct qemud_server *server ATTRIBUTE_UNUSED,
}
static int
-remoteDispatchDomainGetOsType (struct qemud_server *server ATTRIBUTE_UNUSED,
- struct qemud_client *client ATTRIBUTE_UNUSED,
- virConnectPtr conn,
- remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *rerr,
- remote_domain_get_os_type_args *args,
- remote_domain_get_os_type_ret *ret)
+remoteDispatchDomainGetOsType(struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client ATTRIBUTE_UNUSED,
+ virConnectPtr conn,
+ remote_message_header *hdr ATTRIBUTE_UNUSED,
+ remote_error *rerr,
+ remote_domain_get_os_type_args *args,
+ remote_domain_get_os_type_ret *ret)
{
virDomainPtr dom;
- dom = get_nonnull_domain (conn, args->dom);
+ dom = get_nonnull_domain(conn, args->dom);
if (dom == NULL) {
remoteDispatchConnError(rerr, conn);
return -1;
}
/* remoteDispatchClientRequest will free this */
- ret->type = virDomainGetOSType (dom);
+ ret->type = virDomainGetOSType(dom);
if (ret->type == NULL) {
remoteDispatchConnError(rerr, conn);
virDomainFree(dom);
@@ -1706,20 +1706,20 @@ remoteDispatchDomainGetOsType (struct qemud_server *server ATTRIBUTE_UNUSED,
}
static int
-remoteDispatchDomainGetVcpus (struct qemud_server *server ATTRIBUTE_UNUSED,
- struct qemud_client *client ATTRIBUTE_UNUSED,
- virConnectPtr conn,
- remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *rerr,
- remote_domain_get_vcpus_args *args,
- remote_domain_get_vcpus_ret *ret)
+remoteDispatchDomainGetVcpus(struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client ATTRIBUTE_UNUSED,
+ virConnectPtr conn,
+ remote_message_header *hdr ATTRIBUTE_UNUSED,
+ remote_error *rerr,
+ remote_domain_get_vcpus_args *args,
+ remote_domain_get_vcpus_ret *ret)
{
virDomainPtr dom = NULL;
virVcpuInfoPtr info = NULL;
unsigned char *cpumaps = NULL;
int info_len, i;
- dom = get_nonnull_domain (conn, args->dom);
+ dom = get_nonnull_domain(conn, args->dom);
if (dom == NULL) {
remoteDispatchConnError(rerr, conn);
return -1;
@@ -1727,13 +1727,13 @@ remoteDispatchDomainGetVcpus (struct qemud_server *server ATTRIBUTE_UNUSED,
if (args->maxinfo > REMOTE_VCPUINFO_MAX) {
virDomainFree(dom);
- remoteDispatchFormatError (rerr, "%s", _("maxinfo > REMOTE_VCPUINFO_MAX"));
+ remoteDispatchFormatError(rerr, "%s", _("maxinfo > REMOTE_VCPUINFO_MAX"));
return -1;
}
if (args->maxinfo * args->maplen > REMOTE_CPUMAPS_MAX) {
virDomainFree(dom);
- remoteDispatchFormatError (rerr, "%s", _("maxinfo * maplen > REMOTE_CPUMAPS_MAX"));
+ remoteDispatchFormatError(rerr, "%s", _("maxinfo * maplen > REMOTE_CPUMAPS_MAX"));
return -1;
}
@@ -1744,9 +1744,9 @@ remoteDispatchDomainGetVcpus (struct qemud_server *server ATTRIBUTE_UNUSED,
VIR_ALLOC_N(cpumaps, args->maxinfo * args->maplen) < 0)
goto oom;
- info_len = virDomainGetVcpus (dom,
- info, args->maxinfo,
- cpumaps, args->maplen);
+ info_len = virDomainGetVcpus(dom,
+ info, args->maxinfo,
+ cpumaps, args->maplen);
if (info_len == -1) {
remoteDispatchConnError(rerr, conn);
VIR_FREE(info);
@@ -1787,23 +1787,23 @@ oom:
}
static int
-remoteDispatchDomainGetVcpusFlags (struct qemud_server *server ATTRIBUTE_UNUSED,
- struct qemud_client *client ATTRIBUTE_UNUSED,
- virConnectPtr conn,
- remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *rerr,
- remote_domain_get_vcpus_flags_args *args,
- remote_domain_get_vcpus_flags_ret *ret)
+remoteDispatchDomainGetVcpusFlags(struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client ATTRIBUTE_UNUSED,
+ virConnectPtr conn,
+ remote_message_header *hdr ATTRIBUTE_UNUSED,
+ remote_error *rerr,
+ remote_domain_get_vcpus_flags_args *args,
+ remote_domain_get_vcpus_flags_ret *ret)
{
virDomainPtr dom;
- dom = get_nonnull_domain (conn, args->dom);
+ dom = get_nonnull_domain(conn, args->dom);
if (dom == NULL) {
remoteDispatchConnError(rerr, conn);
return -1;
}
- ret->num = virDomainGetVcpusFlags (dom, args->flags);
+ ret->num = virDomainGetVcpusFlags(dom, args->flags);
if (ret->num == -1) {
remoteDispatchConnError(rerr, conn);
virDomainFree(dom);
@@ -1814,13 +1814,13 @@ remoteDispatchDomainGetVcpusFlags (struct qemud_server *server ATTRIBUTE_UNUSED,
}
static int
-remoteDispatchDomainMigratePrepare (struct qemud_server *server ATTRIBUTE_UNUSED,
- struct qemud_client *client ATTRIBUTE_UNUSED,
- virConnectPtr conn,
- remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *rerr,
- remote_domain_migrate_prepare_args *args,
- remote_domain_migrate_prepare_ret *ret)
+remoteDispatchDomainMigratePrepare(struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client ATTRIBUTE_UNUSED,
+ virConnectPtr conn,
+ remote_message_header *hdr ATTRIBUTE_UNUSED,
+ remote_error *rerr,
+ remote_domain_migrate_prepare_args *args,
+ remote_domain_migrate_prepare_ret *ret)
{
int r;
char *cookie = NULL;
@@ -1838,9 +1838,9 @@ remoteDispatchDomainMigratePrepare (struct qemud_server *server ATTRIBUTE_UNUSED
return -1;
}
- r = virDomainMigratePrepare (conn, &cookie, &cookielen,
- uri_in, uri_out,
- args->flags, dname, args->resource);
+ r = virDomainMigratePrepare(conn, &cookie, &cookielen,
+ uri_in, uri_out,
+ args->flags, dname, args->resource);
if (r == -1) {
VIR_FREE(uri_out);
remoteDispatchConnError(rerr, conn);
@@ -1863,19 +1863,19 @@ remoteDispatchDomainMigratePrepare (struct qemud_server *server ATTRIBUTE_UNUSED
}
static int
-remoteDispatchDomainMigratePerform (struct qemud_server *server ATTRIBUTE_UNUSED,
- struct qemud_client *client ATTRIBUTE_UNUSED,
- virConnectPtr conn,
- remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *rerr,
- remote_domain_migrate_perform_args *args,
- void *ret ATTRIBUTE_UNUSED)
+remoteDispatchDomainMigratePerform(struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client ATTRIBUTE_UNUSED,
+ virConnectPtr conn,
+ remote_message_header *hdr ATTRIBUTE_UNUSED,
+ remote_error *rerr,
+ remote_domain_migrate_perform_args *args,
+ void *ret ATTRIBUTE_UNUSED)
{
int r;
virDomainPtr dom;
char *dname;
- dom = get_nonnull_domain (conn, args->dom);
+ dom = get_nonnull_domain(conn, args->dom);
if (dom == NULL) {
remoteDispatchConnError(rerr, conn);
return -1;
@@ -1883,56 +1883,56 @@ remoteDispatchDomainMigratePerform (struct qemud_server *server ATTRIBUTE_UNUSED
dname = args->dname == NULL ? NULL : *args->dname;
- r = virDomainMigratePerform (dom,
- args->cookie.cookie_val,
- args->cookie.cookie_len,
- args->uri,
- args->flags, dname, args->resource);
+ r = virDomainMigratePerform(dom,
+ args->cookie.cookie_val,
+ args->cookie.cookie_len,
+ args->uri,
+ args->flags, dname, args->resource);
if (r == -1) {
remoteDispatchConnError(rerr, conn);
- virDomainFree (dom);
+ virDomainFree(dom);
return -1;
}
- virDomainFree (dom);
+ virDomainFree(dom);
return 0;
}
static int
-remoteDispatchDomainMigrateFinish (struct qemud_server *server ATTRIBUTE_UNUSED,
- struct qemud_client *client ATTRIBUTE_UNUSED,
- virConnectPtr conn,
- remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *rerr,
- remote_domain_migrate_finish_args *args,
- remote_domain_migrate_finish_ret *ret)
+remoteDispatchDomainMigrateFinish(struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client ATTRIBUTE_UNUSED,
+ virConnectPtr conn,
+ remote_message_header *hdr ATTRIBUTE_UNUSED,
+ remote_error *rerr,
+ remote_domain_migrate_finish_args *args,
+ remote_domain_migrate_finish_ret *ret)
{
virDomainPtr ddom;
- CHECK_CONN (client);
+ CHECK_CONN(client);
- ddom = virDomainMigrateFinish (conn, args->dname,
- args->cookie.cookie_val,
- args->cookie.cookie_len,
- args->uri,
- args->flags);
+ ddom = virDomainMigrateFinish(conn, args->dname,
+ args->cookie.cookie_val,
+ args->cookie.cookie_len,
+ args->uri,
+ args->flags);
if (ddom == NULL) {
remoteDispatchConnError(rerr, conn);
return -1;
}
- make_nonnull_domain (&ret->ddom, ddom);
- virDomainFree (ddom);
+ make_nonnull_domain(&ret->ddom, ddom);
+ virDomainFree(ddom);
return 0;
}
static int
-remoteDispatchDomainMigratePrepare2 (struct qemud_server *server ATTRIBUTE_UNUSED,
- struct qemud_client *client ATTRIBUTE_UNUSED,
- virConnectPtr conn,
- remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *rerr,
- remote_domain_migrate_prepare2_args *args,
- remote_domain_migrate_prepare2_ret *ret)
+remoteDispatchDomainMigratePrepare2(struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client ATTRIBUTE_UNUSED,
+ virConnectPtr conn,
+ remote_message_header *hdr ATTRIBUTE_UNUSED,
+ remote_error *rerr,
+ remote_domain_migrate_prepare2_args *args,
+ remote_domain_migrate_prepare2_ret *ret)
{
int r;
char *cookie = NULL;
@@ -1940,7 +1940,7 @@ remoteDispatchDomainMigratePrepare2 (struct qemud_server *server ATTRIBUTE_UNUSE
char *uri_in;
char **uri_out;
char *dname;
- CHECK_CONN (client);
+ CHECK_CONN(client);
uri_in = args->uri_in == NULL ? NULL : *args->uri_in;
dname = args->dname == NULL ? NULL : *args->dname;
@@ -1951,10 +1951,10 @@ remoteDispatchDomainMigratePrepare2 (struct qemud_server *server ATTRIBUTE_UNUSE
return -1;
}
- r = virDomainMigratePrepare2 (conn, &cookie, &cookielen,
- uri_in, uri_out,
- args->flags, dname, args->resource,
- args->dom_xml);
+ r = virDomainMigratePrepare2(conn, &cookie, &cookielen,
+ uri_in, uri_out,
+ args->flags, dname, args->resource,
+ args->dom_xml);
if (r == -1) {
remoteDispatchConnError(rerr, conn);
return -1;
@@ -1971,30 +1971,30 @@ remoteDispatchDomainMigratePrepare2 (struct qemud_server *server ATTRIBUTE_UNUSE
}
static int
-remoteDispatchDomainMigrateFinish2 (struct qemud_server *server ATTRIBUTE_UNUSED,
- struct qemud_client *client ATTRIBUTE_UNUSED,
- virConnectPtr conn,
- remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *rerr,
- remote_domain_migrate_finish2_args *args,
- remote_domain_migrate_finish2_ret *ret)
+remoteDispatchDomainMigrateFinish2(struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client ATTRIBUTE_UNUSED,
+ virConnectPtr conn,
+ remote_message_header *hdr ATTRIBUTE_UNUSED,
+ remote_error *rerr,
+ remote_domain_migrate_finish2_args *args,
+ remote_domain_migrate_finish2_ret *ret)
{
virDomainPtr ddom;
CHECK_CONN (client);
- ddom = virDomainMigrateFinish2 (conn, args->dname,
- args->cookie.cookie_val,
- args->cookie.cookie_len,
- args->uri,
- args->flags,
- args->retcode);
+ ddom = virDomainMigrateFinish2(conn, args->dname,
+ args->cookie.cookie_val,
+ args->cookie.cookie_len,
+ args->uri,
+ args->flags,
+ args->retcode);
if (ddom == NULL) {
remoteDispatchConnError(rerr, conn);
return -1;
}
- make_nonnull_domain (&ret->ddom, ddom);
- virDomainFree (ddom);
+ make_nonnull_domain(&ret->ddom, ddom);
+ virDomainFree(ddom);
return 0;
}
@@ -2011,7 +2011,7 @@ remoteDispatchDomainMigratePrepareTunnel(struct qemud_server *server ATTRIBUTE_U
int r;
char *dname;
struct qemud_client_stream *stream;
- CHECK_CONN (client);
+ CHECK_CONN(client);
dname = args->dname == NULL ? NULL : *args->dname;
@@ -2041,17 +2041,17 @@ remoteDispatchDomainMigratePrepareTunnel(struct qemud_server *server ATTRIBUTE_U
}
static int
-remoteDispatchListDefinedDomains (struct qemud_server *server ATTRIBUTE_UNUSED,
- struct qemud_client *client ATTRIBUTE_UNUSED,
- virConnectPtr conn,
- remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *rerr,
- remote_list_defined_domains_args *args,
- remote_list_defined_domains_ret *ret)
+remoteDispatchListDefinedDomains(struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client ATTRIBUTE_UNUSED,
+ virConnectPtr conn,
+ remote_message_header *hdr ATTRIBUTE_UNUSED,
+ remote_error *rerr,
+ remote_list_defined_domains_args *args,
+ remote_list_defined_domains_ret *ret)
{
if (args->maxnames > REMOTE_DOMAIN_NAME_LIST_MAX) {
- remoteDispatchFormatError (rerr,
+ remoteDispatchFormatError(rerr,
"%s", _("maxnames > REMOTE_DOMAIN_NAME_LIST_MAX"));
return -1;
}
@@ -2063,8 +2063,8 @@ remoteDispatchListDefinedDomains (struct qemud_server *server ATTRIBUTE_UNUSED,
}
ret->names.names_len =
- virConnectListDefinedDomains (conn,
- ret->names.names_val, args->maxnames);
+ virConnectListDefinedDomains(conn,
+ ret->names.names_val, args->maxnames);
if (ret->names.names_len == -1) {
VIR_FREE(ret->names.names_val);
remoteDispatchConnError(rerr, conn);
@@ -2075,82 +2075,82 @@ remoteDispatchListDefinedDomains (struct qemud_server *server ATTRIBUTE_UNUSED,
}
static int
-remoteDispatchDomainLookupById (struct qemud_server *server ATTRIBUTE_UNUSED,
- struct qemud_client *client ATTRIBUTE_UNUSED,
- virConnectPtr conn,
- remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *rerr,
- remote_domain_lookup_by_id_args *args,
- remote_domain_lookup_by_id_ret *ret)
+remoteDispatchDomainLookupById(struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client ATTRIBUTE_UNUSED,
+ virConnectPtr conn,
+ remote_message_header *hdr ATTRIBUTE_UNUSED,
+ remote_error *rerr,
+ remote_domain_lookup_by_id_args *args,
+ remote_domain_lookup_by_id_ret *ret)
{
virDomainPtr dom;
- dom = virDomainLookupByID (conn, args->id);
+ dom = virDomainLookupByID(conn, args->id);
if (dom == NULL) {
remoteDispatchConnError(rerr, conn);
return -1;
}
- make_nonnull_domain (&ret->dom, dom);
+ make_nonnull_domain(&ret->dom, dom);
virDomainFree(dom);
return 0;
}
static int
-remoteDispatchDomainLookupByName (struct qemud_server *server ATTRIBUTE_UNUSED,
- struct qemud_client *client ATTRIBUTE_UNUSED,
- virConnectPtr conn,
- remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *rerr,
- remote_domain_lookup_by_name_args *args,
- remote_domain_lookup_by_name_ret *ret)
+remoteDispatchDomainLookupByName(struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client ATTRIBUTE_UNUSED,
+ virConnectPtr conn,
+ remote_message_header *hdr ATTRIBUTE_UNUSED,
+ remote_error *rerr,
+ remote_domain_lookup_by_name_args *args,
+ remote_domain_lookup_by_name_ret *ret)
{
virDomainPtr dom;
- dom = virDomainLookupByName (conn, args->name);
+ dom = virDomainLookupByName(conn, args->name);
if (dom == NULL) {
remoteDispatchConnError(rerr, conn);
return -1;
}
- make_nonnull_domain (&ret->dom, dom);
+ make_nonnull_domain(&ret->dom, dom);
virDomainFree(dom);
return 0;
}
static int
-remoteDispatchDomainLookupByUuid (struct qemud_server *server ATTRIBUTE_UNUSED,
- struct qemud_client *client ATTRIBUTE_UNUSED,
- virConnectPtr conn,
- remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *rerr,
- remote_domain_lookup_by_uuid_args *args,
- remote_domain_lookup_by_uuid_ret *ret)
+remoteDispatchDomainLookupByUuid(struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client ATTRIBUTE_UNUSED,
+ virConnectPtr conn,
+ remote_message_header *hdr ATTRIBUTE_UNUSED,
+ remote_error *rerr,
+ remote_domain_lookup_by_uuid_args *args,
+ remote_domain_lookup_by_uuid_ret *ret)
{
virDomainPtr dom;
- dom = virDomainLookupByUUID (conn, (unsigned char *) args->uuid);
+ dom = virDomainLookupByUUID(conn, (unsigned char *) args->uuid);
if (dom == NULL) {
remoteDispatchConnError(rerr, conn);
return -1;
}
- make_nonnull_domain (&ret->dom, dom);
+ make_nonnull_domain(&ret->dom, dom);
virDomainFree(dom);
return 0;
}
static int
-remoteDispatchNumOfDefinedDomains (struct qemud_server *server ATTRIBUTE_UNUSED,
- struct qemud_client *client ATTRIBUTE_UNUSED,
- virConnectPtr conn,
- remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *rerr,
- void *args ATTRIBUTE_UNUSED,
- remote_num_of_defined_domains_ret *ret)
+remoteDispatchNumOfDefinedDomains(struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client ATTRIBUTE_UNUSED,
+ virConnectPtr conn,
+ remote_message_header *hdr ATTRIBUTE_UNUSED,
+ remote_error *rerr,
+ void *args ATTRIBUTE_UNUSED,
+ remote_num_of_defined_domains_ret *ret)
{
- ret->num = virConnectNumOfDefinedDomains (conn);
+ ret->num = virConnectNumOfDefinedDomains(conn);
if (ret->num == -1) {
remoteDispatchConnError(rerr, conn);
return -1;
@@ -2160,18 +2160,18 @@ remoteDispatchNumOfDefinedDomains (struct qemud_server *server ATTRIBUTE_UNUSED,
}
static int
-remoteDispatchDomainPinVcpu (struct qemud_server *server ATTRIBUTE_UNUSED,
- struct qemud_client *client ATTRIBUTE_UNUSED,
- virConnectPtr conn,
- remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *rerr,
- remote_domain_pin_vcpu_args *args,
- void *ret ATTRIBUTE_UNUSED)
+remoteDispatchDomainPinVcpu(struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client ATTRIBUTE_UNUSED,
+ virConnectPtr conn,
+ remote_message_header *hdr ATTRIBUTE_UNUSED,
+ remote_error *rerr,
+ remote_domain_pin_vcpu_args *args,
+ void *ret ATTRIBUTE_UNUSED)
{
virDomainPtr dom;
int rv;
- dom = get_nonnull_domain (conn, args->dom);
+ dom = get_nonnull_domain(conn, args->dom);
if (dom == NULL) {
remoteDispatchConnError(rerr, conn);
return -1;
@@ -2179,13 +2179,13 @@ remoteDispatchDomainPinVcpu (struct qemud_server *server ATTRIBUTE_UNUSED,
if (args->cpumap.cpumap_len > REMOTE_CPUMAP_MAX) {
virDomainFree(dom);
- remoteDispatchFormatError (rerr, "%s", _("cpumap_len > REMOTE_CPUMAP_MAX"));
+ remoteDispatchFormatError(rerr, "%s", _("cpumap_len > REMOTE_CPUMAP_MAX"));
return -1;
}
- rv = virDomainPinVcpu (dom, args->vcpu,
- (unsigned char *) args->cpumap.cpumap_val,
- args->cpumap.cpumap_len);
+ rv = virDomainPinVcpu(dom, args->vcpu,
+ (unsigned char *) args->cpumap.cpumap_val,
+ args->cpumap.cpumap_len);
if (rv == -1) {
remoteDispatchConnError(rerr, conn);
virDomainFree(dom);
@@ -2196,23 +2196,23 @@ remoteDispatchDomainPinVcpu (struct qemud_server *server ATTRIBUTE_UNUSED,
}
static int
-remoteDispatchDomainReboot (struct qemud_server *server ATTRIBUTE_UNUSED,
- struct qemud_client *client ATTRIBUTE_UNUSED,
- virConnectPtr conn,
- remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *rerr,
- remote_domain_reboot_args *args,
- void *ret ATTRIBUTE_UNUSED)
+remoteDispatchDomainReboot(struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client ATTRIBUTE_UNUSED,
+ virConnectPtr conn,
+ remote_message_header *hdr ATTRIBUTE_UNUSED,
+ remote_error *rerr,
+ remote_domain_reboot_args *args,
+ void *ret ATTRIBUTE_UNUSED)
{
virDomainPtr dom;
- dom = get_nonnull_domain (conn, args->dom);
+ dom = get_nonnull_domain(conn, args->dom);
if (dom == NULL) {
remoteDispatchConnError(rerr, conn);
return -1;
}
- if (virDomainReboot (dom, args->flags) == -1) {
+ if (virDomainReboot(dom, args->flags) == -1) {
remoteDispatchConnError(rerr, conn);
virDomainFree(dom);
return -1;
@@ -2222,16 +2222,16 @@ remoteDispatchDomainReboot (struct qemud_server *server ATTRIBUTE_UNUSED,
}
static int
-remoteDispatchDomainRestore (struct qemud_server *server ATTRIBUTE_UNUSED,
- struct qemud_client *client ATTRIBUTE_UNUSED,
- virConnectPtr conn,
- remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *rerr,
- remote_domain_restore_args *args,
- void *ret ATTRIBUTE_UNUSED)
+remoteDispatchDomainRestore(struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client ATTRIBUTE_UNUSED,
+ virConnectPtr conn,
+ remote_message_header *hdr ATTRIBUTE_UNUSED,
+ remote_error *rerr,
+ remote_domain_restore_args *args,
+ void *ret ATTRIBUTE_UNUSED)
{
- if (virDomainRestore (conn, args->from) == -1) {
+ if (virDomainRestore(conn, args->from) == -1) {
remoteDispatchConnError(rerr, conn);
return -1;
}
@@ -2240,23 +2240,23 @@ remoteDispatchDomainRestore (struct qemud_server *server ATTRIBUTE_UNUSED,
}
static int
-remoteDispatchDomainResume (struct qemud_server *server ATTRIBUTE_UNUSED,
- struct qemud_client *client ATTRIBUTE_UNUSED,
- virConnectPtr conn,
- remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *rerr,
- remote_domain_resume_args *args,
- void *ret ATTRIBUTE_UNUSED)
+remoteDispatchDomainResume(struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client ATTRIBUTE_UNUSED,
+ virConnectPtr conn,
+ remote_message_header *hdr ATTRIBUTE_UNUSED,
+ remote_error *rerr,
+ remote_domain_resume_args *args,
+ void *ret ATTRIBUTE_UNUSED)
{
virDomainPtr dom;
- dom = get_nonnull_domain (conn, args->dom);
+ dom = get_nonnull_domain(conn, args->dom);
if (dom == NULL) {
remoteDispatchConnError(rerr, conn);
return -1;
}
- if (virDomainResume (dom) == -1) {
+ if (virDomainResume(dom) == -1) {
remoteDispatchConnError(rerr, conn);
virDomainFree(dom);
return -1;
@@ -2266,23 +2266,23 @@ remoteDispatchDomainResume (struct qemud_server *server ATTRIBUTE_UNUSED,
}
static int
-remoteDispatchDomainSave (struct qemud_server *server ATTRIBUTE_UNUSED,
- struct qemud_client *client ATTRIBUTE_UNUSED,
- virConnectPtr conn,
- remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *rerr,
- remote_domain_save_args *args,
- void *ret ATTRIBUTE_UNUSED)
+remoteDispatchDomainSave(struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client ATTRIBUTE_UNUSED,
+ virConnectPtr conn,
+ remote_message_header *hdr ATTRIBUTE_UNUSED,
+ remote_error *rerr,
+ remote_domain_save_args *args,
+ void *ret ATTRIBUTE_UNUSED)
{
virDomainPtr dom;
- dom = get_nonnull_domain (conn, args->dom);
+ dom = get_nonnull_domain(conn, args->dom);
if (dom == NULL) {
remoteDispatchConnError(rerr, conn);
return -1;
}
- if (virDomainSave (dom, args->to) == -1) {
+ if (virDomainSave(dom, args->to) == -1) {
remoteDispatchConnError(rerr, conn);
virDomainFree(dom);
return -1;
@@ -2292,23 +2292,23 @@ remoteDispatchDomainSave (struct qemud_server *server ATTRIBUTE_UNUSED,
}
static int
-remoteDispatchDomainCoreDump (struct qemud_server *server ATTRIBUTE_UNUSED,
- struct qemud_client *client ATTRIBUTE_UNUSED,
- virConnectPtr conn,
- remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *rerr,
- remote_domain_core_dump_args *args,
- void *ret ATTRIBUTE_UNUSED)
+remoteDispatchDomainCoreDump(struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client ATTRIBUTE_UNUSED,
+ virConnectPtr conn,
+ remote_message_header *hdr ATTRIBUTE_UNUSED,
+ remote_error *rerr,
+ remote_domain_core_dump_args *args,
+ void *ret ATTRIBUTE_UNUSED)
{
virDomainPtr dom;
- dom = get_nonnull_domain (conn, args->dom);
+ dom = get_nonnull_domain(conn, args->dom);
if (dom == NULL) {
remoteDispatchConnError(rerr, conn);
return -1;
}
- if (virDomainCoreDump (dom, args->to, args->flags) == -1) {
+ if (virDomainCoreDump(dom, args->to, args->flags) == -1) {
remoteDispatchConnError(rerr, conn);
virDomainFree(dom);
return -1;
@@ -2318,23 +2318,23 @@ remoteDispatchDomainCoreDump (struct qemud_server *server ATTRIBUTE_UNUSED,
}
static int
-remoteDispatchDomainSetAutostart (struct qemud_server *server ATTRIBUTE_UNUSED,
- struct qemud_client *client ATTRIBUTE_UNUSED,
- virConnectPtr conn,
- remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *rerr,
- remote_domain_set_autostart_args *args,
- void *ret ATTRIBUTE_UNUSED)
+remoteDispatchDomainSetAutostart(struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client ATTRIBUTE_UNUSED,
+ virConnectPtr conn,
+ remote_message_header *hdr ATTRIBUTE_UNUSED,
+ remote_error *rerr,
+ remote_domain_set_autostart_args *args,
+ void *ret ATTRIBUTE_UNUSED)
{
virDomainPtr dom;
- dom = get_nonnull_domain (conn, args->dom);
+ dom = get_nonnull_domain(conn, args->dom);
if (dom == NULL) {
remoteDispatchConnError(rerr, conn);
return -1;
}
- if (virDomainSetAutostart (dom, args->autostart) == -1) {
+ if (virDomainSetAutostart(dom, args->autostart) == -1) {
remoteDispatchConnError(rerr, conn);
virDomainFree(dom);
return -1;
@@ -2344,23 +2344,23 @@ remoteDispatchDomainSetAutostart (struct qemud_server *server ATTRIBUTE_UNUSED,
}
static int
-remoteDispatchDomainSetMaxMemory (struct qemud_server *server ATTRIBUTE_UNUSED,
- struct qemud_client *client ATTRIBUTE_UNUSED,
- virConnectPtr conn,
- remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *rerr,
- remote_domain_set_max_memory_args *args,
- void *ret ATTRIBUTE_UNUSED)
+remoteDispatchDomainSetMaxMemory(struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client ATTRIBUTE_UNUSED,
+ virConnectPtr conn,
+ remote_message_header *hdr ATTRIBUTE_UNUSED,
+ remote_error *rerr,
+ remote_domain_set_max_memory_args *args,
+ void *ret ATTRIBUTE_UNUSED)
{
virDomainPtr dom;
- dom = get_nonnull_domain (conn, args->dom);
+ dom = get_nonnull_domain(conn, args->dom);
if (dom == NULL) {
remoteDispatchConnError(rerr, conn);
return -1;
}
- if (virDomainSetMaxMemory (dom, args->memory) == -1) {
+ if (virDomainSetMaxMemory(dom, args->memory) == -1) {
remoteDispatchConnError(rerr, conn);
virDomainFree(dom);
return -1;
@@ -2370,23 +2370,23 @@ remoteDispatchDomainSetMaxMemory (struct qemud_server *server ATTRIBUTE_UNUSED,
}
static int
-remoteDispatchDomainSetMemory (struct qemud_server *server ATTRIBUTE_UNUSED,
- struct qemud_client *client ATTRIBUTE_UNUSED,
- virConnectPtr conn,
- remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *rerr,
- remote_domain_set_memory_args *args,
- void *ret ATTRIBUTE_UNUSED)
+remoteDispatchDomainSetMemory(struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client ATTRIBUTE_UNUSED,
+ virConnectPtr conn,
+ remote_message_header *hdr ATTRIBUTE_UNUSED,
+ remote_error *rerr,
+ remote_domain_set_memory_args *args,
+ void *ret ATTRIBUTE_UNUSED)
{
virDomainPtr dom;
- dom = get_nonnull_domain (conn, args->dom);
+ dom = get_nonnull_domain(conn, args->dom);
if (dom == NULL) {
remoteDispatchConnError(rerr, conn);
return -1;
}
- if (virDomainSetMemory (dom, args->memory) == -1) {
+ if (virDomainSetMemory(dom, args->memory) == -1) {
remoteDispatchConnError(rerr, conn);
virDomainFree(dom);
return -1;
@@ -2396,23 +2396,23 @@ remoteDispatchDomainSetMemory (struct qemud_server *server ATTRIBUTE_UNUSED,
}
static int
-remoteDispatchDomainSetMemoryFlags (struct qemud_server *server ATTRIBUTE_UNUSED,
- struct qemud_client *client ATTRIBUTE_UNUSED,
- virConnectPtr conn,
- remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *rerr,
- remote_domain_set_memory_flags_args *args,
- void *ret ATTRIBUTE_UNUSED)
+remoteDispatchDomainSetMemoryFlags(struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client ATTRIBUTE_UNUSED,
+ virConnectPtr conn,
+ remote_message_header *hdr ATTRIBUTE_UNUSED,
+ remote_error *rerr,
+ remote_domain_set_memory_flags_args *args,
+ void *ret ATTRIBUTE_UNUSED)
{
virDomainPtr dom;
- dom = get_nonnull_domain (conn, args->dom);
+ dom = get_nonnull_domain(conn, args->dom);
if (dom == NULL) {
remoteDispatchConnError(rerr, conn);
return -1;
}
- if (virDomainSetMemoryFlags (dom, args->memory, args->flags) == -1) {
+ if (virDomainSetMemoryFlags(dom, args->memory, args->flags) == -1) {
remoteDispatchConnError(rerr, conn);
virDomainFree(dom);
return -1;
@@ -2844,23 +2844,23 @@ remoteDispatchDomainGetBlkioParameters(struct qemud_server *server
}
static int
-remoteDispatchDomainSetVcpus (struct qemud_server *server ATTRIBUTE_UNUSED,
- struct qemud_client *client ATTRIBUTE_UNUSED,
- virConnectPtr conn,
- remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *rerr,
- remote_domain_set_vcpus_args *args,
- void *ret ATTRIBUTE_UNUSED)
+remoteDispatchDomainSetVcpus(struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client ATTRIBUTE_UNUSED,
+ virConnectPtr conn,
+ remote_message_header *hdr ATTRIBUTE_UNUSED,
+ remote_error *rerr,
+ remote_domain_set_vcpus_args *args,
+ void *ret ATTRIBUTE_UNUSED)
{
virDomainPtr dom;
- dom = get_nonnull_domain (conn, args->dom);
+ dom = get_nonnull_domain(conn, args->dom);
if (dom == NULL) {
remoteDispatchConnError(rerr, conn);
return -1;
}
- if (virDomainSetVcpus (dom, args->nvcpus) == -1) {
+ if (virDomainSetVcpus(dom, args->nvcpus) == -1) {
remoteDispatchConnError(rerr, conn);
virDomainFree(dom);
return -1;
@@ -2870,23 +2870,23 @@ remoteDispatchDomainSetVcpus (struct qemud_server *server ATTRIBUTE_UNUSED,
}
static int
-remoteDispatchDomainSetVcpusFlags (struct qemud_server *server ATTRIBUTE_UNUSED,
- struct qemud_client *client ATTRIBUTE_UNUSED,
- virConnectPtr conn,
- remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *rerr,
- remote_domain_set_vcpus_flags_args *args,
- void *ret ATTRIBUTE_UNUSED)
+remoteDispatchDomainSetVcpusFlags(struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client ATTRIBUTE_UNUSED,
+ virConnectPtr conn,
+ remote_message_header *hdr ATTRIBUTE_UNUSED,
+ remote_error *rerr,
+ remote_domain_set_vcpus_flags_args *args,
+ void *ret ATTRIBUTE_UNUSED)
{
virDomainPtr dom;
- dom = get_nonnull_domain (conn, args->dom);
+ dom = get_nonnull_domain(conn, args->dom);
if (dom == NULL) {
remoteDispatchConnError(rerr, conn);
return -1;
}
- if (virDomainSetVcpusFlags (dom, args->nvcpus, args->flags) == -1) {
+ if (virDomainSetVcpusFlags(dom, args->nvcpus, args->flags) == -1) {
remoteDispatchConnError(rerr, conn);
virDomainFree(dom);
return -1;
@@ -2896,23 +2896,23 @@ remoteDispatchDomainSetVcpusFlags (struct qemud_server *server ATTRIBUTE_UNUSED,
}
static int
-remoteDispatchDomainShutdown (struct qemud_server *server ATTRIBUTE_UNUSED,
- struct qemud_client *client ATTRIBUTE_UNUSED,
- virConnectPtr conn,
- remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *rerr,
- remote_domain_shutdown_args *args,
- void *ret ATTRIBUTE_UNUSED)
+remoteDispatchDomainShutdown(struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client ATTRIBUTE_UNUSED,
+ virConnectPtr conn,
+ remote_message_header *hdr ATTRIBUTE_UNUSED,
+ remote_error *rerr,
+ remote_domain_shutdown_args *args,
+ void *ret ATTRIBUTE_UNUSED)
{
virDomainPtr dom;
- dom = get_nonnull_domain (conn, args->dom);
+ dom = get_nonnull_domain(conn, args->dom);
if (dom == NULL) {
remoteDispatchConnError(rerr, conn);
return -1;
}
- if (virDomainShutdown (dom) == -1) {
+ if (virDomainShutdown(dom) == -1) {
remoteDispatchConnError(rerr, conn);
virDomainFree(dom);
return -1;
@@ -2922,23 +2922,23 @@ remoteDispatchDomainShutdown (struct qemud_server *server ATTRIBUTE_UNUSED,
}
static int
-remoteDispatchDomainSuspend (struct qemud_server *server ATTRIBUTE_UNUSED,
- struct qemud_client *client ATTRIBUTE_UNUSED,
- virConnectPtr conn,
- remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *rerr,
- remote_domain_suspend_args *args,
- void *ret ATTRIBUTE_UNUSED)
+remoteDispatchDomainSuspend(struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client ATTRIBUTE_UNUSED,
+ virConnectPtr conn,
+ remote_message_header *hdr ATTRIBUTE_UNUSED,
+ remote_error *rerr,
+ remote_domain_suspend_args *args,
+ void *ret ATTRIBUTE_UNUSED)
{
virDomainPtr dom;
- dom = get_nonnull_domain (conn, args->dom);
+ dom = get_nonnull_domain(conn, args->dom);
if (dom == NULL) {
remoteDispatchConnError(rerr, conn);
return -1;
}
- if (virDomainSuspend (dom) == -1) {
+ if (virDomainSuspend(dom) == -1) {
remoteDispatchConnError(rerr, conn);
virDomainFree(dom);
return -1;
@@ -2948,23 +2948,23 @@ remoteDispatchDomainSuspend (struct qemud_server *server ATTRIBUTE_UNUSED,
}
static int
-remoteDispatchDomainUndefine (struct qemud_server *server ATTRIBUTE_UNUSED,
- struct qemud_client *client ATTRIBUTE_UNUSED,
- virConnectPtr conn,
- remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *rerr,
- remote_domain_undefine_args *args,
- void *ret ATTRIBUTE_UNUSED)
+remoteDispatchDomainUndefine(struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client ATTRIBUTE_UNUSED,
+ virConnectPtr conn,
+ remote_message_header *hdr ATTRIBUTE_UNUSED,
+ remote_error *rerr,
+ remote_domain_undefine_args *args,
+ void *ret ATTRIBUTE_UNUSED)
{
virDomainPtr dom;
- dom = get_nonnull_domain (conn, args->dom);
+ dom = get_nonnull_domain(conn, args->dom);
if (dom == NULL) {
remoteDispatchConnError(rerr, conn);
return -1;
}
- if (virDomainUndefine (dom) == -1) {
+ if (virDomainUndefine(dom) == -1) {
remoteDispatchConnError(rerr, conn);
virDomainFree(dom);
return -1;
@@ -2974,17 +2974,17 @@ remoteDispatchDomainUndefine (struct qemud_server *server ATTRIBUTE_UNUSED,
}
static int
-remoteDispatchListDefinedNetworks (struct qemud_server *server ATTRIBUTE_UNUSED,
- struct qemud_client *client ATTRIBUTE_UNUSED,
- virConnectPtr conn,
- remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *rerr,
- remote_list_defined_networks_args *args,
- remote_list_defined_networks_ret *ret)
+remoteDispatchListDefinedNetworks(struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client ATTRIBUTE_UNUSED,
+ virConnectPtr conn,
+ remote_message_header *hdr ATTRIBUTE_UNUSED,
+ remote_error *rerr,
+ remote_list_defined_networks_args *args,
+ remote_list_defined_networks_ret *ret)
{
if (args->maxnames > REMOTE_NETWORK_NAME_LIST_MAX) {
- remoteDispatchFormatError (rerr,
+ remoteDispatchFormatError(rerr,
"%s", _("maxnames > REMOTE_NETWORK_NAME_LIST_MAX"));
return -1;
}
@@ -2996,8 +2996,8 @@ remoteDispatchListDefinedNetworks (struct qemud_server *server ATTRIBUTE_UNUSED,
}
ret->names.names_len =
- virConnectListDefinedNetworks (conn,
- ret->names.names_val, args->maxnames);
+ virConnectListDefinedNetworks(conn,
+ ret->names.names_val, args->maxnames);
if (ret->names.names_len == -1) {
VIR_FREE(ret->names.names_val);
remoteDispatchConnError(rerr, conn);
@@ -3008,17 +3008,17 @@ remoteDispatchListDefinedNetworks (struct qemud_server *server ATTRIBUTE_UNUSED,
}
static int
-remoteDispatchListDomains (struct qemud_server *server ATTRIBUTE_UNUSED,
- struct qemud_client *client ATTRIBUTE_UNUSED,
- virConnectPtr conn,
- remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *rerr,
- remote_list_domains_args *args,
- remote_list_domains_ret *ret)
+remoteDispatchListDomains(struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client ATTRIBUTE_UNUSED,
+ virConnectPtr conn,
+ remote_message_header *hdr ATTRIBUTE_UNUSED,
+ remote_error *rerr,
+ remote_list_domains_args *args,
+ remote_list_domains_ret *ret)
{
if (args->maxids > REMOTE_DOMAIN_ID_LIST_MAX) {
- remoteDispatchFormatError (rerr,
+ remoteDispatchFormatError(rerr,
"%s", _("maxids > REMOTE_DOMAIN_ID_LIST_MAX"));
return -1;
}
@@ -3029,8 +3029,8 @@ remoteDispatchListDomains (struct qemud_server *server ATTRIBUTE_UNUSED,
return -1;
}
- ret->ids.ids_len = virConnectListDomains (conn,
- ret->ids.ids_val, args->maxids);
+ ret->ids.ids_len = virConnectListDomains(conn,
+ ret->ids.ids_val, args->maxids);
if (ret->ids.ids_len == -1) {
VIR_FREE(ret->ids.ids_val);
remoteDispatchConnError(rerr, conn);
@@ -3041,23 +3041,23 @@ remoteDispatchListDomains (struct qemud_server *server ATTRIBUTE_UNUSED,
}
static int
-remoteDispatchDomainManagedSave (struct qemud_server *server ATTRIBUTE_UNUSED,
- struct qemud_client *client ATTRIBUTE_UNUSED,
- virConnectPtr conn,
- remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *rerr,
- remote_domain_managed_save_args *args,
- void *ret ATTRIBUTE_UNUSED)
+remoteDispatchDomainManagedSave(struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client ATTRIBUTE_UNUSED,
+ virConnectPtr conn,
+ remote_message_header *hdr ATTRIBUTE_UNUSED,
+ remote_error *rerr,
+ remote_domain_managed_save_args *args,
+ void *ret ATTRIBUTE_UNUSED)
{
virDomainPtr dom;
- dom = get_nonnull_domain (conn, args->dom);
+ dom = get_nonnull_domain(conn, args->dom);
if (dom == NULL) {
remoteDispatchConnError(rerr, conn);
return -1;
}
- if (virDomainManagedSave (dom, args->flags) == -1) {
+ if (virDomainManagedSave(dom, args->flags) == -1) {
remoteDispatchConnError(rerr, conn);
virDomainFree(dom);
return -1;
@@ -3067,23 +3067,23 @@ remoteDispatchDomainManagedSave (struct qemud_server *server ATTRIBUTE_UNUSED,
}
static int
-remoteDispatchDomainHasManagedSaveImage (struct qemud_server *server ATTRIBUTE_UNUSED,
- struct qemud_client *client ATTRIBUTE_UNUSED,
- virConnectPtr conn,
- remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *rerr,
- remote_domain_has_managed_save_image_args *args,
- remote_domain_has_managed_save_image_ret *ret)
+remoteDispatchDomainHasManagedSaveImage(struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client ATTRIBUTE_UNUSED,
+ virConnectPtr conn,
+ remote_message_header *hdr ATTRIBUTE_UNUSED,
+ remote_error *rerr,
+ remote_domain_has_managed_save_image_args *args,
+ remote_domain_has_managed_save_image_ret *ret)
{
virDomainPtr dom;
- dom = get_nonnull_domain (conn, args->dom);
+ dom = get_nonnull_domain(conn, args->dom);
if (dom == NULL) {
remoteDispatchConnError(rerr, conn);
return -1;
}
- ret->ret = virDomainHasManagedSaveImage (dom, args->flags);
+ ret->ret = virDomainHasManagedSaveImage(dom, args->flags);
if (ret->ret == -1) {
remoteDispatchConnError(rerr, conn);
virDomainFree(dom);
@@ -3094,23 +3094,23 @@ remoteDispatchDomainHasManagedSaveImage (struct qemud_server *server ATTRIBUTE_U
}
static int
-remoteDispatchDomainManagedSaveRemove (struct qemud_server *server ATTRIBUTE_UNUSED,
- struct qemud_client *client ATTRIBUTE_UNUSED,
- virConnectPtr conn,
- remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *rerr,
- remote_domain_managed_save_remove_args *args,
- void *ret ATTRIBUTE_UNUSED)
+remoteDispatchDomainManagedSaveRemove(struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client ATTRIBUTE_UNUSED,
+ virConnectPtr conn,
+ remote_message_header *hdr ATTRIBUTE_UNUSED,
+ remote_error *rerr,
+ remote_domain_managed_save_remove_args *args,
+ void *ret ATTRIBUTE_UNUSED)
{
virDomainPtr dom;
- dom = get_nonnull_domain (conn, args->dom);
+ dom = get_nonnull_domain(conn, args->dom);
if (dom == NULL) {
remoteDispatchConnError(rerr, conn);
return -1;
}
- if (virDomainManagedSaveRemove (dom, args->flags) == -1) {
+ if (virDomainManagedSaveRemove(dom, args->flags) == -1) {
remoteDispatchConnError(rerr, conn);
virDomainFree(dom);
return -1;
@@ -3120,17 +3120,17 @@ remoteDispatchDomainManagedSaveRemove (struct qemud_server *server ATTRIBUTE_UNU
}
static int
-remoteDispatchListNetworks (struct qemud_server *server ATTRIBUTE_UNUSED,
- struct qemud_client *client ATTRIBUTE_UNUSED,
- virConnectPtr conn,
- remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *rerr,
- remote_list_networks_args *args,
- remote_list_networks_ret *ret)
+remoteDispatchListNetworks(struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client ATTRIBUTE_UNUSED,
+ virConnectPtr conn,
+ remote_message_header *hdr ATTRIBUTE_UNUSED,
+ remote_error *rerr,
+ remote_list_networks_args *args,
+ remote_list_networks_ret *ret)
{
if (args->maxnames > REMOTE_NETWORK_NAME_LIST_MAX) {
- remoteDispatchFormatError (rerr,
+ remoteDispatchFormatError(rerr,
"%s", _("maxnames > REMOTE_NETWORK_NAME_LIST_MAX"));
return -1;
}
@@ -3142,8 +3142,8 @@ remoteDispatchListNetworks (struct qemud_server *server ATTRIBUTE_UNUSED,
}
ret->names.names_len =
- virConnectListNetworks (conn,
- ret->names.names_val, args->maxnames);
+ virConnectListNetworks(conn,
+ ret->names.names_val, args->maxnames);
if (ret->names.names_len == -1) {
VIR_FREE(ret->names.names_len);
remoteDispatchConnError(rerr, conn);
@@ -3154,23 +3154,23 @@ remoteDispatchListNetworks (struct qemud_server *server ATTRIBUTE_UNUSED,
}
static int
-remoteDispatchNetworkCreate (struct qemud_server *server ATTRIBUTE_UNUSED,
- struct qemud_client *client ATTRIBUTE_UNUSED,
- virConnectPtr conn,
- remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *rerr,
- remote_network_create_args *args,
- void *ret ATTRIBUTE_UNUSED)
+remoteDispatchNetworkCreate(struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client ATTRIBUTE_UNUSED,
+ virConnectPtr conn,
+ remote_message_header *hdr ATTRIBUTE_UNUSED,
+ remote_error *rerr,
+ remote_network_create_args *args,
+ void *ret ATTRIBUTE_UNUSED)
{
virNetworkPtr net;
- net = get_nonnull_network (conn, args->net);
+ net = get_nonnull_network(conn, args->net);
if (net == NULL) {
remoteDispatchConnError(rerr, conn);
return -1;
}
- if (virNetworkCreate (net) == -1) {
+ if (virNetworkCreate(net) == -1) {
remoteDispatchConnError(rerr, conn);
virNetworkFree(net);
return -1;
@@ -3180,67 +3180,67 @@ remoteDispatchNetworkCreate (struct qemud_server *server ATTRIBUTE_UNUSED,
}
static int
-remoteDispatchNetworkCreateXml (struct qemud_server *server ATTRIBUTE_UNUSED,
- struct qemud_client *client ATTRIBUTE_UNUSED,
- virConnectPtr conn,
- remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *rerr,
- remote_network_create_xml_args *args,
- remote_network_create_xml_ret *ret)
+remoteDispatchNetworkCreateXml(struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client ATTRIBUTE_UNUSED,
+ virConnectPtr conn,
+ remote_message_header *hdr ATTRIBUTE_UNUSED,
+ remote_error *rerr,
+ remote_network_create_xml_args *args,
+ remote_network_create_xml_ret *ret)
{
virNetworkPtr net;
- net = virNetworkCreateXML (conn, args->xml);
+ net = virNetworkCreateXML(conn, args->xml);
if (net == NULL) {
remoteDispatchConnError(rerr, conn);
return -1;
}
- make_nonnull_network (&ret->net, net);
+ make_nonnull_network(&ret->net, net);
virNetworkFree(net);
return 0;
}
static int
-remoteDispatchNetworkDefineXml (struct qemud_server *server ATTRIBUTE_UNUSED,
- struct qemud_client *client ATTRIBUTE_UNUSED,
- virConnectPtr conn,
- remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *rerr,
- remote_network_define_xml_args *args,
- remote_network_define_xml_ret *ret)
+remoteDispatchNetworkDefineXml(struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client ATTRIBUTE_UNUSED,
+ virConnectPtr conn,
+ remote_message_header *hdr ATTRIBUTE_UNUSED,
+ remote_error *rerr,
+ remote_network_define_xml_args *args,
+ remote_network_define_xml_ret *ret)
{
virNetworkPtr net;
- net = virNetworkDefineXML (conn, args->xml);
+ net = virNetworkDefineXML(conn, args->xml);
if (net == NULL) {
remoteDispatchConnError(rerr, conn);
return -1;
}
- make_nonnull_network (&ret->net, net);
+ make_nonnull_network(&ret->net, net);
virNetworkFree(net);
return 0;
}
static int
-remoteDispatchNetworkDestroy (struct qemud_server *server ATTRIBUTE_UNUSED,
- struct qemud_client *client ATTRIBUTE_UNUSED,
- virConnectPtr conn,
- remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *rerr,
- remote_network_destroy_args *args,
- void *ret ATTRIBUTE_UNUSED)
+remoteDispatchNetworkDestroy(struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client ATTRIBUTE_UNUSED,
+ virConnectPtr conn,
+ remote_message_header *hdr ATTRIBUTE_UNUSED,
+ remote_error *rerr,
+ remote_network_destroy_args *args,
+ void *ret ATTRIBUTE_UNUSED)
{
virNetworkPtr net;
- net = get_nonnull_network (conn, args->net);
+ net = get_nonnull_network(conn, args->net);
if (net == NULL) {
remoteDispatchConnError(rerr, conn);
return -1;
}
- if (virNetworkDestroy (net) == -1) {
+ if (virNetworkDestroy(net) == -1) {
remoteDispatchConnError(rerr, conn);
virNetworkFree(net);
return -1;
@@ -3250,24 +3250,24 @@ remoteDispatchNetworkDestroy (struct qemud_server *server ATTRIBUTE_UNUSED,
}
static int
-remoteDispatchNetworkDumpXml (struct qemud_server *server ATTRIBUTE_UNUSED,
- struct qemud_client *client ATTRIBUTE_UNUSED,
- virConnectPtr conn,
- remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *rerr,
- remote_network_dump_xml_args *args,
- remote_network_dump_xml_ret *ret)
+remoteDispatchNetworkDumpXml(struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client ATTRIBUTE_UNUSED,
+ virConnectPtr conn,
+ remote_message_header *hdr ATTRIBUTE_UNUSED,
+ remote_error *rerr,
+ remote_network_dump_xml_args *args,
+ remote_network_dump_xml_ret *ret)
{
virNetworkPtr net;
- net = get_nonnull_network (conn, args->net);
+ net = get_nonnull_network(conn, args->net);
if (net == NULL) {
remoteDispatchConnError(rerr, conn);
return -1;
}
/* remoteDispatchClientRequest will free this. */
- ret->xml = virNetworkGetXMLDesc (net, args->flags);
+ ret->xml = virNetworkGetXMLDesc(net, args->flags);
if (!ret->xml) {
remoteDispatchConnError(rerr, conn);
virNetworkFree(net);
@@ -3278,23 +3278,23 @@ remoteDispatchNetworkDumpXml (struct qemud_server *server ATTRIBUTE_UNUSED,
}
static int
-remoteDispatchNetworkGetAutostart (struct qemud_server *server ATTRIBUTE_UNUSED,
- struct qemud_client *client ATTRIBUTE_UNUSED,
- virConnectPtr conn,
- remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *rerr,
- remote_network_get_autostart_args *args,
- remote_network_get_autostart_ret *ret)
+remoteDispatchNetworkGetAutostart(struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client ATTRIBUTE_UNUSED,
+ virConnectPtr conn,
+ remote_message_header *hdr ATTRIBUTE_UNUSED,
+ remote_error *rerr,
+ remote_network_get_autostart_args *args,
+ remote_network_get_autostart_ret *ret)
{
virNetworkPtr net;
- net = get_nonnull_network (conn, args->net);
+ net = get_nonnull_network(conn, args->net);
if (net == NULL) {
remoteDispatchConnError(rerr, conn);
return -1;
}
- if (virNetworkGetAutostart (net, &ret->autostart) == -1) {
+ if (virNetworkGetAutostart(net, &ret->autostart) == -1) {
remoteDispatchConnError(rerr, conn);
virNetworkFree(net);
return -1;
@@ -3304,24 +3304,24 @@ remoteDispatchNetworkGetAutostart (struct qemud_server *server ATTRIBUTE_UNUSED,
}
static int
-remoteDispatchNetworkGetBridgeName (struct qemud_server *server ATTRIBUTE_UNUSED,
- struct qemud_client *client ATTRIBUTE_UNUSED,
- virConnectPtr conn,
- remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *rerr,
- remote_network_get_bridge_name_args *args,
- remote_network_get_bridge_name_ret *ret)
+remoteDispatchNetworkGetBridgeName(struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client ATTRIBUTE_UNUSED,
+ virConnectPtr conn,
+ remote_message_header *hdr ATTRIBUTE_UNUSED,
+ remote_error *rerr,
+ remote_network_get_bridge_name_args *args,
+ remote_network_get_bridge_name_ret *ret)
{
virNetworkPtr net;
- net = get_nonnull_network (conn, args->net);
+ net = get_nonnull_network(conn, args->net);
if (net == NULL) {
remoteDispatchConnError(rerr, conn);
return -1;
}
/* remoteDispatchClientRequest will free this. */
- ret->name = virNetworkGetBridgeName (net);
+ ret->name = virNetworkGetBridgeName(net);
if (!ret->name) {
remoteDispatchConnError(rerr, conn);
virNetworkFree(net);
@@ -3332,67 +3332,67 @@ remoteDispatchNetworkGetBridgeName (struct qemud_server *server ATTRIBUTE_UNUSED
}
static int
-remoteDispatchNetworkLookupByName (struct qemud_server *server ATTRIBUTE_UNUSED,
- struct qemud_client *client ATTRIBUTE_UNUSED,
- virConnectPtr conn,
- remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *rerr,
- remote_network_lookup_by_name_args *args,
- remote_network_lookup_by_name_ret *ret)
+remoteDispatchNetworkLookupByName(struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client ATTRIBUTE_UNUSED,
+ virConnectPtr conn,
+ remote_message_header *hdr ATTRIBUTE_UNUSED,
+ remote_error *rerr,
+ remote_network_lookup_by_name_args *args,
+ remote_network_lookup_by_name_ret *ret)
{
virNetworkPtr net;
- net = virNetworkLookupByName (conn, args->name);
+ net = virNetworkLookupByName(conn, args->name);
if (net == NULL) {
remoteDispatchConnError(rerr, conn);
return -1;
}
- make_nonnull_network (&ret->net, net);
+ make_nonnull_network(&ret->net, net);
virNetworkFree(net);
return 0;
}
static int
-remoteDispatchNetworkLookupByUuid (struct qemud_server *server ATTRIBUTE_UNUSED,
- struct qemud_client *client ATTRIBUTE_UNUSED,
- virConnectPtr conn,
- remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *rerr,
- remote_network_lookup_by_uuid_args *args,
- remote_network_lookup_by_uuid_ret *ret)
+remoteDispatchNetworkLookupByUuid(struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client ATTRIBUTE_UNUSED,
+ virConnectPtr conn,
+ remote_message_header *hdr ATTRIBUTE_UNUSED,
+ remote_error *rerr,
+ remote_network_lookup_by_uuid_args *args,
+ remote_network_lookup_by_uuid_ret *ret)
{
virNetworkPtr net;
- net = virNetworkLookupByUUID (conn, (unsigned char *) args->uuid);
+ net = virNetworkLookupByUUID(conn, (unsigned char *) args->uuid);
if (net == NULL) {
remoteDispatchConnError(rerr, conn);
return -1;
}
- make_nonnull_network (&ret->net, net);
+ make_nonnull_network(&ret->net, net);
virNetworkFree(net);
return 0;
}
static int
-remoteDispatchNetworkSetAutostart (struct qemud_server *server ATTRIBUTE_UNUSED,
- struct qemud_client *client ATTRIBUTE_UNUSED,
- virConnectPtr conn,
- remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *rerr,
- remote_network_set_autostart_args *args,
- void *ret ATTRIBUTE_UNUSED)
+remoteDispatchNetworkSetAutostart(struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client ATTRIBUTE_UNUSED,
+ virConnectPtr conn,
+ remote_message_header *hdr ATTRIBUTE_UNUSED,
+ remote_error *rerr,
+ remote_network_set_autostart_args *args,
+ void *ret ATTRIBUTE_UNUSED)
{
virNetworkPtr net;
- net = get_nonnull_network (conn, args->net);
+ net = get_nonnull_network(conn, args->net);
if (net == NULL) {
remoteDispatchConnError(rerr, conn);
return -1;
}
- if (virNetworkSetAutostart (net, args->autostart) == -1) {
+ if (virNetworkSetAutostart(net, args->autostart) == -1) {
remoteDispatchConnError(rerr, conn);
virNetworkFree(net);
return -1;
@@ -3402,23 +3402,23 @@ remoteDispatchNetworkSetAutostart (struct qemud_server *server ATTRIBUTE_UNUSED,
}
static int
-remoteDispatchNetworkUndefine (struct qemud_server *server ATTRIBUTE_UNUSED,
- struct qemud_client *client ATTRIBUTE_UNUSED,
- virConnectPtr conn,
- remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *rerr,
- remote_network_undefine_args *args,
- void *ret ATTRIBUTE_UNUSED)
+remoteDispatchNetworkUndefine(struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client ATTRIBUTE_UNUSED,
+ virConnectPtr conn,
+ remote_message_header *hdr ATTRIBUTE_UNUSED,
+ remote_error *rerr,
+ remote_network_undefine_args *args,
+ void *ret ATTRIBUTE_UNUSED)
{
virNetworkPtr net;
- net = get_nonnull_network (conn, args->net);
+ net = get_nonnull_network(conn, args->net);
if (net == NULL) {
remoteDispatchConnError(rerr, conn);
return -1;
}
- if (virNetworkUndefine (net) == -1) {
+ if (virNetworkUndefine(net) == -1) {
remoteDispatchConnError(rerr, conn);
virNetworkFree(net);
return -1;
@@ -3428,16 +3428,16 @@ remoteDispatchNetworkUndefine (struct qemud_server *server ATTRIBUTE_UNUSED,
}
static int
-remoteDispatchNumOfDefinedNetworks (struct qemud_server *server ATTRIBUTE_UNUSED,
- struct qemud_client *client ATTRIBUTE_UNUSED,
- virConnectPtr conn,
- remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *rerr,
- void *args ATTRIBUTE_UNUSED,
- remote_num_of_defined_networks_ret *ret)
+remoteDispatchNumOfDefinedNetworks(struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client ATTRIBUTE_UNUSED,
+ virConnectPtr conn,
+ remote_message_header *hdr ATTRIBUTE_UNUSED,
+ remote_error *rerr,
+ void *args ATTRIBUTE_UNUSED,
+ remote_num_of_defined_networks_ret *ret)
{
- ret->num = virConnectNumOfDefinedNetworks (conn);
+ ret->num = virConnectNumOfDefinedNetworks(conn);
if (ret->num == -1) {
remoteDispatchConnError(rerr, conn);
return -1;
@@ -3447,16 +3447,16 @@ remoteDispatchNumOfDefinedNetworks (struct qemud_server *server ATTRIBUTE_UNUSED
}
static int
-remoteDispatchNumOfDomains (struct qemud_server *server ATTRIBUTE_UNUSED,
- struct qemud_client *client ATTRIBUTE_UNUSED,
- virConnectPtr conn,
- remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *rerr,
- void *args ATTRIBUTE_UNUSED,
- remote_num_of_domains_ret *ret)
+remoteDispatchNumOfDomains(struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client ATTRIBUTE_UNUSED,
+ virConnectPtr conn,
+ remote_message_header *hdr ATTRIBUTE_UNUSED,
+ remote_error *rerr,
+ void *args ATTRIBUTE_UNUSED,
+ remote_num_of_domains_ret *ret)
{
- ret->num = virConnectNumOfDomains (conn);
+ ret->num = virConnectNumOfDomains(conn);
if (ret->num == -1) {
remoteDispatchConnError(rerr, conn);
return -1;
@@ -3466,16 +3466,16 @@ remoteDispatchNumOfDomains (struct qemud_server *server ATTRIBUTE_UNUSED,
}
static int
-remoteDispatchNumOfNetworks (struct qemud_server *server ATTRIBUTE_UNUSED,
- struct qemud_client *client ATTRIBUTE_UNUSED,
- virConnectPtr conn,
- remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *rerr,
- void *args ATTRIBUTE_UNUSED,
- remote_num_of_networks_ret *ret)
+remoteDispatchNumOfNetworks(struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client ATTRIBUTE_UNUSED,
+ virConnectPtr conn,
+ remote_message_header *hdr ATTRIBUTE_UNUSED,
+ remote_error *rerr,
+ void *args ATTRIBUTE_UNUSED,
+ remote_num_of_networks_ret *ret)
{
- ret->num = virConnectNumOfNetworks (conn);
+ ret->num = virConnectNumOfNetworks(conn);
if (ret->num == -1) {
remoteDispatchConnError(rerr, conn);
return -1;
@@ -3487,16 +3487,16 @@ remoteDispatchNumOfNetworks (struct qemud_server *server ATTRIBUTE_UNUSED,
/*-------------------------------------------------------------*/
static int
-remoteDispatchNumOfInterfaces (struct qemud_server *server ATTRIBUTE_UNUSED,
- struct qemud_client *client ATTRIBUTE_UNUSED,
- virConnectPtr conn,
- remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *rerr,
- void *args ATTRIBUTE_UNUSED,
- remote_num_of_interfaces_ret *ret)
+remoteDispatchNumOfInterfaces(struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client ATTRIBUTE_UNUSED,
+ virConnectPtr conn,
+ remote_message_header *hdr ATTRIBUTE_UNUSED,
+ remote_error *rerr,
+ void *args ATTRIBUTE_UNUSED,
+ remote_num_of_interfaces_ret *ret)
{
- ret->num = virConnectNumOfInterfaces (conn);
+ ret->num = virConnectNumOfInterfaces(conn);
if (ret->num == -1) {
remoteDispatchConnError(rerr, conn);
return -1;
@@ -3506,17 +3506,17 @@ remoteDispatchNumOfInterfaces (struct qemud_server *server ATTRIBUTE_UNUSED,
}
static int
-remoteDispatchListInterfaces (struct qemud_server *server ATTRIBUTE_UNUSED,
- struct qemud_client *client ATTRIBUTE_UNUSED,
- virConnectPtr conn,
- remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *rerr,
- remote_list_interfaces_args *args,
- remote_list_interfaces_ret *ret)
+remoteDispatchListInterfaces(struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client ATTRIBUTE_UNUSED,
+ virConnectPtr conn,
+ remote_message_header *hdr ATTRIBUTE_UNUSED,
+ remote_error *rerr,
+ remote_list_interfaces_args *args,
+ remote_list_interfaces_ret *ret)
{
if (args->maxnames > REMOTE_INTERFACE_NAME_LIST_MAX) {
- remoteDispatchFormatError (rerr,
+ remoteDispatchFormatError(rerr,
"%s", _("maxnames > REMOTE_INTERFACE_NAME_LIST_MAX"));
return -1;
}
@@ -3528,8 +3528,8 @@ remoteDispatchListInterfaces (struct qemud_server *server ATTRIBUTE_UNUSED,
}
ret->names.names_len =
- virConnectListInterfaces (conn,
- ret->names.names_val, args->maxnames);
+ virConnectListInterfaces(conn,
+ ret->names.names_val, args->maxnames);
if (ret->names.names_len == -1) {
VIR_FREE(ret->names.names_len);
remoteDispatchConnError(rerr, conn);
@@ -3540,16 +3540,16 @@ remoteDispatchListInterfaces (struct qemud_server *server ATTRIBUTE_UNUSED,
}
static int
-remoteDispatchNumOfDefinedInterfaces (struct qemud_server *server ATTRIBUTE_UNUSED,
- struct qemud_client *client ATTRIBUTE_UNUSED,
- virConnectPtr conn,
- remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *rerr,
- void *args ATTRIBUTE_UNUSED,
- remote_num_of_defined_interfaces_ret *ret)
+remoteDispatchNumOfDefinedInterfaces(struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client ATTRIBUTE_UNUSED,
+ virConnectPtr conn,
+ remote_message_header *hdr ATTRIBUTE_UNUSED,
+ remote_error *rerr,
+ void *args ATTRIBUTE_UNUSED,
+ remote_num_of_defined_interfaces_ret *ret)
{
- ret->num = virConnectNumOfDefinedInterfaces (conn);
+ ret->num = virConnectNumOfDefinedInterfaces(conn);
if (ret->num == -1) {
remoteDispatchConnError(rerr, conn);
return -1;
@@ -3559,17 +3559,17 @@ remoteDispatchNumOfDefinedInterfaces (struct qemud_server *server ATTRIBUTE_UNUS
}
static int
-remoteDispatchListDefinedInterfaces (struct qemud_server *server ATTRIBUTE_UNUSED,
- struct qemud_client *client ATTRIBUTE_UNUSED,
- virConnectPtr conn,
- remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *rerr,
- remote_list_defined_interfaces_args *args,
- remote_list_defined_interfaces_ret *ret)
+remoteDispatchListDefinedInterfaces(struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client ATTRIBUTE_UNUSED,
+ virConnectPtr conn,
+ remote_message_header *hdr ATTRIBUTE_UNUSED,
+ remote_error *rerr,
+ remote_list_defined_interfaces_args *args,
+ remote_list_defined_interfaces_ret *ret)
{
if (args->maxnames > REMOTE_DEFINED_INTERFACE_NAME_LIST_MAX) {
- remoteDispatchFormatError (rerr,
+ remoteDispatchFormatError(rerr,
"%s", _("maxnames > REMOTE_DEFINED_INTERFACE_NAME_LIST_MAX"));
return -1;
}
@@ -3581,8 +3581,8 @@ remoteDispatchListDefinedInterfaces (struct qemud_server *server ATTRIBUTE_UNUSE
}
ret->names.names_len =
- virConnectListDefinedInterfaces (conn,
- ret->names.names_val, args->maxnames);
+ virConnectListDefinedInterfaces(conn,
+ ret->names.names_val, args->maxnames);
if (ret->names.names_len == -1) {
VIR_FREE(ret->names.names_len);
remoteDispatchConnError(rerr, conn);
@@ -3593,68 +3593,68 @@ remoteDispatchListDefinedInterfaces (struct qemud_server *server ATTRIBUTE_UNUSE
}
static int
-remoteDispatchInterfaceLookupByName (struct qemud_server *server ATTRIBUTE_UNUSED,
- struct qemud_client *client ATTRIBUTE_UNUSED,
- virConnectPtr conn,
- remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *rerr,
- remote_interface_lookup_by_name_args *args,
- remote_interface_lookup_by_name_ret *ret)
+remoteDispatchInterfaceLookupByName(struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client ATTRIBUTE_UNUSED,
+ virConnectPtr conn,
+ remote_message_header *hdr ATTRIBUTE_UNUSED,
+ remote_error *rerr,
+ remote_interface_lookup_by_name_args *args,
+ remote_interface_lookup_by_name_ret *ret)
{
virInterfacePtr iface;
- iface = virInterfaceLookupByName (conn, args->name);
+ iface = virInterfaceLookupByName(conn, args->name);
if (iface == NULL) {
remoteDispatchConnError(rerr, conn);
return -1;
}
- make_nonnull_interface (&ret->iface, iface);
+ make_nonnull_interface(&ret->iface, iface);
virInterfaceFree(iface);
return 0;
}
static int
-remoteDispatchInterfaceLookupByMacString (struct qemud_server *server ATTRIBUTE_UNUSED,
- struct qemud_client *client ATTRIBUTE_UNUSED,
- virConnectPtr conn,
- remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *rerr,
- remote_interface_lookup_by_mac_string_args *args,
- remote_interface_lookup_by_mac_string_ret *ret)
+remoteDispatchInterfaceLookupByMacString(struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client ATTRIBUTE_UNUSED,
+ virConnectPtr conn,
+ remote_message_header *hdr ATTRIBUTE_UNUSED,
+ remote_error *rerr,
+ remote_interface_lookup_by_mac_string_args *args,
+ remote_interface_lookup_by_mac_string_ret *ret)
{
virInterfacePtr iface;
- iface = virInterfaceLookupByMACString (conn, args->mac);
+ iface = virInterfaceLookupByMACString(conn, args->mac);
if (iface == NULL) {
remoteDispatchConnError(rerr, conn);
return -1;
}
- make_nonnull_interface (&ret->iface, iface);
+ make_nonnull_interface(&ret->iface, iface);
virInterfaceFree(iface);
return 0;
}
-
-static int
-remoteDispatchInterfaceGetXmlDesc (struct qemud_server *server ATTRIBUTE_UNUSED,
- struct qemud_client *client ATTRIBUTE_UNUSED,
- virConnectPtr conn,
- remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *rerr,
- remote_interface_get_xml_desc_args *args,
- remote_interface_get_xml_desc_ret *ret)
+
+static int
+remoteDispatchInterfaceGetXmlDesc(struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client ATTRIBUTE_UNUSED,
+ virConnectPtr conn,
+ remote_message_header *hdr ATTRIBUTE_UNUSED,
+ remote_error *rerr,
+ remote_interface_get_xml_desc_args *args,
+ remote_interface_get_xml_desc_ret *ret)
{
virInterfacePtr iface;
- iface = get_nonnull_interface (conn, args->iface);
+ iface = get_nonnull_interface(conn, args->iface);
if (iface == NULL) {
remoteDispatchConnError(rerr, conn);
return -1;
}
/* remoteDispatchClientRequest will free this. */
- ret->xml = virInterfaceGetXMLDesc (iface, args->flags);
+ ret->xml = virInterfaceGetXMLDesc(iface, args->flags);
if (!ret->xml) {
remoteDispatchConnError(rerr, conn);
virInterfaceFree(iface);
@@ -3665,45 +3665,45 @@ remoteDispatchInterfaceGetXmlDesc (struct qemud_server *server ATTRIBUTE_UNUSED,
}
static int
-remoteDispatchInterfaceDefineXml (struct qemud_server *server ATTRIBUTE_UNUSED,
- struct qemud_client *client ATTRIBUTE_UNUSED,
- virConnectPtr conn,
- remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *rerr,
- remote_interface_define_xml_args *args,
- remote_interface_define_xml_ret *ret)
+remoteDispatchInterfaceDefineXml(struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client ATTRIBUTE_UNUSED,
+ virConnectPtr conn,
+ remote_message_header *hdr ATTRIBUTE_UNUSED,
+ remote_error *rerr,
+ remote_interface_define_xml_args *args,
+ remote_interface_define_xml_ret *ret)
{
virInterfacePtr iface;
- iface = virInterfaceDefineXML (conn, args->xml, args->flags);
+ iface = virInterfaceDefineXML(conn, args->xml, args->flags);
if (iface == NULL) {
remoteDispatchConnError(rerr, conn);
return -1;
}
- make_nonnull_interface (&ret->iface, iface);
+ make_nonnull_interface(&ret->iface, iface);
virInterfaceFree(iface);
return 0;
}
static int
-remoteDispatchInterfaceUndefine (struct qemud_server *server ATTRIBUTE_UNUSED,
- struct qemud_client *client ATTRIBUTE_UNUSED,
- virConnectPtr conn,
- remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *rerr,
- remote_interface_undefine_args *args,
- void *ret ATTRIBUTE_UNUSED)
+remoteDispatchInterfaceUndefine(struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client ATTRIBUTE_UNUSED,
+ virConnectPtr conn,
+ remote_message_header *hdr ATTRIBUTE_UNUSED,
+ remote_error *rerr,
+ remote_interface_undefine_args *args,
+ void *ret ATTRIBUTE_UNUSED)
{
virInterfacePtr iface;
- iface = get_nonnull_interface (conn, args->iface);
+ iface = get_nonnull_interface(conn, args->iface);
if (iface == NULL) {
remoteDispatchConnError(rerr, conn);
return -1;
}
- if (virInterfaceUndefine (iface) == -1) {
+ if (virInterfaceUndefine(iface) == -1) {
remoteDispatchConnError(rerr, conn);
virInterfaceFree(iface);
return -1;
@@ -3713,23 +3713,23 @@ remoteDispatchInterfaceUndefine (struct qemud_server *server ATTRIBUTE_UNUSED,
}
static int
-remoteDispatchInterfaceCreate (struct qemud_server *server ATTRIBUTE_UNUSED,
- struct qemud_client *client ATTRIBUTE_UNUSED,
- virConnectPtr conn,
- remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *rerr,
- remote_interface_create_args *args,
- void *ret ATTRIBUTE_UNUSED)
+remoteDispatchInterfaceCreate(struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client ATTRIBUTE_UNUSED,
+ virConnectPtr conn,
+ remote_message_header *hdr ATTRIBUTE_UNUSED,
+ remote_error *rerr,
+ remote_interface_create_args *args,
+ void *ret ATTRIBUTE_UNUSED)
{
virInterfacePtr iface;
- iface = get_nonnull_interface (conn, args->iface);
+ iface = get_nonnull_interface(conn, args->iface);
if (iface == NULL) {
remoteDispatchConnError(rerr, conn);
return -1;
}
- if (virInterfaceCreate (iface, args->flags) == -1) {
+ if (virInterfaceCreate(iface, args->flags) == -1) {
remoteDispatchConnError(rerr, conn);
virInterfaceFree(iface);
return -1;
@@ -3739,23 +3739,23 @@ remoteDispatchInterfaceCreate (struct qemud_server *server ATTRIBUTE_UNUSED,
}
static int
-remoteDispatchInterfaceDestroy (struct qemud_server *server ATTRIBUTE_UNUSED,
- struct qemud_client *client ATTRIBUTE_UNUSED,
- virConnectPtr conn,
- remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *rerr,
- remote_interface_destroy_args *args,
- void *ret ATTRIBUTE_UNUSED)
+remoteDispatchInterfaceDestroy(struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client ATTRIBUTE_UNUSED,
+ virConnectPtr conn,
+ remote_message_header *hdr ATTRIBUTE_UNUSED,
+ remote_error *rerr,
+ remote_interface_destroy_args *args,
+ void *ret ATTRIBUTE_UNUSED)
{
virInterfacePtr iface;
- iface = get_nonnull_interface (conn, args->iface);
+ iface = get_nonnull_interface(conn, args->iface);
if (iface == NULL) {
remoteDispatchConnError(rerr, conn);
return -1;
}
- if (virInterfaceDestroy (iface, args->flags) == -1) {
+ if (virInterfaceDestroy(iface, args->flags) == -1) {
remoteDispatchConnError(rerr, conn);
virInterfaceFree(iface);
return -1;
@@ -3767,13 +3767,13 @@ remoteDispatchInterfaceDestroy (struct qemud_server *server ATTRIBUTE_UNUSED,
/*-------------------------------------------------------------*/
static int
-remoteDispatchAuthList (struct qemud_server *server,
- struct qemud_client *client,
- virConnectPtr conn ATTRIBUTE_UNUSED,
- remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *rerr,
- void *args ATTRIBUTE_UNUSED,
- remote_auth_list_ret *ret)
+remoteDispatchAuthList(struct qemud_server *server,
+ struct qemud_client *client,
+ virConnectPtr conn ATTRIBUTE_UNUSED,
+ remote_message_header *hdr ATTRIBUTE_UNUSED,
+ remote_error *rerr,
+ void *args ATTRIBUTE_UNUSED,
+ remote_auth_list_ret *ret)
{
ret->types.types_len = 1;
if (VIR_ALLOC_N(ret->types.types_val, ret->types.types_len) < 0) {
@@ -3798,13 +3798,13 @@ remoteDispatchAuthList (struct qemud_server *server,
* XXX callbacks for stuff like password verification ?
*/
static int
-remoteDispatchAuthSaslInit (struct qemud_server *server,
- struct qemud_client *client,
- virConnectPtr conn,
- remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *rerr,
- void *args ATTRIBUTE_UNUSED,
- remote_auth_sasl_init_ret *ret)
+remoteDispatchAuthSaslInit(struct qemud_server *server,
+ struct qemud_client *client,
+ virConnectPtr conn,
+ remote_message_header *hdr ATTRIBUTE_UNUSED,
+ remote_error *rerr,
+ void *args ATTRIBUTE_UNUSED,
+ remote_auth_sasl_init_ret *ret)
{
const char *mechlist = NULL;
sasl_security_properties_t secprops;
@@ -3893,7 +3893,7 @@ remoteDispatchAuthSaslInit (struct qemud_server *server,
}
}
- memset (&secprops, 0, sizeof secprops);
+ memset(&secprops, 0, sizeof secprops);
if (client->type == QEMUD_SOCK_TYPE_TLS ||
client->type == QEMUD_SOCK_TYPE_UNIX) {
/* If we've got TLS or UNIX domain sock, we don't care about SSF */
@@ -3961,8 +3961,8 @@ error:
* Returns 0 if ok, -1 on error, -2 if rejected
*/
static int
-remoteSASLCheckSSF (struct qemud_client *client,
- remote_error *rerr) {
+remoteSASLCheckSSF(struct qemud_client *client,
+ remote_error *rerr) {
const void *val;
int err, ssf;
@@ -4005,9 +4005,9 @@ remoteSASLCheckSSF (struct qemud_client *client,
* Returns 0 if ok, -1 on error, -2 if rejected
*/
static int
-remoteSASLCheckAccess (struct qemud_server *server,
- struct qemud_client *client,
- remote_error *rerr) {
+remoteSASLCheckAccess(struct qemud_server *server,
+ struct qemud_client *client,
+ remote_error *rerr) {
const void *val;
int err;
char **wildcards;
@@ -4045,7 +4045,7 @@ remoteSASLCheckAccess (struct qemud_server *server,
return 0; /* No ACL, allow all */
while (*wildcards) {
- if (fnmatch (*wildcards, client->saslUsername, 0) == 0)
+ if (fnmatch(*wildcards, client->saslUsername, 0) == 0)
return 0; /* Allowed */
wildcards++;
}
@@ -4063,13 +4063,13 @@ remoteSASLCheckAccess (struct qemud_server *server,
* This starts the SASL authentication negotiation.
*/
static int
-remoteDispatchAuthSaslStart (struct qemud_server *server,
- struct qemud_client *client,
- virConnectPtr conn ATTRIBUTE_UNUSED,
- remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *rerr,
- remote_auth_sasl_start_args *args,
- remote_auth_sasl_start_ret *ret)
+remoteDispatchAuthSaslStart(struct qemud_server *server,
+ struct qemud_client *client,
+ virConnectPtr conn ATTRIBUTE_UNUSED,
+ remote_message_header *hdr ATTRIBUTE_UNUSED,
+ remote_error *rerr,
+ remote_auth_sasl_start_args *args,
+ remote_auth_sasl_start_ret *ret)
{
const char *serverout;
unsigned int serveroutlen;
@@ -4163,13 +4163,13 @@ error:
static int
-remoteDispatchAuthSaslStep (struct qemud_server *server,
- struct qemud_client *client,
- virConnectPtr conn ATTRIBUTE_UNUSED,
- remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *rerr,
- remote_auth_sasl_step_args *args,
- remote_auth_sasl_step_ret *ret)
+remoteDispatchAuthSaslStep(struct qemud_server *server,
+ struct qemud_client *client,
+ virConnectPtr conn ATTRIBUTE_UNUSED,
+ remote_message_header *hdr ATTRIBUTE_UNUSED,
+ remote_error *rerr,
+ remote_auth_sasl_step_args *args,
+ remote_auth_sasl_step_ret *ret)
{
const char *serverout;
unsigned int serveroutlen;
@@ -4265,13 +4265,13 @@ error:
#else /* HAVE_SASL */
static int
-remoteDispatchAuthSaslInit (struct qemud_server *server ATTRIBUTE_UNUSED,
- struct qemud_client *client ATTRIBUTE_UNUSED,
- virConnectPtr conn ATTRIBUTE_UNUSED,
- remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *rerr,
- void *args ATTRIBUTE_UNUSED,
- remote_auth_sasl_init_ret *ret ATTRIBUTE_UNUSED)
+remoteDispatchAuthSaslInit(struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client ATTRIBUTE_UNUSED,
+ virConnectPtr conn ATTRIBUTE_UNUSED,
+ remote_message_header *hdr ATTRIBUTE_UNUSED,
+ remote_error *rerr,
+ void *args ATTRIBUTE_UNUSED,
+ remote_auth_sasl_init_ret *ret ATTRIBUTE_UNUSED)
{
VIR_ERROR0(_("client tried unsupported SASL init request"));
PROBE(CLIENT_AUTH_FAIL, "fd=%d, auth=%d", client->fd, REMOTE_AUTH_SASL);
@@ -4280,13 +4280,13 @@ remoteDispatchAuthSaslInit (struct qemud_server *server ATTRIBUTE_UNUSED,
}
static int
-remoteDispatchAuthSaslStart (struct qemud_server *server ATTRIBUTE_UNUSED,
- struct qemud_client *client ATTRIBUTE_UNUSED,
- virConnectPtr conn ATTRIBUTE_UNUSED,
- remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *rerr,
- remote_auth_sasl_start_args *args ATTRIBUTE_UNUSED,
- remote_auth_sasl_start_ret *ret ATTRIBUTE_UNUSED)
+remoteDispatchAuthSaslStart(struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client ATTRIBUTE_UNUSED,
+ virConnectPtr conn ATTRIBUTE_UNUSED,
+ remote_message_header *hdr ATTRIBUTE_UNUSED,
+ remote_error *rerr,
+ remote_auth_sasl_start_args *args ATTRIBUTE_UNUSED,
+ remote_auth_sasl_start_ret *ret ATTRIBUTE_UNUSED)
{
VIR_ERROR0(_("client tried unsupported SASL start request"));
PROBE(CLIENT_AUTH_FAIL, "fd=%d, auth=%d", client->fd, REMOTE_AUTH_SASL);
@@ -4295,13 +4295,13 @@ remoteDispatchAuthSaslStart (struct qemud_server *server ATTRIBUTE_UNUSED,
}
static int
-remoteDispatchAuthSaslStep (struct qemud_server *server ATTRIBUTE_UNUSED,
- struct qemud_client *client ATTRIBUTE_UNUSED,
- virConnectPtr conn ATTRIBUTE_UNUSED,
- remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *rerr,
- remote_auth_sasl_step_args *args ATTRIBUTE_UNUSED,
- remote_auth_sasl_step_ret *ret ATTRIBUTE_UNUSED)
+remoteDispatchAuthSaslStep(struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client ATTRIBUTE_UNUSED,
+ virConnectPtr conn ATTRIBUTE_UNUSED,
+ remote_message_header *hdr ATTRIBUTE_UNUSED,
+ remote_error *rerr,
+ remote_auth_sasl_step_args *args ATTRIBUTE_UNUSED,
+ remote_auth_sasl_step_ret *ret ATTRIBUTE_UNUSED)
{
VIR_ERROR0(_("client tried unsupported SASL step request"));
PROBE(CLIENT_AUTH_FAIL, "fd=%d, auth=%d", client->fd, REMOTE_AUTH_SASL);
@@ -4313,13 +4313,13 @@ remoteDispatchAuthSaslStep (struct qemud_server *server ATTRIBUTE_UNUSED,
#if HAVE_POLKIT1
static int
-remoteDispatchAuthPolkit (struct qemud_server *server,
- struct qemud_client *client,
- virConnectPtr conn ATTRIBUTE_UNUSED,
- remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *rerr,
- void *args ATTRIBUTE_UNUSED,
- remote_auth_polkit_ret *ret)
+remoteDispatchAuthPolkit(struct qemud_server *server,
+ struct qemud_client *client,
+ virConnectPtr conn ATTRIBUTE_UNUSED,
+ remote_message_header *hdr ATTRIBUTE_UNUSED,
+ remote_error *rerr,
+ void *args ATTRIBUTE_UNUSED,
+ remote_auth_polkit_ret *ret)
{
pid_t callerPid = -1;
uid_t callerUid = -1;
@@ -4409,13 +4409,13 @@ error:
}
#elif HAVE_POLKIT0
static int
-remoteDispatchAuthPolkit (struct qemud_server *server,
- struct qemud_client *client,
- virConnectPtr conn ATTRIBUTE_UNUSED,
- remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *rerr,
- void *args ATTRIBUTE_UNUSED,
- remote_auth_polkit_ret *ret)
+remoteDispatchAuthPolkit(struct qemud_server *server,
+ struct qemud_client *client,
+ virConnectPtr conn ATTRIBUTE_UNUSED,
+ remote_message_header *hdr ATTRIBUTE_UNUSED,
+ remote_error *rerr,
+ void *args ATTRIBUTE_UNUSED,
+ remote_auth_polkit_ret *ret)
{
pid_t callerPid;
uid_t callerUid;
@@ -4543,13 +4543,13 @@ error:
#else /* !HAVE_POLKIT0 & !HAVE_POLKIT1*/
static int
-remoteDispatchAuthPolkit (struct qemud_server *server ATTRIBUTE_UNUSED,
- struct qemud_client *client ATTRIBUTE_UNUSED,
- virConnectPtr conn ATTRIBUTE_UNUSED,
- remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *rerr,
- void *args ATTRIBUTE_UNUSED,
- remote_auth_polkit_ret *ret ATTRIBUTE_UNUSED)
+remoteDispatchAuthPolkit(struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client ATTRIBUTE_UNUSED,
+ virConnectPtr conn ATTRIBUTE_UNUSED,
+ remote_message_header *hdr ATTRIBUTE_UNUSED,
+ remote_error *rerr,
+ void *args ATTRIBUTE_UNUSED,
+ remote_auth_polkit_ret *ret ATTRIBUTE_UNUSED)
{
VIR_ERROR0(_("client tried unsupported PolicyKit init request"));
remoteDispatchAuthError(rerr);
@@ -4564,17 +4564,17 @@ remoteDispatchAuthPolkit (struct qemud_server *server ATTRIBUTE_UNUSED,
static int
-remoteDispatchListDefinedStoragePools (struct qemud_server *server ATTRIBUTE_UNUSED,
- struct qemud_client *client ATTRIBUTE_UNUSED,
- virConnectPtr conn,
- remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *rerr,
- remote_list_defined_storage_pools_args *args,
- remote_list_defined_storage_pools_ret *ret)
+remoteDispatchListDefinedStoragePools(struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client ATTRIBUTE_UNUSED,
+ virConnectPtr conn,
+ remote_message_header *hdr ATTRIBUTE_UNUSED,
+ remote_error *rerr,
+ remote_list_defined_storage_pools_args *args,
+ remote_list_defined_storage_pools_ret *ret)
{
if (args->maxnames > REMOTE_NETWORK_NAME_LIST_MAX) {
- remoteDispatchFormatError (rerr, "%s",
+ remoteDispatchFormatError(rerr, "%s",
_("maxnames > REMOTE_NETWORK_NAME_LIST_MAX"));
return -1;
}
@@ -4586,8 +4586,8 @@ remoteDispatchListDefinedStoragePools (struct qemud_server *server ATTRIBUTE_UNU
}
ret->names.names_len =
- virConnectListDefinedStoragePools (conn,
- ret->names.names_val, args->maxnames);
+ virConnectListDefinedStoragePools(conn,
+ ret->names.names_val, args->maxnames);
if (ret->names.names_len == -1) {
VIR_FREE(ret->names.names_val);
remoteDispatchConnError(rerr, conn);
@@ -4598,17 +4598,17 @@ remoteDispatchListDefinedStoragePools (struct qemud_server *server ATTRIBUTE_UNU
}
static int
-remoteDispatchListStoragePools (struct qemud_server *server ATTRIBUTE_UNUSED,
- struct qemud_client *client ATTRIBUTE_UNUSED,
- virConnectPtr conn,
- remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *rerr,
- remote_list_storage_pools_args *args,
- remote_list_storage_pools_ret *ret)
+remoteDispatchListStoragePools(struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client ATTRIBUTE_UNUSED,
+ virConnectPtr conn,
+ remote_message_header *hdr ATTRIBUTE_UNUSED,
+ remote_error *rerr,
+ remote_list_storage_pools_args *args,
+ remote_list_storage_pools_ret *ret)
{
if (args->maxnames > REMOTE_STORAGE_POOL_NAME_LIST_MAX) {
- remoteDispatchFormatError (rerr,
+ remoteDispatchFormatError(rerr,
"%s", _("maxnames > REMOTE_STORAGE_POOL_NAME_LIST_MAX"));
return -1;
}
@@ -4620,8 +4620,8 @@ remoteDispatchListStoragePools (struct qemud_server *server ATTRIBUTE_UNUSED,
}
ret->names.names_len =
- virConnectListStoragePools (conn,
- ret->names.names_val, args->maxnames);
+ virConnectListStoragePools(conn,
+ ret->names.names_val, args->maxnames);
if (ret->names.names_len == -1) {
VIR_FREE(ret->names.names_val);
remoteDispatchConnError(rerr, conn);
@@ -4632,19 +4632,19 @@ remoteDispatchListStoragePools (struct qemud_server *server ATTRIBUTE_UNUSED,
}
static int
-remoteDispatchFindStoragePoolSources (struct qemud_server *server ATTRIBUTE_UNUSED,
- struct qemud_client *client ATTRIBUTE_UNUSED,
- virConnectPtr conn,
- remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *rerr,
- remote_find_storage_pool_sources_args *args,
- remote_find_storage_pool_sources_ret *ret)
+remoteDispatchFindStoragePoolSources(struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client ATTRIBUTE_UNUSED,
+ virConnectPtr conn,
+ remote_message_header *hdr ATTRIBUTE_UNUSED,
+ remote_error *rerr,
+ remote_find_storage_pool_sources_args *args,
+ remote_find_storage_pool_sources_ret *ret)
{
ret->xml =
- virConnectFindStoragePoolSources (conn,
- args->type,
- args->srcSpec ? *args->srcSpec : NULL,
- args->flags);
+ virConnectFindStoragePoolSources(conn,
+ args->type,
+ args->srcSpec ? *args->srcSpec : NULL,
+ args->flags);
if (ret->xml == NULL) {
remoteDispatchConnError(rerr, conn);
return -1;
@@ -4655,23 +4655,23 @@ remoteDispatchFindStoragePoolSources (struct qemud_server *server ATTRIBUTE_UNUS
static int
-remoteDispatchStoragePoolCreate (struct qemud_server *server ATTRIBUTE_UNUSED,
- struct qemud_client *client ATTRIBUTE_UNUSED,
- virConnectPtr conn,
- remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *rerr,
- remote_storage_pool_create_args *args,
- void *ret ATTRIBUTE_UNUSED)
+remoteDispatchStoragePoolCreate(struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client ATTRIBUTE_UNUSED,
+ virConnectPtr conn,
+ remote_message_header *hdr ATTRIBUTE_UNUSED,
+ remote_error *rerr,
+ remote_storage_pool_create_args *args,
+ void *ret ATTRIBUTE_UNUSED)
{
virStoragePoolPtr pool;
- pool = get_nonnull_storage_pool (conn, args->pool);
+ pool = get_nonnull_storage_pool(conn, args->pool);
if (pool == NULL) {
remoteDispatchConnError(rerr, conn);
return -1;
}
- if (virStoragePoolCreate (pool, args->flags) == -1) {
+ if (virStoragePoolCreate(pool, args->flags) == -1) {
remoteDispatchConnError(rerr, conn);
virStoragePoolFree(pool);
return -1;
@@ -4681,67 +4681,67 @@ remoteDispatchStoragePoolCreate (struct qemud_server *server ATTRIBUTE_UNUSED,
}
static int
-remoteDispatchStoragePoolCreateXml (struct qemud_server *server ATTRIBUTE_UNUSED,
- struct qemud_client *client ATTRIBUTE_UNUSED,
- virConnectPtr conn,
- remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *rerr,
- remote_storage_pool_create_xml_args *args,
- remote_storage_pool_create_xml_ret *ret)
+remoteDispatchStoragePoolCreateXml(struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client ATTRIBUTE_UNUSED,
+ virConnectPtr conn,
+ remote_message_header *hdr ATTRIBUTE_UNUSED,
+ remote_error *rerr,
+ remote_storage_pool_create_xml_args *args,
+ remote_storage_pool_create_xml_ret *ret)
{
virStoragePoolPtr pool;
- pool = virStoragePoolCreateXML (conn, args->xml, args->flags);
+ pool = virStoragePoolCreateXML(conn, args->xml, args->flags);
if (pool == NULL) {
remoteDispatchConnError(rerr, conn);
return -1;
}
- make_nonnull_storage_pool (&ret->pool, pool);
+ make_nonnull_storage_pool(&ret->pool, pool);
virStoragePoolFree(pool);
return 0;
}
static int
-remoteDispatchStoragePoolDefineXml (struct qemud_server *server ATTRIBUTE_UNUSED,
- struct qemud_client *client ATTRIBUTE_UNUSED,
- virConnectPtr conn,
- remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *rerr,
- remote_storage_pool_define_xml_args *args,
- remote_storage_pool_define_xml_ret *ret)
+remoteDispatchStoragePoolDefineXml(struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client ATTRIBUTE_UNUSED,
+ virConnectPtr conn,
+ remote_message_header *hdr ATTRIBUTE_UNUSED,
+ remote_error *rerr,
+ remote_storage_pool_define_xml_args *args,
+ remote_storage_pool_define_xml_ret *ret)
{
virStoragePoolPtr pool;
- pool = virStoragePoolDefineXML (conn, args->xml, args->flags);
+ pool = virStoragePoolDefineXML(conn, args->xml, args->flags);
if (pool == NULL) {
remoteDispatchConnError(rerr, conn);
return -1;
}
- make_nonnull_storage_pool (&ret->pool, pool);
+ make_nonnull_storage_pool(&ret->pool, pool);
virStoragePoolFree(pool);
return 0;
}
static int
-remoteDispatchStoragePoolBuild (struct qemud_server *server ATTRIBUTE_UNUSED,
- struct qemud_client *client ATTRIBUTE_UNUSED,
- virConnectPtr conn,
- remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *rerr,
- remote_storage_pool_build_args *args,
- void *ret ATTRIBUTE_UNUSED)
+remoteDispatchStoragePoolBuild(struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client ATTRIBUTE_UNUSED,
+ virConnectPtr conn,
+ remote_message_header *hdr ATTRIBUTE_UNUSED,
+ remote_error *rerr,
+ remote_storage_pool_build_args *args,
+ void *ret ATTRIBUTE_UNUSED)
{
virStoragePoolPtr pool;
- pool = get_nonnull_storage_pool (conn, args->pool);
+ pool = get_nonnull_storage_pool(conn, args->pool);
if (pool == NULL) {
remoteDispatchConnError(rerr, conn);
return -1;
}
- if (virStoragePoolBuild (pool, args->flags) == -1) {
+ if (virStoragePoolBuild(pool, args->flags) == -1) {
remoteDispatchConnError(rerr, conn);
virStoragePoolFree(pool);
return -1;
@@ -4752,23 +4752,23 @@ remoteDispatchStoragePoolBuild (struct qemud_server *server ATTRIBUTE_UNUSED,
static int
-remoteDispatchStoragePoolDestroy (struct qemud_server *server ATTRIBUTE_UNUSED,
- struct qemud_client *client ATTRIBUTE_UNUSED,
- virConnectPtr conn,
- remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *rerr,
- remote_storage_pool_destroy_args *args,
- void *ret ATTRIBUTE_UNUSED)
+remoteDispatchStoragePoolDestroy(struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client ATTRIBUTE_UNUSED,
+ virConnectPtr conn,
+ remote_message_header *hdr ATTRIBUTE_UNUSED,
+ remote_error *rerr,
+ remote_storage_pool_destroy_args *args,
+ void *ret ATTRIBUTE_UNUSED)
{
virStoragePoolPtr pool;
- pool = get_nonnull_storage_pool (conn, args->pool);
+ pool = get_nonnull_storage_pool(conn, args->pool);
if (pool == NULL) {
remoteDispatchConnError(rerr, conn);
return -1;
}
- if (virStoragePoolDestroy (pool) == -1) {
+ if (virStoragePoolDestroy(pool) == -1) {
remoteDispatchConnError(rerr, conn);
virStoragePoolFree(pool);
return -1;
@@ -4778,23 +4778,23 @@ remoteDispatchStoragePoolDestroy (struct qemud_server *server ATTRIBUTE_UNUSED,
}
static int
-remoteDispatchStoragePoolDelete (struct qemud_server *server ATTRIBUTE_UNUSED,
- struct qemud_client *client ATTRIBUTE_UNUSED,
- virConnectPtr conn,
- remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *rerr,
- remote_storage_pool_delete_args *args,
- void *ret ATTRIBUTE_UNUSED)
+remoteDispatchStoragePoolDelete(struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client ATTRIBUTE_UNUSED,
+ virConnectPtr conn,
+ remote_message_header *hdr ATTRIBUTE_UNUSED,
+ remote_error *rerr,
+ remote_storage_pool_delete_args *args,
+ void *ret ATTRIBUTE_UNUSED)
{
virStoragePoolPtr pool;
- pool = get_nonnull_storage_pool (conn, args->pool);
+ pool = get_nonnull_storage_pool(conn, args->pool);
if (pool == NULL) {
remoteDispatchConnError(rerr, conn);
return -1;
}
- if (virStoragePoolDelete (pool, args->flags) == -1) {
+ if (virStoragePoolDelete(pool, args->flags) == -1) {
remoteDispatchConnError(rerr, conn);
virStoragePoolFree(pool);
return -1;
@@ -4804,23 +4804,23 @@ remoteDispatchStoragePoolDelete (struct qemud_server *server ATTRIBUTE_UNUSED,
}
static int
-remoteDispatchStoragePoolRefresh (struct qemud_server *server ATTRIBUTE_UNUSED,
- struct qemud_client *client ATTRIBUTE_UNUSED,
- virConnectPtr conn,
- remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *rerr,
- remote_storage_pool_refresh_args *args,
- void *ret ATTRIBUTE_UNUSED)
+remoteDispatchStoragePoolRefresh(struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client ATTRIBUTE_UNUSED,
+ virConnectPtr conn,
+ remote_message_header *hdr ATTRIBUTE_UNUSED,
+ remote_error *rerr,
+ remote_storage_pool_refresh_args *args,
+ void *ret ATTRIBUTE_UNUSED)
{
virStoragePoolPtr pool;
- pool = get_nonnull_storage_pool (conn, args->pool);
+ pool = get_nonnull_storage_pool(conn, args->pool);
if (pool == NULL) {
remoteDispatchConnError(rerr, conn);
return -1;
}
- if (virStoragePoolRefresh (pool, args->flags) == -1) {
+ if (virStoragePoolRefresh(pool, args->flags) == -1) {
remoteDispatchConnError(rerr, conn);
virStoragePoolFree(pool);
return -1;
@@ -4830,24 +4830,24 @@ remoteDispatchStoragePoolRefresh (struct qemud_server *server ATTRIBUTE_UNUSED,
}
static int
-remoteDispatchStoragePoolGetInfo (struct qemud_server *server ATTRIBUTE_UNUSED,
- struct qemud_client *client ATTRIBUTE_UNUSED,
- virConnectPtr conn,
- remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *rerr,
- remote_storage_pool_get_info_args *args,
- remote_storage_pool_get_info_ret *ret)
+remoteDispatchStoragePoolGetInfo(struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client ATTRIBUTE_UNUSED,
+ virConnectPtr conn,
+ remote_message_header *hdr ATTRIBUTE_UNUSED,
+ remote_error *rerr,
+ remote_storage_pool_get_info_args *args,
+ remote_storage_pool_get_info_ret *ret)
{
virStoragePoolPtr pool;
virStoragePoolInfo info;
- pool = get_nonnull_storage_pool (conn, args->pool);
+ pool = get_nonnull_storage_pool(conn, args->pool);
if (pool == NULL) {
remoteDispatchConnError(rerr, conn);
return -1;
}
- if (virStoragePoolGetInfo (pool, &info) == -1) {
+ if (virStoragePoolGetInfo(pool, &info) == -1) {
remoteDispatchConnError(rerr, conn);
virStoragePoolFree(pool);
return -1;
@@ -4864,24 +4864,24 @@ remoteDispatchStoragePoolGetInfo (struct qemud_server *server ATTRIBUTE_UNUSED,
}
static int
-remoteDispatchStoragePoolDumpXml (struct qemud_server *server ATTRIBUTE_UNUSED,
- struct qemud_client *client ATTRIBUTE_UNUSED,
- virConnectPtr conn,
- remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *rerr,
- remote_storage_pool_dump_xml_args *args,
- remote_storage_pool_dump_xml_ret *ret)
+remoteDispatchStoragePoolDumpXml(struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client ATTRIBUTE_UNUSED,
+ virConnectPtr conn,
+ remote_message_header *hdr ATTRIBUTE_UNUSED,
+ remote_error *rerr,
+ remote_storage_pool_dump_xml_args *args,
+ remote_storage_pool_dump_xml_ret *ret)
{
virStoragePoolPtr pool;
- pool = get_nonnull_storage_pool (conn, args->pool);
+ pool = get_nonnull_storage_pool(conn, args->pool);
if (pool == NULL) {
remoteDispatchConnError(rerr, conn);
return -1;
}
/* remoteDispatchClientRequest will free this. */
- ret->xml = virStoragePoolGetXMLDesc (pool, args->flags);
+ ret->xml = virStoragePoolGetXMLDesc(pool, args->flags);
if (!ret->xml) {
remoteDispatchConnError(rerr, conn);
virStoragePoolFree(pool);
@@ -4892,23 +4892,23 @@ remoteDispatchStoragePoolDumpXml (struct qemud_server *server ATTRIBUTE_UNUSED,
}
static int
-remoteDispatchStoragePoolGetAutostart (struct qemud_server *server ATTRIBUTE_UNUSED,
- struct qemud_client *client ATTRIBUTE_UNUSED,
- virConnectPtr conn,
- remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *rerr,
- remote_storage_pool_get_autostart_args *args,
- remote_storage_pool_get_autostart_ret *ret)
+remoteDispatchStoragePoolGetAutostart(struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client ATTRIBUTE_UNUSED,
+ virConnectPtr conn,
+ remote_message_header *hdr ATTRIBUTE_UNUSED,
+ remote_error *rerr,
+ remote_storage_pool_get_autostart_args *args,
+ remote_storage_pool_get_autostart_ret *ret)
{
virStoragePoolPtr pool;
- pool = get_nonnull_storage_pool (conn, args->pool);
+ pool = get_nonnull_storage_pool(conn, args->pool);
if (pool == NULL) {
remoteDispatchConnError(rerr, conn);
return -1;
}
- if (virStoragePoolGetAutostart (pool, &ret->autostart) == -1) {
+ if (virStoragePoolGetAutostart(pool, &ret->autostart) == -1) {
remoteDispatchConnError(rerr, conn);
virStoragePoolFree(pool);
return -1;
@@ -4919,68 +4919,68 @@ remoteDispatchStoragePoolGetAutostart (struct qemud_server *server ATTRIBUTE_UNU
static int
-remoteDispatchStoragePoolLookupByName (struct qemud_server *server ATTRIBUTE_UNUSED,
- struct qemud_client *client ATTRIBUTE_UNUSED,
- virConnectPtr conn,
- remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *rerr,
- remote_storage_pool_lookup_by_name_args *args,
- remote_storage_pool_lookup_by_name_ret *ret)
+remoteDispatchStoragePoolLookupByName(struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client ATTRIBUTE_UNUSED,
+ virConnectPtr conn,
+ remote_message_header *hdr ATTRIBUTE_UNUSED,
+ remote_error *rerr,
+ remote_storage_pool_lookup_by_name_args *args,
+ remote_storage_pool_lookup_by_name_ret *ret)
{
virStoragePoolPtr pool;
- pool = virStoragePoolLookupByName (conn, args->name);
+ pool = virStoragePoolLookupByName(conn, args->name);
if (pool == NULL) {
remoteDispatchConnError(rerr, conn);
return -1;
}
- make_nonnull_storage_pool (&ret->pool, pool);
+ make_nonnull_storage_pool(&ret->pool, pool);
virStoragePoolFree(pool);
return 0;
}
static int
-remoteDispatchStoragePoolLookupByUuid (struct qemud_server *server ATTRIBUTE_UNUSED,
- struct qemud_client *client ATTRIBUTE_UNUSED,
- virConnectPtr conn,
- remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *rerr,
- remote_storage_pool_lookup_by_uuid_args *args,
- remote_storage_pool_lookup_by_uuid_ret *ret)
+remoteDispatchStoragePoolLookupByUuid(struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client ATTRIBUTE_UNUSED,
+ virConnectPtr conn,
+ remote_message_header *hdr ATTRIBUTE_UNUSED,
+ remote_error *rerr,
+ remote_storage_pool_lookup_by_uuid_args *args,
+ remote_storage_pool_lookup_by_uuid_ret *ret)
{
virStoragePoolPtr pool;
- pool = virStoragePoolLookupByUUID (conn, (unsigned char *) args->uuid);
+ pool = virStoragePoolLookupByUUID(conn, (unsigned char *) args->uuid);
if (pool == NULL) {
remoteDispatchConnError(rerr, conn);
return -1;
}
- make_nonnull_storage_pool (&ret->pool, pool);
+ make_nonnull_storage_pool(&ret->pool, pool);
virStoragePoolFree(pool);
return 0;
}
static int
-remoteDispatchStoragePoolLookupByVolume (struct qemud_server *server ATTRIBUTE_UNUSED,
- struct qemud_client *client ATTRIBUTE_UNUSED,
- virConnectPtr conn,
- remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *rerr,
- remote_storage_pool_lookup_by_volume_args *args,
- remote_storage_pool_lookup_by_volume_ret *ret)
+remoteDispatchStoragePoolLookupByVolume(struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client ATTRIBUTE_UNUSED,
+ virConnectPtr conn,
+ remote_message_header *hdr ATTRIBUTE_UNUSED,
+ remote_error *rerr,
+ remote_storage_pool_lookup_by_volume_args *args,
+ remote_storage_pool_lookup_by_volume_ret *ret)
{
virStoragePoolPtr pool;
virStorageVolPtr vol;
- vol = get_nonnull_storage_vol (conn, args->vol);
+ vol = get_nonnull_storage_vol(conn, args->vol);
if (vol == NULL) {
remoteDispatchConnError(rerr, conn);
return -1;
}
- pool = virStoragePoolLookupByVolume (vol);
+ pool = virStoragePoolLookupByVolume(vol);
if (pool == NULL) {
remoteDispatchConnError(rerr, conn);
virStorageVolFree(vol);
@@ -4988,29 +4988,29 @@ remoteDispatchStoragePoolLookupByVolume (struct qemud_server *server ATTRIBUTE_U
}
virStorageVolFree(vol);
- make_nonnull_storage_pool (&ret->pool, pool);
+ make_nonnull_storage_pool(&ret->pool, pool);
virStoragePoolFree(pool);
return 0;
}
static int
-remoteDispatchStoragePoolSetAutostart (struct qemud_server *server ATTRIBUTE_UNUSED,
- struct qemud_client *client ATTRIBUTE_UNUSED,
- virConnectPtr conn,
- remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *rerr,
- remote_storage_pool_set_autostart_args *args,
- void *ret ATTRIBUTE_UNUSED)
+remoteDispatchStoragePoolSetAutostart(struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client ATTRIBUTE_UNUSED,
+ virConnectPtr conn,
+ remote_message_header *hdr ATTRIBUTE_UNUSED,
+ remote_error *rerr,
+ remote_storage_pool_set_autostart_args *args,
+ void *ret ATTRIBUTE_UNUSED)
{
virStoragePoolPtr pool;
- pool = get_nonnull_storage_pool (conn, args->pool);
+ pool = get_nonnull_storage_pool(conn, args->pool);
if (pool == NULL) {
remoteDispatchConnError(rerr, conn);
return -1;
}
- if (virStoragePoolSetAutostart (pool, args->autostart) == -1) {
+ if (virStoragePoolSetAutostart(pool, args->autostart) == -1) {
remoteDispatchConnError(rerr, conn);
virStoragePoolFree(pool);
return -1;
@@ -5020,23 +5020,23 @@ remoteDispatchStoragePoolSetAutostart (struct qemud_server *server ATTRIBUTE_UNU
}
static int
-remoteDispatchStoragePoolUndefine (struct qemud_server *server ATTRIBUTE_UNUSED,
- struct qemud_client *client ATTRIBUTE_UNUSED,
- virConnectPtr conn,
- remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *rerr,
- remote_storage_pool_undefine_args *args,
- void *ret ATTRIBUTE_UNUSED)
+remoteDispatchStoragePoolUndefine(struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client ATTRIBUTE_UNUSED,
+ virConnectPtr conn,
+ remote_message_header *hdr ATTRIBUTE_UNUSED,
+ remote_error *rerr,
+ remote_storage_pool_undefine_args *args,
+ void *ret ATTRIBUTE_UNUSED)
{
virStoragePoolPtr pool;
- pool = get_nonnull_storage_pool (conn, args->pool);
+ pool = get_nonnull_storage_pool(conn, args->pool);
if (pool == NULL) {
remoteDispatchConnError(rerr, conn);
return -1;
}
- if (virStoragePoolUndefine (pool) == -1) {
+ if (virStoragePoolUndefine(pool) == -1) {
remoteDispatchConnError(rerr, conn);
virStoragePoolFree(pool);
return -1;
@@ -5046,16 +5046,16 @@ remoteDispatchStoragePoolUndefine (struct qemud_server *server ATTRIBUTE_UNUSED,
}
static int
-remoteDispatchNumOfStoragePools (struct qemud_server *server ATTRIBUTE_UNUSED,
- struct qemud_client *client ATTRIBUTE_UNUSED,
- virConnectPtr conn,
- remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *rerr,
- void *args ATTRIBUTE_UNUSED,
- remote_num_of_storage_pools_ret *ret)
+remoteDispatchNumOfStoragePools(struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client ATTRIBUTE_UNUSED,
+ virConnectPtr conn,
+ remote_message_header *hdr ATTRIBUTE_UNUSED,
+ remote_error *rerr,
+ void *args ATTRIBUTE_UNUSED,
+ remote_num_of_storage_pools_ret *ret)
{
- ret->num = virConnectNumOfStoragePools (conn);
+ ret->num = virConnectNumOfStoragePools(conn);
if (ret->num == -1) {
remoteDispatchConnError(rerr, conn);
return -1;
@@ -5065,16 +5065,16 @@ remoteDispatchNumOfStoragePools (struct qemud_server *server ATTRIBUTE_UNUSED,
}
static int
-remoteDispatchNumOfDefinedStoragePools (struct qemud_server *server ATTRIBUTE_UNUSED,
- struct qemud_client *client ATTRIBUTE_UNUSED,
- virConnectPtr conn,
- remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *rerr,
- void *args ATTRIBUTE_UNUSED,
- remote_num_of_defined_storage_pools_ret *ret)
+remoteDispatchNumOfDefinedStoragePools(struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client ATTRIBUTE_UNUSED,
+ virConnectPtr conn,
+ remote_message_header *hdr ATTRIBUTE_UNUSED,
+ remote_error *rerr,
+ void *args ATTRIBUTE_UNUSED,
+ remote_num_of_defined_storage_pools_ret *ret)
{
- ret->num = virConnectNumOfDefinedStoragePools (conn);
+ ret->num = virConnectNumOfDefinedStoragePools(conn);
if (ret->num == -1) {
remoteDispatchConnError(rerr, conn);
return -1;
@@ -5084,23 +5084,23 @@ remoteDispatchNumOfDefinedStoragePools (struct qemud_server *server ATTRIBUTE_UN
}
static int
-remoteDispatchStoragePoolListVolumes (struct qemud_server *server ATTRIBUTE_UNUSED,
- struct qemud_client *client ATTRIBUTE_UNUSED,
- virConnectPtr conn,
- remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *rerr,
- remote_storage_pool_list_volumes_args *args,
- remote_storage_pool_list_volumes_ret *ret)
+remoteDispatchStoragePoolListVolumes(struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client ATTRIBUTE_UNUSED,
+ virConnectPtr conn,
+ remote_message_header *hdr ATTRIBUTE_UNUSED,
+ remote_error *rerr,
+ remote_storage_pool_list_volumes_args *args,
+ remote_storage_pool_list_volumes_ret *ret)
{
virStoragePoolPtr pool;
if (args->maxnames > REMOTE_STORAGE_VOL_NAME_LIST_MAX) {
- remoteDispatchFormatError (rerr,
+ remoteDispatchFormatError(rerr,
"%s", _("maxnames > REMOTE_STORAGE_VOL_NAME_LIST_MAX"));
return -1;
}
- pool = get_nonnull_storage_pool (conn, args->pool);
+ pool = get_nonnull_storage_pool(conn, args->pool);
if (pool == NULL) {
remoteDispatchConnError(rerr, conn);
return -1;
@@ -5114,8 +5114,8 @@ remoteDispatchStoragePoolListVolumes (struct qemud_server *server ATTRIBUTE_UNUS
}
ret->names.names_len =
- virStoragePoolListVolumes (pool,
- ret->names.names_val, args->maxnames);
+ virStoragePoolListVolumes(pool,
+ ret->names.names_val, args->maxnames);
if (ret->names.names_len == -1) {
VIR_FREE(ret->names.names_val);
remoteDispatchConnError(rerr, conn);
@@ -5129,23 +5129,23 @@ remoteDispatchStoragePoolListVolumes (struct qemud_server *server ATTRIBUTE_UNUS
static int
-remoteDispatchStoragePoolNumOfVolumes (struct qemud_server *server ATTRIBUTE_UNUSED,
- struct qemud_client *client ATTRIBUTE_UNUSED,
- virConnectPtr conn,
- remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *rerr,
- remote_storage_pool_num_of_volumes_args *args,
- remote_storage_pool_num_of_volumes_ret *ret)
+remoteDispatchStoragePoolNumOfVolumes(struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client ATTRIBUTE_UNUSED,
+ virConnectPtr conn,
+ remote_message_header *hdr ATTRIBUTE_UNUSED,
+ remote_error *rerr,
+ remote_storage_pool_num_of_volumes_args *args,
+ remote_storage_pool_num_of_volumes_ret *ret)
{
virStoragePoolPtr pool;
- pool = get_nonnull_storage_pool (conn, args->pool);
+ pool = get_nonnull_storage_pool(conn, args->pool);
if (pool == NULL) {
remoteDispatchConnError(rerr, conn);
return -1;
}
- ret->num = virStoragePoolNumOfVolumes (pool);
+ ret->num = virStoragePoolNumOfVolumes(pool);
if (ret->num == -1) {
remoteDispatchConnError(rerr, conn);
virStoragePoolFree(pool);
@@ -5164,24 +5164,24 @@ remoteDispatchStoragePoolNumOfVolumes (struct qemud_server *server ATTRIBUTE_UNU
static int
-remoteDispatchStorageVolCreateXml (struct qemud_server *server ATTRIBUTE_UNUSED,
- struct qemud_client *client ATTRIBUTE_UNUSED,
- virConnectPtr conn,
- remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *rerr,
- remote_storage_vol_create_xml_args *args,
- remote_storage_vol_create_xml_ret *ret)
+remoteDispatchStorageVolCreateXml(struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client ATTRIBUTE_UNUSED,
+ virConnectPtr conn,
+ remote_message_header *hdr ATTRIBUTE_UNUSED,
+ remote_error *rerr,
+ remote_storage_vol_create_xml_args *args,
+ remote_storage_vol_create_xml_ret *ret)
{
virStoragePoolPtr pool;
virStorageVolPtr vol;
- pool = get_nonnull_storage_pool (conn, args->pool);
+ pool = get_nonnull_storage_pool(conn, args->pool);
if (pool == NULL) {
remoteDispatchConnError(rerr, conn);
return -1;
}
- vol = virStorageVolCreateXML (pool, args->xml, args->flags);
+ vol = virStorageVolCreateXML(pool, args->xml, args->flags);
if (vol == NULL) {
remoteDispatchConnError(rerr, conn);
virStoragePoolFree(pool);
@@ -5189,38 +5189,38 @@ remoteDispatchStorageVolCreateXml (struct qemud_server *server ATTRIBUTE_UNUSED,
}
virStoragePoolFree(pool);
- make_nonnull_storage_vol (&ret->vol, vol);
+ make_nonnull_storage_vol(&ret->vol, vol);
virStorageVolFree(vol);
return 0;
}
static int
-remoteDispatchStorageVolCreateXmlFrom (struct qemud_server *server ATTRIBUTE_UNUSED,
- struct qemud_client *client ATTRIBUTE_UNUSED,
- virConnectPtr conn,
- remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *rerr,
- remote_storage_vol_create_xml_from_args *args,
- remote_storage_vol_create_xml_from_ret *ret)
+remoteDispatchStorageVolCreateXmlFrom(struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client ATTRIBUTE_UNUSED,
+ virConnectPtr conn,
+ remote_message_header *hdr ATTRIBUTE_UNUSED,
+ remote_error *rerr,
+ remote_storage_vol_create_xml_from_args *args,
+ remote_storage_vol_create_xml_from_ret *ret)
{
virStoragePoolPtr pool;
virStorageVolPtr clonevol, newvol;
- pool = get_nonnull_storage_pool (conn, args->pool);
+ pool = get_nonnull_storage_pool(conn, args->pool);
if (pool == NULL) {
remoteDispatchConnError(rerr, conn);
return -1;
}
- clonevol = get_nonnull_storage_vol (conn, args->clonevol);
+ clonevol = get_nonnull_storage_vol(conn, args->clonevol);
if (clonevol == NULL) {
remoteDispatchConnError(rerr, conn);
virStoragePoolFree(pool);
return -1;
}
- newvol = virStorageVolCreateXMLFrom (pool, args->xml, clonevol,
- args->flags);
+ newvol = virStorageVolCreateXMLFrom(pool, args->xml, clonevol,
+ args->flags);
if (newvol == NULL) {
remoteDispatchConnError(rerr, conn);
virStorageVolFree(clonevol);
@@ -5230,29 +5230,29 @@ remoteDispatchStorageVolCreateXmlFrom (struct qemud_server *server ATTRIBUTE_UNU
virStorageVolFree(clonevol);
virStoragePoolFree(pool);
- make_nonnull_storage_vol (&ret->vol, newvol);
+ make_nonnull_storage_vol(&ret->vol, newvol);
virStorageVolFree(newvol);
return 0;
}
static int
-remoteDispatchStorageVolDelete (struct qemud_server *server ATTRIBUTE_UNUSED,
- struct qemud_client *client ATTRIBUTE_UNUSED,
- virConnectPtr conn,
- remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *rerr,
- remote_storage_vol_delete_args *args,
- void *ret ATTRIBUTE_UNUSED)
+remoteDispatchStorageVolDelete(struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client ATTRIBUTE_UNUSED,
+ virConnectPtr conn,
+ remote_message_header *hdr ATTRIBUTE_UNUSED,
+ remote_error *rerr,
+ remote_storage_vol_delete_args *args,
+ void *ret ATTRIBUTE_UNUSED)
{
virStorageVolPtr vol;
- vol = get_nonnull_storage_vol (conn, args->vol);
+ vol = get_nonnull_storage_vol(conn, args->vol);
if (vol == NULL) {
remoteDispatchConnError(rerr, conn);
return -1;
}
- if (virStorageVolDelete (vol, args->flags) == -1) {
+ if (virStorageVolDelete(vol, args->flags) == -1) {
remoteDispatchConnError(rerr, conn);
virStorageVolFree(vol);
return -1;
@@ -5294,24 +5294,24 @@ out:
}
static int
-remoteDispatchStorageVolGetInfo (struct qemud_server *server ATTRIBUTE_UNUSED,
- struct qemud_client *client ATTRIBUTE_UNUSED,
- virConnectPtr conn,
- remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *rerr,
- remote_storage_vol_get_info_args *args,
- remote_storage_vol_get_info_ret *ret)
+remoteDispatchStorageVolGetInfo(struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client ATTRIBUTE_UNUSED,
+ virConnectPtr conn,
+ remote_message_header *hdr ATTRIBUTE_UNUSED,
+ remote_error *rerr,
+ remote_storage_vol_get_info_args *args,
+ remote_storage_vol_get_info_ret *ret)
{
virStorageVolPtr vol;
virStorageVolInfo info;
- vol = get_nonnull_storage_vol (conn, args->vol);
+ vol = get_nonnull_storage_vol(conn, args->vol);
if (vol == NULL) {
remoteDispatchConnError(rerr, conn);
return -1;
}
- if (virStorageVolGetInfo (vol, &info) == -1) {
+ if (virStorageVolGetInfo(vol, &info) == -1) {
remoteDispatchConnError(rerr, conn);
virStorageVolFree(vol);
return -1;
@@ -5327,24 +5327,24 @@ remoteDispatchStorageVolGetInfo (struct qemud_server *server ATTRIBUTE_UNUSED,
}
static int
-remoteDispatchStorageVolDumpXml (struct qemud_server *server ATTRIBUTE_UNUSED,
- struct qemud_client *client ATTRIBUTE_UNUSED,
- virConnectPtr conn,
- remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *rerr,
- remote_storage_vol_dump_xml_args *args,
- remote_storage_vol_dump_xml_ret *ret)
+remoteDispatchStorageVolDumpXml(struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client ATTRIBUTE_UNUSED,
+ virConnectPtr conn,
+ remote_message_header *hdr ATTRIBUTE_UNUSED,
+ remote_error *rerr,
+ remote_storage_vol_dump_xml_args *args,
+ remote_storage_vol_dump_xml_ret *ret)
{
virStorageVolPtr vol;
- vol = get_nonnull_storage_vol (conn, args->vol);
+ vol = get_nonnull_storage_vol(conn, args->vol);
if (vol == NULL) {
remoteDispatchConnError(rerr, conn);
return -1;
}
/* remoteDispatchClientRequest will free this. */
- ret->xml = virStorageVolGetXMLDesc (vol, args->flags);
+ ret->xml = virStorageVolGetXMLDesc(vol, args->flags);
if (!ret->xml) {
remoteDispatchConnError(rerr, conn);
virStorageVolFree(vol);
@@ -5356,24 +5356,24 @@ remoteDispatchStorageVolDumpXml (struct qemud_server *server ATTRIBUTE_UNUSED,
static int
-remoteDispatchStorageVolGetPath (struct qemud_server *server ATTRIBUTE_UNUSED,
- struct qemud_client *client ATTRIBUTE_UNUSED,
- virConnectPtr conn,
- remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *rerr,
- remote_storage_vol_get_path_args *args,
- remote_storage_vol_get_path_ret *ret)
+remoteDispatchStorageVolGetPath(struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client ATTRIBUTE_UNUSED,
+ virConnectPtr conn,
+ remote_message_header *hdr ATTRIBUTE_UNUSED,
+ remote_error *rerr,
+ remote_storage_vol_get_path_args *args,
+ remote_storage_vol_get_path_ret *ret)
{
virStorageVolPtr vol;
- vol = get_nonnull_storage_vol (conn, args->vol);
+ vol = get_nonnull_storage_vol(conn, args->vol);
if (vol == NULL) {
remoteDispatchConnError(rerr, conn);
return -1;
}
/* remoteDispatchClientRequest will free this. */
- ret->name = virStorageVolGetPath (vol);
+ ret->name = virStorageVolGetPath(vol);
if (!ret->name) {
remoteDispatchConnError(rerr, conn);
virStorageVolFree(vol);
@@ -5385,24 +5385,24 @@ remoteDispatchStorageVolGetPath (struct qemud_server *server ATTRIBUTE_UNUSED,
static int
-remoteDispatchStorageVolLookupByName (struct qemud_server *server ATTRIBUTE_UNUSED,
- struct qemud_client *client ATTRIBUTE_UNUSED,
- virConnectPtr conn,
- remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *rerr,
- remote_storage_vol_lookup_by_name_args *args,
- remote_storage_vol_lookup_by_name_ret *ret)
+remoteDispatchStorageVolLookupByName(struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client ATTRIBUTE_UNUSED,
+ virConnectPtr conn,
+ remote_message_header *hdr ATTRIBUTE_UNUSED,
+ remote_error *rerr,
+ remote_storage_vol_lookup_by_name_args *args,
+ remote_storage_vol_lookup_by_name_ret *ret)
{
virStoragePoolPtr pool;
virStorageVolPtr vol;
- pool = get_nonnull_storage_pool (conn, args->pool);
+ pool = get_nonnull_storage_pool(conn, args->pool);
if (pool == NULL) {
remoteDispatchConnError(rerr, conn);
return -1;
}
- vol = virStorageVolLookupByName (pool, args->name);
+ vol = virStorageVolLookupByName(pool, args->name);
if (vol == NULL) {
remoteDispatchConnError(rerr, conn);
virStoragePoolFree(pool);
@@ -5410,52 +5410,52 @@ remoteDispatchStorageVolLookupByName (struct qemud_server *server ATTRIBUTE_UNUS
}
virStoragePoolFree(pool);
- make_nonnull_storage_vol (&ret->vol, vol);
+ make_nonnull_storage_vol(&ret->vol, vol);
virStorageVolFree(vol);
return 0;
}
static int
-remoteDispatchStorageVolLookupByKey (struct qemud_server *server ATTRIBUTE_UNUSED,
- struct qemud_client *client ATTRIBUTE_UNUSED,
- virConnectPtr conn,
- remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *rerr,
- remote_storage_vol_lookup_by_key_args *args,
- remote_storage_vol_lookup_by_key_ret *ret)
+remoteDispatchStorageVolLookupByKey(struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client ATTRIBUTE_UNUSED,
+ virConnectPtr conn,
+ remote_message_header *hdr ATTRIBUTE_UNUSED,
+ remote_error *rerr,
+ remote_storage_vol_lookup_by_key_args *args,
+ remote_storage_vol_lookup_by_key_ret *ret)
{
virStorageVolPtr vol;
- vol = virStorageVolLookupByKey (conn, args->key);
+ vol = virStorageVolLookupByKey(conn, args->key);
if (vol == NULL) {
remoteDispatchConnError(rerr, conn);
return -1;
}
- make_nonnull_storage_vol (&ret->vol, vol);
+ make_nonnull_storage_vol(&ret->vol, vol);
virStorageVolFree(vol);
return 0;
}
static int
-remoteDispatchStorageVolLookupByPath (struct qemud_server *server ATTRIBUTE_UNUSED,
- struct qemud_client *client ATTRIBUTE_UNUSED,
- virConnectPtr conn,
- remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *rerr,
- remote_storage_vol_lookup_by_path_args *args,
- remote_storage_vol_lookup_by_path_ret *ret)
+remoteDispatchStorageVolLookupByPath(struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client ATTRIBUTE_UNUSED,
+ virConnectPtr conn,
+ remote_message_header *hdr ATTRIBUTE_UNUSED,
+ remote_error *rerr,
+ remote_storage_vol_lookup_by_path_args *args,
+ remote_storage_vol_lookup_by_path_ret *ret)
{
virStorageVolPtr vol;
- vol = virStorageVolLookupByPath (conn, args->path);
+ vol = virStorageVolLookupByPath(conn, args->path);
if (vol == NULL) {
remoteDispatchConnError(rerr, conn);
return -1;
}
- make_nonnull_storage_vol (&ret->vol, vol);
+ make_nonnull_storage_vol(&ret->vol, vol);
virStorageVolFree(vol);
return 0;
}
@@ -5466,19 +5466,19 @@ remoteDispatchStorageVolLookupByPath (struct qemud_server *server ATTRIBUTE_UNUS
**************************************************************/
static int
-remoteDispatchNodeNumOfDevices (struct qemud_server *server ATTRIBUTE_UNUSED,
- struct qemud_client *client ATTRIBUTE_UNUSED,
- virConnectPtr conn,
- remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *rerr,
- remote_node_num_of_devices_args *args,
- remote_node_num_of_devices_ret *ret)
+remoteDispatchNodeNumOfDevices(struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client ATTRIBUTE_UNUSED,
+ virConnectPtr conn,
+ remote_message_header *hdr ATTRIBUTE_UNUSED,
+ remote_error *rerr,
+ remote_node_num_of_devices_args *args,
+ remote_node_num_of_devices_ret *ret)
{
CHECK_CONN(client);
- ret->num = virNodeNumOfDevices (conn,
- args->cap ? *args->cap : NULL,
- args->flags);
+ ret->num = virNodeNumOfDevices(conn,
+ args->cap ? *args->cap : NULL,
+ args->flags);
if (ret->num == -1) {
remoteDispatchConnError(rerr, conn);
return -1;
@@ -5489,13 +5489,13 @@ remoteDispatchNodeNumOfDevices (struct qemud_server *server ATTRIBUTE_UNUSED,
static int
-remoteDispatchNodeListDevices (struct qemud_server *server ATTRIBUTE_UNUSED,
- struct qemud_client *client ATTRIBUTE_UNUSED,
- virConnectPtr conn,
- remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *rerr,
- remote_node_list_devices_args *args,
- remote_node_list_devices_ret *ret)
+remoteDispatchNodeListDevices(struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client ATTRIBUTE_UNUSED,
+ virConnectPtr conn,
+ remote_message_header *hdr ATTRIBUTE_UNUSED,
+ remote_error *rerr,
+ remote_node_list_devices_args *args,
+ remote_node_list_devices_ret *ret)
{
CHECK_CONN(client);
@@ -5512,9 +5512,9 @@ remoteDispatchNodeListDevices (struct qemud_server *server ATTRIBUTE_UNUSED,
}
ret->names.names_len =
- virNodeListDevices (conn,
- args->cap ? *args->cap : NULL,
- ret->names.names_val, args->maxnames, args->flags);
+ virNodeListDevices(conn,
+ args->cap ? *args->cap : NULL,
+ ret->names.names_val, args->maxnames, args->flags);
if (ret->names.names_len == -1) {
remoteDispatchConnError(rerr, conn);
VIR_FREE(ret->names.names_val);
@@ -5526,38 +5526,38 @@ remoteDispatchNodeListDevices (struct qemud_server *server ATTRIBUTE_UNUSED,
static int
-remoteDispatchNodeDeviceLookupByName (struct qemud_server *server ATTRIBUTE_UNUSED,
- struct qemud_client *client ATTRIBUTE_UNUSED,
- virConnectPtr conn,
- remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *rerr,
- remote_node_device_lookup_by_name_args *args,
- remote_node_device_lookup_by_name_ret *ret)
+remoteDispatchNodeDeviceLookupByName(struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client ATTRIBUTE_UNUSED,
+ virConnectPtr conn,
+ remote_message_header *hdr ATTRIBUTE_UNUSED,
+ remote_error *rerr,
+ remote_node_device_lookup_by_name_args *args,
+ remote_node_device_lookup_by_name_ret *ret)
{
virNodeDevicePtr dev;
CHECK_CONN(client);
- dev = virNodeDeviceLookupByName (conn, args->name);
+ dev = virNodeDeviceLookupByName(conn, args->name);
if (dev == NULL) {
remoteDispatchConnError(rerr, conn);
return -1;
}
- make_nonnull_node_device (&ret->dev, dev);
+ make_nonnull_node_device(&ret->dev, dev);
virNodeDeviceFree(dev);
return 0;
}
static int
-remoteDispatchNodeDeviceDumpXml (struct qemud_server *server ATTRIBUTE_UNUSED,
- struct qemud_client *client ATTRIBUTE_UNUSED,
- virConnectPtr conn,
- remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *rerr,
- remote_node_device_dump_xml_args *args,
- remote_node_device_dump_xml_ret *ret)
+remoteDispatchNodeDeviceDumpXml(struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client ATTRIBUTE_UNUSED,
+ virConnectPtr conn,
+ remote_message_header *hdr ATTRIBUTE_UNUSED,
+ remote_error *rerr,
+ remote_node_device_dump_xml_args *args,
+ remote_node_device_dump_xml_ret *ret)
{
virNodeDevicePtr dev;
CHECK_CONN(client);
@@ -5569,7 +5569,7 @@ remoteDispatchNodeDeviceDumpXml (struct qemud_server *server ATTRIBUTE_UNUSED,
}
/* remoteDispatchClientRequest will free this. */
- ret->xml = virNodeDeviceGetXMLDesc (dev, args->flags);
+ ret->xml = virNodeDeviceGetXMLDesc(dev, args->flags);
if (!ret->xml) {
remoteDispatchConnError(rerr, conn);
virNodeDeviceFree(dev);
@@ -5581,13 +5581,13 @@ remoteDispatchNodeDeviceDumpXml (struct qemud_server *server ATTRIBUTE_UNUSED,
static int
-remoteDispatchNodeDeviceGetParent (struct qemud_server *server ATTRIBUTE_UNUSED,
- struct qemud_client *client ATTRIBUTE_UNUSED,
- virConnectPtr conn,
- remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *rerr,
- remote_node_device_get_parent_args *args,
- remote_node_device_get_parent_ret *ret)
+remoteDispatchNodeDeviceGetParent(struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client ATTRIBUTE_UNUSED,
+ virConnectPtr conn,
+ remote_message_header *hdr ATTRIBUTE_UNUSED,
+ remote_error *rerr,
+ remote_node_device_get_parent_args *args,
+ remote_node_device_get_parent_ret *ret)
{
virNodeDevicePtr dev;
const char *parent;
@@ -5626,13 +5626,13 @@ remoteDispatchNodeDeviceGetParent (struct qemud_server *server ATTRIBUTE_UNUSED,
static int
-remoteDispatchNodeDeviceNumOfCaps (struct qemud_server *server ATTRIBUTE_UNUSED,
- struct qemud_client *client ATTRIBUTE_UNUSED,
- virConnectPtr conn,
- remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *rerr,
- remote_node_device_num_of_caps_args *args,
- remote_node_device_num_of_caps_ret *ret)
+remoteDispatchNodeDeviceNumOfCaps(struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client ATTRIBUTE_UNUSED,
+ virConnectPtr conn,
+ remote_message_header *hdr ATTRIBUTE_UNUSED,
+ remote_error *rerr,
+ remote_node_device_num_of_caps_args *args,
+ remote_node_device_num_of_caps_ret *ret)
{
virNodeDevicePtr dev;
CHECK_CONN(client);
@@ -5656,13 +5656,13 @@ remoteDispatchNodeDeviceNumOfCaps (struct qemud_server *server ATTRIBUTE_UNUSED,
static int
-remoteDispatchNodeDeviceListCaps (struct qemud_server *server ATTRIBUTE_UNUSED,
- struct qemud_client *client ATTRIBUTE_UNUSED,
- virConnectPtr conn,
- remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *rerr,
- remote_node_device_list_caps_args *args,
- remote_node_device_list_caps_ret *ret)
+remoteDispatchNodeDeviceListCaps(struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client ATTRIBUTE_UNUSED,
+ virConnectPtr conn,
+ remote_message_header *hdr ATTRIBUTE_UNUSED,
+ remote_error *rerr,
+ remote_node_device_list_caps_args *args,
+ remote_node_device_list_caps_ret *ret)
{
virNodeDevicePtr dev;
CHECK_CONN(client);
@@ -5688,8 +5688,8 @@ remoteDispatchNodeDeviceListCaps (struct qemud_server *server ATTRIBUTE_UNUSED,
}
ret->names.names_len =
- virNodeDeviceListCaps (dev, ret->names.names_val,
- args->maxnames);
+ virNodeDeviceListCaps(dev, ret->names.names_val,
+ args->maxnames);
if (ret->names.names_len == -1) {
remoteDispatchConnError(rerr, conn);
virNodeDeviceFree(dev);
@@ -5703,13 +5703,13 @@ remoteDispatchNodeDeviceListCaps (struct qemud_server *server ATTRIBUTE_UNUSED,
static int
-remoteDispatchNodeDeviceDettach (struct qemud_server *server ATTRIBUTE_UNUSED,
- struct qemud_client *client ATTRIBUTE_UNUSED,
- virConnectPtr conn,
- remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *rerr,
- remote_node_device_dettach_args *args,
- void *ret ATTRIBUTE_UNUSED)
+remoteDispatchNodeDeviceDettach(struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client ATTRIBUTE_UNUSED,
+ virConnectPtr conn,
+ remote_message_header *hdr ATTRIBUTE_UNUSED,
+ remote_error *rerr,
+ remote_node_device_dettach_args *args,
+ void *ret ATTRIBUTE_UNUSED)
{
virNodeDevicePtr dev;
CHECK_CONN(client);
@@ -5732,13 +5732,13 @@ remoteDispatchNodeDeviceDettach (struct qemud_server *server ATTRIBUTE_UNUSED,
static int
-remoteDispatchNodeDeviceReAttach (struct qemud_server *server ATTRIBUTE_UNUSED,
- struct qemud_client *client ATTRIBUTE_UNUSED,
- virConnectPtr conn,
- remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *rerr,
- remote_node_device_re_attach_args *args,
- void *ret ATTRIBUTE_UNUSED)
+remoteDispatchNodeDeviceReAttach(struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client ATTRIBUTE_UNUSED,
+ virConnectPtr conn,
+ remote_message_header *hdr ATTRIBUTE_UNUSED,
+ remote_error *rerr,
+ remote_node_device_re_attach_args *args,
+ void *ret ATTRIBUTE_UNUSED)
{
virNodeDevicePtr dev;
CHECK_CONN(client);
@@ -5761,13 +5761,13 @@ remoteDispatchNodeDeviceReAttach (struct qemud_server *server ATTRIBUTE_UNUSED,
static int
-remoteDispatchNodeDeviceReset (struct qemud_server *server ATTRIBUTE_UNUSED,
- struct qemud_client *client ATTRIBUTE_UNUSED,
- virConnectPtr conn,
- remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *rerr,
- remote_node_device_reset_args *args,
- void *ret ATTRIBUTE_UNUSED)
+remoteDispatchNodeDeviceReset(struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client ATTRIBUTE_UNUSED,
+ virConnectPtr conn,
+ remote_message_header *hdr ATTRIBUTE_UNUSED,
+ remote_error *rerr,
+ remote_node_device_reset_args *args,
+ void *ret ATTRIBUTE_UNUSED)
{
virNodeDevicePtr dev;
CHECK_CONN(client);
@@ -5800,13 +5800,13 @@ remoteDispatchNodeDeviceCreateXml(struct qemud_server *server ATTRIBUTE_UNUSED,
{
virNodeDevicePtr dev;
- dev = virNodeDeviceCreateXML (conn, args->xml_desc, args->flags);
+ dev = virNodeDeviceCreateXML(conn, args->xml_desc, args->flags);
if (dev == NULL) {
remoteDispatchConnError(rerr, conn);
return -1;
}
- make_nonnull_node_device (&ret->dev, dev);
+ make_nonnull_node_device(&ret->dev, dev);
virNodeDeviceFree(dev);
return 0;
@@ -5898,7 +5898,7 @@ static int remoteDispatchStorageVolDownload(struct qemud_server *server ATTRIBUT
struct qemud_client_stream *stream = NULL;
virStorageVolPtr vol;
- vol = get_nonnull_storage_vol (conn, args->vol);
+ vol = get_nonnull_storage_vol(conn, args->vol);
if (vol == NULL) {
remoteDispatchConnError(rerr, conn);
goto cleanup;
@@ -5938,13 +5938,13 @@ cleanup:
* Register / deregister events
***************************/
static int
-remoteDispatchDomainEventsRegister (struct qemud_server *server ATTRIBUTE_UNUSED,
- struct qemud_client *client ATTRIBUTE_UNUSED,
- virConnectPtr conn,
- remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *rerr ATTRIBUTE_UNUSED,
- void *args ATTRIBUTE_UNUSED,
- remote_domain_events_register_ret *ret ATTRIBUTE_UNUSED)
+remoteDispatchDomainEventsRegister(struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client ATTRIBUTE_UNUSED,
+ virConnectPtr conn,
+ remote_message_header *hdr ATTRIBUTE_UNUSED,
+ remote_error *rerr ATTRIBUTE_UNUSED,
+ void *args ATTRIBUTE_UNUSED,
+ remote_domain_events_register_ret *ret ATTRIBUTE_UNUSED)
{
CHECK_CONN(client);
int callbackID;
@@ -5969,13 +5969,13 @@ remoteDispatchDomainEventsRegister (struct qemud_server *server ATTRIBUTE_UNUSED
}
static int
-remoteDispatchDomainEventsDeregister (struct qemud_server *server ATTRIBUTE_UNUSED,
- struct qemud_client *client ATTRIBUTE_UNUSED,
- virConnectPtr conn,
- remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *rerr ATTRIBUTE_UNUSED,
- void *args ATTRIBUTE_UNUSED,
- remote_domain_events_deregister_ret *ret ATTRIBUTE_UNUSED)
+remoteDispatchDomainEventsDeregister(struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client ATTRIBUTE_UNUSED,
+ virConnectPtr conn,
+ remote_message_header *hdr ATTRIBUTE_UNUSED,
+ remote_error *rerr ATTRIBUTE_UNUSED,
+ void *args ATTRIBUTE_UNUSED,
+ remote_domain_events_deregister_ret *ret ATTRIBUTE_UNUSED)
{
CHECK_CONN(client);
@@ -5995,10 +5995,10 @@ remoteDispatchDomainEventsDeregister (struct qemud_server *server ATTRIBUTE_UNUS
}
static void
-remoteDispatchDomainEventSend (struct qemud_client *client,
- int procnr,
- xdrproc_t proc,
- void *data)
+remoteDispatchDomainEventSend(struct qemud_client *client,
+ int procnr,
+ xdrproc_t proc,
+ void *data)
{
struct qemud_client_message *msg = NULL;
XDR xdr;
@@ -6018,13 +6018,13 @@ remoteDispatchDomainEventSend (struct qemud_client *client,
goto error;
/* Serialise the return header and event. */
- xdrmem_create (&xdr,
- msg->buffer,
- msg->bufferLength,
- XDR_ENCODE);
+ xdrmem_create(&xdr,
+ msg->buffer,
+ msg->bufferLength,
+ XDR_ENCODE);
/* Skip over the header we just wrote */
- if (xdr_setpos (&xdr, msg->bufferOffset) == 0)
+ if (xdr_setpos(&xdr, msg->bufferOffset) == 0)
goto xdr_error;
if (!(proc)(&xdr, data)) {
@@ -6033,11 +6033,11 @@ remoteDispatchDomainEventSend (struct qemud_client *client,
}
/* Update length word to include payload*/
- len = msg->bufferOffset = xdr_getpos (&xdr);
- if (xdr_setpos (&xdr, 0) == 0)
+ len = msg->bufferOffset = xdr_getpos(&xdr);
+ if (xdr_setpos(&xdr, 0) == 0)
goto xdr_error;
- if (!xdr_u_int (&xdr, &len))
+ if (!xdr_u_int(&xdr, &len))
goto xdr_error;
/* Send it. */
@@ -6049,7 +6049,7 @@ remoteDispatchDomainEventSend (struct qemud_client *client,
qemudClientMessageQueuePush(&client->tx, msg);
qemudUpdateClientEvent(client);
- xdr_destroy (&xdr);
+ xdr_destroy(&xdr);
return;
xdr_error:
@@ -6059,17 +6059,17 @@ error:
}
static int
-remoteDispatchNumOfSecrets (struct qemud_server *server ATTRIBUTE_UNUSED,
- struct qemud_client *client ATTRIBUTE_UNUSED,
- virConnectPtr conn,
- remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *err,
- void *args ATTRIBUTE_UNUSED,
- remote_num_of_secrets_ret *ret)
+remoteDispatchNumOfSecrets(struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client ATTRIBUTE_UNUSED,
+ virConnectPtr conn,
+ remote_message_header *hdr ATTRIBUTE_UNUSED,
+ remote_error *err,
+ void *args ATTRIBUTE_UNUSED,
+ remote_num_of_secrets_ret *ret)
{
- ret->num = virConnectNumOfSecrets (conn);
+ ret->num = virConnectNumOfSecrets(conn);
if (ret->num == -1) {
- remoteDispatchConnError (err, conn);
+ remoteDispatchConnError(err, conn);
return -1;
}
@@ -6077,30 +6077,30 @@ remoteDispatchNumOfSecrets (struct qemud_server *server ATTRIBUTE_UNUSED,
}
static int
-remoteDispatchListSecrets (struct qemud_server *server ATTRIBUTE_UNUSED,
- struct qemud_client *client ATTRIBUTE_UNUSED,
- virConnectPtr conn,
- remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *err,
- remote_list_secrets_args *args,
- remote_list_secrets_ret *ret)
+remoteDispatchListSecrets(struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client ATTRIBUTE_UNUSED,
+ virConnectPtr conn,
+ remote_message_header *hdr ATTRIBUTE_UNUSED,
+ remote_error *err,
+ remote_list_secrets_args *args,
+ remote_list_secrets_ret *ret)
{
if (args->maxuuids > REMOTE_SECRET_UUID_LIST_MAX) {
- remoteDispatchFormatError (err, "%s",
+ remoteDispatchFormatError(err, "%s",
_("maxuuids > REMOTE_SECRET_UUID_LIST_MAX"));
return -1;
}
- if (VIR_ALLOC_N (ret->uuids.uuids_val, args->maxuuids) < 0) {
- remoteDispatchOOMError (err);
+ if (VIR_ALLOC_N(ret->uuids.uuids_val, args->maxuuids) < 0) {
+ remoteDispatchOOMError(err);
return -1;
}
- ret->uuids.uuids_len = virConnectListSecrets (conn, ret->uuids.uuids_val,
- args->maxuuids);
+ ret->uuids.uuids_len = virConnectListSecrets(conn, ret->uuids.uuids_val,
+ args->maxuuids);
if (ret->uuids.uuids_len == -1) {
- VIR_FREE (ret->uuids.uuids_val);
- remoteDispatchConnError (err, conn);
+ VIR_FREE(ret->uuids.uuids_val);
+ remoteDispatchConnError(err, conn);
return -1;
}
@@ -6108,49 +6108,49 @@ remoteDispatchListSecrets (struct qemud_server *server ATTRIBUTE_UNUSED,
}
static int
-remoteDispatchSecretDefineXml (struct qemud_server *server ATTRIBUTE_UNUSED,
- struct qemud_client *client ATTRIBUTE_UNUSED,
- virConnectPtr conn,
- remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *err,
- remote_secret_define_xml_args *args,
- remote_secret_define_xml_ret *ret)
+remoteDispatchSecretDefineXml(struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client ATTRIBUTE_UNUSED,
+ virConnectPtr conn,
+ remote_message_header *hdr ATTRIBUTE_UNUSED,
+ remote_error *err,
+ remote_secret_define_xml_args *args,
+ remote_secret_define_xml_ret *ret)
{
virSecretPtr secret;
- secret = virSecretDefineXML (conn, args->xml, args->flags);
+ secret = virSecretDefineXML(conn, args->xml, args->flags);
if (secret == NULL) {
- remoteDispatchConnError (err, conn);
+ remoteDispatchConnError(err, conn);
return -1;
}
- make_nonnull_secret (&ret->secret, secret);
- virSecretFree (secret);
+ make_nonnull_secret(&ret->secret, secret);
+ virSecretFree(secret);
return 0;
}
static int
-remoteDispatchSecretGetValue (struct qemud_server *server ATTRIBUTE_UNUSED,
- struct qemud_client *client ATTRIBUTE_UNUSED,
- virConnectPtr conn,
- remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *err,
- remote_secret_get_value_args *args,
- remote_secret_get_value_ret *ret)
+remoteDispatchSecretGetValue(struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client ATTRIBUTE_UNUSED,
+ virConnectPtr conn,
+ remote_message_header *hdr ATTRIBUTE_UNUSED,
+ remote_error *err,
+ remote_secret_get_value_args *args,
+ remote_secret_get_value_ret *ret)
{
virSecretPtr secret;
size_t value_size;
unsigned char *value;
- secret = get_nonnull_secret (conn, args->secret);
+ secret = get_nonnull_secret(conn, args->secret);
if (secret == NULL) {
- remoteDispatchConnError (err, conn);
+ remoteDispatchConnError(err, conn);
return -1;
}
- value = virSecretGetValue (secret, &value_size, args->flags);
+ value = virSecretGetValue(secret, &value_size, args->flags);
if (value == NULL) {
- remoteDispatchConnError (err, conn);
+ remoteDispatchConnError(err, conn);
virSecretFree(secret);
return -1;
}
@@ -6162,24 +6162,24 @@ remoteDispatchSecretGetValue (struct qemud_server *server ATTRIBUTE_UNUSED,
}
static int
-remoteDispatchSecretGetXmlDesc (struct qemud_server *server ATTRIBUTE_UNUSED,
- struct qemud_client *client ATTRIBUTE_UNUSED,
- virConnectPtr conn,
- remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *err,
- remote_secret_get_xml_desc_args *args,
- remote_secret_get_xml_desc_ret *ret)
+remoteDispatchSecretGetXmlDesc(struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client ATTRIBUTE_UNUSED,
+ virConnectPtr conn,
+ remote_message_header *hdr ATTRIBUTE_UNUSED,
+ remote_error *err,
+ remote_secret_get_xml_desc_args *args,
+ remote_secret_get_xml_desc_ret *ret)
{
virSecretPtr secret;
- secret = get_nonnull_secret (conn, args->secret);
+ secret = get_nonnull_secret(conn, args->secret);
if (secret == NULL) {
- remoteDispatchConnError (err, conn);
+ remoteDispatchConnError(err, conn);
return -1;
}
- ret->xml = virSecretGetXMLDesc (secret, args->flags);
+ ret->xml = virSecretGetXMLDesc(secret, args->flags);
if (ret->xml == NULL) {
- remoteDispatchConnError (err, conn);
+ remoteDispatchConnError(err, conn);
virSecretFree(secret);
return -1;
}
@@ -6188,46 +6188,46 @@ remoteDispatchSecretGetXmlDesc (struct qemud_server *server ATTRIBUTE_UNUSED,
}
static int
-remoteDispatchSecretLookupByUuid (struct qemud_server *server ATTRIBUTE_UNUSED,
- struct qemud_client *client ATTRIBUTE_UNUSED,
- virConnectPtr conn,
- remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *err,
- remote_secret_lookup_by_uuid_args *args,
- remote_secret_lookup_by_uuid_ret *ret)
+remoteDispatchSecretLookupByUuid(struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client ATTRIBUTE_UNUSED,
+ virConnectPtr conn,
+ remote_message_header *hdr ATTRIBUTE_UNUSED,
+ remote_error *err,
+ remote_secret_lookup_by_uuid_args *args,
+ remote_secret_lookup_by_uuid_ret *ret)
{
virSecretPtr secret;
- secret = virSecretLookupByUUID (conn, (unsigned char *)args->uuid);
+ secret = virSecretLookupByUUID(conn, (unsigned char *)args->uuid);
if (secret == NULL) {
- remoteDispatchConnError (err, conn);
+ remoteDispatchConnError(err, conn);
return -1;
}
- make_nonnull_secret (&ret->secret, secret);
- virSecretFree (secret);
+ make_nonnull_secret(&ret->secret, secret);
+ virSecretFree(secret);
return 0;
}
static int
-remoteDispatchSecretSetValue (struct qemud_server *server ATTRIBUTE_UNUSED,
- struct qemud_client *client ATTRIBUTE_UNUSED,
- virConnectPtr conn,
- remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *err,
- remote_secret_set_value_args *args,
- void *ret ATTRIBUTE_UNUSED)
+remoteDispatchSecretSetValue(struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client ATTRIBUTE_UNUSED,
+ virConnectPtr conn,
+ remote_message_header *hdr ATTRIBUTE_UNUSED,
+ remote_error *err,
+ remote_secret_set_value_args *args,
+ void *ret ATTRIBUTE_UNUSED)
{
virSecretPtr secret;
- secret = get_nonnull_secret (conn, args->secret);
+ secret = get_nonnull_secret(conn, args->secret);
if (secret == NULL) {
- remoteDispatchConnError (err, conn);
+ remoteDispatchConnError(err, conn);
return -1;
}
- if (virSecretSetValue (secret, (const unsigned char *)args->value.value_val,
- args->value.value_len, args->flags) < 0) {
- remoteDispatchConnError (err, conn);
+ if (virSecretSetValue(secret, (const unsigned char *)args->value.value_val,
+ args->value.value_len, args->flags) < 0) {
+ remoteDispatchConnError(err, conn);
virSecretFree(secret);
return -1;
}
@@ -6237,23 +6237,23 @@ remoteDispatchSecretSetValue (struct qemud_server *server ATTRIBUTE_UNUSED,
}
static int
-remoteDispatchSecretUndefine (struct qemud_server *server ATTRIBUTE_UNUSED,
- struct qemud_client *client ATTRIBUTE_UNUSED,
- virConnectPtr conn,
- remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *err,
- remote_secret_undefine_args *args,
- void *ret ATTRIBUTE_UNUSED)
+remoteDispatchSecretUndefine(struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client ATTRIBUTE_UNUSED,
+ virConnectPtr conn,
+ remote_message_header *hdr ATTRIBUTE_UNUSED,
+ remote_error *err,
+ remote_secret_undefine_args *args,
+ void *ret ATTRIBUTE_UNUSED)
{
virSecretPtr secret;
- secret = get_nonnull_secret (conn, args->secret);
+ secret = get_nonnull_secret(conn, args->secret);
if (secret == NULL) {
- remoteDispatchConnError (err, conn);
+ remoteDispatchConnError(err, conn);
return -1;
}
- if (virSecretUndefine (secret) < 0) {
- remoteDispatchConnError (err, conn);
+ if (virSecretUndefine(secret) < 0) {
+ remoteDispatchConnError(err, conn);
virSecretFree(secret);
return -1;
}
@@ -6263,24 +6263,24 @@ remoteDispatchSecretUndefine (struct qemud_server *server ATTRIBUTE_UNUSED,
}
static int
-remoteDispatchSecretLookupByUsage (struct qemud_server *server ATTRIBUTE_UNUSED,
- struct qemud_client *client ATTRIBUTE_UNUSED,
- virConnectPtr conn,
- remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *err,
- remote_secret_lookup_by_usage_args *args,
- remote_secret_lookup_by_usage_ret *ret)
+remoteDispatchSecretLookupByUsage(struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client ATTRIBUTE_UNUSED,
+ virConnectPtr conn,
+ remote_message_header *hdr ATTRIBUTE_UNUSED,
+ remote_error *err,
+ remote_secret_lookup_by_usage_args *args,
+ remote_secret_lookup_by_usage_ret *ret)
{
virSecretPtr secret;
- secret = virSecretLookupByUsage (conn, args->usageType, args->usageID);
+ secret = virSecretLookupByUsage(conn, args->usageType, args->usageID);
if (secret == NULL) {
- remoteDispatchConnError (err, conn);
+ remoteDispatchConnError(err, conn);
return -1;
}
- make_nonnull_secret (&ret->secret, secret);
- virSecretFree (secret);
+ make_nonnull_secret(&ret->secret, secret);
+ virSecretFree(secret);
return 0;
}
@@ -6578,24 +6578,24 @@ remoteDispatchCpuBaseline(struct qemud_server *server ATTRIBUTE_UNUSED,
static int
-remoteDispatchDomainGetJobInfo (struct qemud_server *server ATTRIBUTE_UNUSED,
- struct qemud_client *client ATTRIBUTE_UNUSED,
- virConnectPtr conn,
- remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *rerr,
- remote_domain_get_job_info_args *args,
- remote_domain_get_job_info_ret *ret)
+remoteDispatchDomainGetJobInfo(struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client ATTRIBUTE_UNUSED,
+ virConnectPtr conn,
+ remote_message_header *hdr ATTRIBUTE_UNUSED,
+ remote_error *rerr,
+ remote_domain_get_job_info_args *args,
+ remote_domain_get_job_info_ret *ret)
{
virDomainPtr dom;
virDomainJobInfo info;
- dom = get_nonnull_domain (conn, args->dom);
+ dom = get_nonnull_domain(conn, args->dom);
if (dom == NULL) {
remoteDispatchConnError(rerr, conn);
return -1;
}
- if (virDomainGetJobInfo (dom, &info) == -1) {
+ if (virDomainGetJobInfo(dom, &info) == -1) {
remoteDispatchConnError(rerr, conn);
virDomainFree(dom);
return -1;
@@ -6621,23 +6621,23 @@ remoteDispatchDomainGetJobInfo (struct qemud_server *server ATTRIBUTE_UNUSED,
static int
-remoteDispatchDomainAbortJob (struct qemud_server *server ATTRIBUTE_UNUSED,
- struct qemud_client *client ATTRIBUTE_UNUSED,
- virConnectPtr conn,
- remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *rerr,
- remote_domain_abort_job_args *args,
- void *ret ATTRIBUTE_UNUSED)
+remoteDispatchDomainAbortJob(struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client ATTRIBUTE_UNUSED,
+ virConnectPtr conn,
+ remote_message_header *hdr ATTRIBUTE_UNUSED,
+ remote_error *rerr,
+ remote_domain_abort_job_args *args,
+ void *ret ATTRIBUTE_UNUSED)
{
virDomainPtr dom;
- dom = get_nonnull_domain (conn, args->dom);
+ dom = get_nonnull_domain(conn, args->dom);
if (dom == NULL) {
remoteDispatchConnError(rerr, conn);
return -1;
}
- if (virDomainAbortJob (dom) == -1) {
+ if (virDomainAbortJob(dom) == -1) {
remoteDispatchConnError(rerr, conn);
virDomainFree(dom);
return -1;
@@ -6706,13 +6706,13 @@ remoteDispatchDomainMigrateSetMaxSpeed(struct qemud_server *server ATTRIBUTE_UNU
}
static int
-remoteDispatchDomainSnapshotCreateXml (struct qemud_server *server ATTRIBUTE_UNUSED,
- struct qemud_client *client ATTRIBUTE_UNUSED,
- virConnectPtr conn,
- remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *rerr,
- remote_domain_snapshot_create_xml_args *args,
- remote_domain_snapshot_create_xml_ret *ret)
+remoteDispatchDomainSnapshotCreateXml(struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client ATTRIBUTE_UNUSED,
+ virConnectPtr conn,
+ remote_message_header *hdr ATTRIBUTE_UNUSED,
+ remote_error *rerr,
+ remote_domain_snapshot_create_xml_args *args,
+ remote_domain_snapshot_create_xml_ret *ret)
{
virDomainSnapshotPtr snapshot;
virDomainPtr domain;
@@ -6739,13 +6739,13 @@ remoteDispatchDomainSnapshotCreateXml (struct qemud_server *server ATTRIBUTE_UNU
}
static int
-remoteDispatchDomainSnapshotDumpXml (struct qemud_server *server ATTRIBUTE_UNUSED,
- struct qemud_client *client ATTRIBUTE_UNUSED,
- virConnectPtr conn,
- remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *rerr,
- remote_domain_snapshot_dump_xml_args *args,
- remote_domain_snapshot_dump_xml_ret *ret)
+remoteDispatchDomainSnapshotDumpXml(struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client ATTRIBUTE_UNUSED,
+ virConnectPtr conn,
+ remote_message_header *hdr ATTRIBUTE_UNUSED,
+ remote_error *rerr,
+ remote_domain_snapshot_dump_xml_args *args,
+ remote_domain_snapshot_dump_xml_ret *ret)
{
virDomainPtr domain = NULL;
virDomainSnapshotPtr snapshot = NULL;
@@ -6778,13 +6778,13 @@ cleanup:
}
static int
-remoteDispatchDomainSnapshotNum (struct qemud_server *server ATTRIBUTE_UNUSED,
- struct qemud_client *client ATTRIBUTE_UNUSED,
- virConnectPtr conn,
- remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *rerr,
- remote_domain_snapshot_num_args *args,
- remote_domain_snapshot_num_ret *ret)
+remoteDispatchDomainSnapshotNum(struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client ATTRIBUTE_UNUSED,
+ virConnectPtr conn,
+ remote_message_header *hdr ATTRIBUTE_UNUSED,
+ remote_error *rerr,
+ remote_domain_snapshot_num_args *args,
+ remote_domain_snapshot_num_ret *ret)
{
virDomainPtr domain;
@@ -6807,18 +6807,18 @@ remoteDispatchDomainSnapshotNum (struct qemud_server *server ATTRIBUTE_UNUSED,
}
static int
-remoteDispatchDomainSnapshotListNames (struct qemud_server *server ATTRIBUTE_UNUSED,
- struct qemud_client *client ATTRIBUTE_UNUSED,
- virConnectPtr conn,
- remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *rerr,
- remote_domain_snapshot_list_names_args *args,
- remote_domain_snapshot_list_names_ret *ret)
+remoteDispatchDomainSnapshotListNames(struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client ATTRIBUTE_UNUSED,
+ virConnectPtr conn,
+ remote_message_header *hdr ATTRIBUTE_UNUSED,
+ remote_error *rerr,
+ remote_domain_snapshot_list_names_args *args,
+ remote_domain_snapshot_list_names_ret *ret)
{
virDomainPtr domain;
if (args->nameslen > REMOTE_DOMAIN_SNAPSHOT_LIST_NAMES_MAX) {
- remoteDispatchFormatError (rerr, "%s",
+ remoteDispatchFormatError(rerr, "%s",
_("nameslen > REMOTE_DOMAIN_SNAPSHOT_LIST_NAMES_MAX"));
return -1;
}
@@ -6853,13 +6853,13 @@ remoteDispatchDomainSnapshotListNames (struct qemud_server *server ATTRIBUTE_UNU
}
static int
-remoteDispatchDomainSnapshotLookupByName (struct qemud_server *server ATTRIBUTE_UNUSED,
- struct qemud_client *client ATTRIBUTE_UNUSED,
- virConnectPtr conn,
- remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *rerr,
- remote_domain_snapshot_lookup_by_name_args *args,
- remote_domain_snapshot_lookup_by_name_ret *ret)
+remoteDispatchDomainSnapshotLookupByName(struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client ATTRIBUTE_UNUSED,
+ virConnectPtr conn,
+ remote_message_header *hdr ATTRIBUTE_UNUSED,
+ remote_error *rerr,
+ remote_domain_snapshot_lookup_by_name_args *args,
+ remote_domain_snapshot_lookup_by_name_ret *ret)
{
virDomainSnapshotPtr snapshot;
virDomainPtr domain;
@@ -6877,7 +6877,7 @@ remoteDispatchDomainSnapshotLookupByName (struct qemud_server *server ATTRIBUTE_
return -1;
}
- make_nonnull_domain_snapshot (&ret->snap, snapshot);
+ make_nonnull_domain_snapshot(&ret->snap, snapshot);
virDomainSnapshotFree(snapshot);
virDomainFree(domain);
@@ -6951,13 +6951,13 @@ remoteDispatchDomainSnapshotCurrent(struct qemud_server *server ATTRIBUTE_UNUSED
}
static int
-remoteDispatchDomainRevertToSnapshot (struct qemud_server *server ATTRIBUTE_UNUSED,
- struct qemud_client *client ATTRIBUTE_UNUSED,
- virConnectPtr conn,
- remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *rerr,
- remote_domain_revert_to_snapshot_args *args,
- void *ret ATTRIBUTE_UNUSED)
+remoteDispatchDomainRevertToSnapshot(struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client ATTRIBUTE_UNUSED,
+ virConnectPtr conn,
+ remote_message_header *hdr ATTRIBUTE_UNUSED,
+ remote_error *rerr,
+ remote_domain_revert_to_snapshot_args *args,
+ void *ret ATTRIBUTE_UNUSED)
{
virDomainPtr domain = NULL;
virDomainSnapshotPtr snapshot = NULL;
@@ -6988,13 +6988,13 @@ cleanup:
}
static int
-remoteDispatchDomainSnapshotDelete (struct qemud_server *server ATTRIBUTE_UNUSED,
- struct qemud_client *client ATTRIBUTE_UNUSED,
- virConnectPtr conn,
- remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *rerr,
- remote_domain_snapshot_delete_args *args,
- void *ret ATTRIBUTE_UNUSED)
+remoteDispatchDomainSnapshotDelete(struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client ATTRIBUTE_UNUSED,
+ virConnectPtr conn,
+ remote_message_header *hdr ATTRIBUTE_UNUSED,
+ remote_error *rerr,
+ remote_domain_snapshot_delete_args *args,
+ void *ret ATTRIBUTE_UNUSED)
{
virDomainPtr domain = NULL;
virDomainSnapshotPtr snapshot = NULL;
@@ -7026,13 +7026,13 @@ cleanup:
static int
-remoteDispatchDomainEventsRegisterAny (struct qemud_server *server ATTRIBUTE_UNUSED,
- struct qemud_client *client ATTRIBUTE_UNUSED,
- virConnectPtr conn,
- remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *rerr ATTRIBUTE_UNUSED,
- remote_domain_events_register_any_args *args,
- void *ret ATTRIBUTE_UNUSED)
+remoteDispatchDomainEventsRegisterAny(struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client ATTRIBUTE_UNUSED,
+ virConnectPtr conn,
+ remote_message_header *hdr ATTRIBUTE_UNUSED,
+ remote_error *rerr ATTRIBUTE_UNUSED,
+ remote_domain_events_register_any_args *args,
+ void *ret ATTRIBUTE_UNUSED)
{
CHECK_CONN(client);
int callbackID;
@@ -7064,13 +7064,13 @@ remoteDispatchDomainEventsRegisterAny (struct qemud_server *server ATTRIBUTE_UNU
static int
-remoteDispatchDomainEventsDeregisterAny (struct qemud_server *server ATTRIBUTE_UNUSED,
- struct qemud_client *client ATTRIBUTE_UNUSED,
- virConnectPtr conn,
- remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *rerr ATTRIBUTE_UNUSED,
- remote_domain_events_deregister_any_args *args,
- void *ret ATTRIBUTE_UNUSED)
+remoteDispatchDomainEventsDeregisterAny(struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client ATTRIBUTE_UNUSED,
+ virConnectPtr conn,
+ remote_message_header *hdr ATTRIBUTE_UNUSED,
+ remote_error *rerr ATTRIBUTE_UNUSED,
+ remote_domain_events_deregister_any_args *args,
+ void *ret ATTRIBUTE_UNUSED)
{
CHECK_CONN(client);
int callbackID = -1;
@@ -7099,91 +7099,91 @@ remoteDispatchDomainEventsDeregisterAny (struct qemud_server *server ATTRIBUTE_U
static int
-remoteDispatchNwfilterLookupByName (struct qemud_server *server ATTRIBUTE_UNUSED,
- struct qemud_client *client ATTRIBUTE_UNUSED,
- virConnectPtr conn,
- remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *rerr,
- remote_nwfilter_lookup_by_name_args *args,
- remote_nwfilter_lookup_by_name_ret *ret)
+remoteDispatchNwfilterLookupByName(struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client ATTRIBUTE_UNUSED,
+ virConnectPtr conn,
+ remote_message_header *hdr ATTRIBUTE_UNUSED,
+ remote_error *rerr,
+ remote_nwfilter_lookup_by_name_args *args,
+ remote_nwfilter_lookup_by_name_ret *ret)
{
virNWFilterPtr nwfilter;
- nwfilter = virNWFilterLookupByName (conn, args->name);
+ nwfilter = virNWFilterLookupByName(conn, args->name);
if (nwfilter == NULL) {
remoteDispatchConnError(rerr, conn);
return -1;
}
- make_nonnull_nwfilter (&ret->nwfilter, nwfilter);
+ make_nonnull_nwfilter(&ret->nwfilter, nwfilter);
virNWFilterFree(nwfilter);
return 0;
}
static int
-remoteDispatchNwfilterLookupByUuid (struct qemud_server *server ATTRIBUTE_UNUSED,
- struct qemud_client *client ATTRIBUTE_UNUSED,
- virConnectPtr conn,
- remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *rerr,
- remote_nwfilter_lookup_by_uuid_args *args,
- remote_nwfilter_lookup_by_uuid_ret *ret)
+remoteDispatchNwfilterLookupByUuid(struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client ATTRIBUTE_UNUSED,
+ virConnectPtr conn,
+ remote_message_header *hdr ATTRIBUTE_UNUSED,
+ remote_error *rerr,
+ remote_nwfilter_lookup_by_uuid_args *args,
+ remote_nwfilter_lookup_by_uuid_ret *ret)
{
virNWFilterPtr nwfilter;
- nwfilter = virNWFilterLookupByUUID (conn, (unsigned char *) args->uuid);
+ nwfilter = virNWFilterLookupByUUID(conn, (unsigned char *) args->uuid);
if (nwfilter == NULL) {
remoteDispatchConnError(rerr, conn);
return -1;
}
- make_nonnull_nwfilter (&ret->nwfilter, nwfilter);
+ make_nonnull_nwfilter(&ret->nwfilter, nwfilter);
virNWFilterFree(nwfilter);
return 0;
}
static int
-remoteDispatchNwfilterDefineXml (struct qemud_server *server ATTRIBUTE_UNUSED,
- struct qemud_client *client ATTRIBUTE_UNUSED,
- virConnectPtr conn,
- remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *rerr,
- remote_nwfilter_define_xml_args *args,
- remote_nwfilter_define_xml_ret *ret)
+remoteDispatchNwfilterDefineXml(struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client ATTRIBUTE_UNUSED,
+ virConnectPtr conn,
+ remote_message_header *hdr ATTRIBUTE_UNUSED,
+ remote_error *rerr,
+ remote_nwfilter_define_xml_args *args,
+ remote_nwfilter_define_xml_ret *ret)
{
virNWFilterPtr nwfilter;
- nwfilter = virNWFilterDefineXML (conn, args->xml);
+ nwfilter = virNWFilterDefineXML(conn, args->xml);
if (nwfilter == NULL) {
remoteDispatchConnError(rerr, conn);
return -1;
}
- make_nonnull_nwfilter (&ret->nwfilter, nwfilter);
+ make_nonnull_nwfilter(&ret->nwfilter, nwfilter);
virNWFilterFree(nwfilter);
return 0;
}
static int
-remoteDispatchNwfilterUndefine (struct qemud_server *server ATTRIBUTE_UNUSED,
- struct qemud_client *client ATTRIBUTE_UNUSED,
- virConnectPtr conn,
- remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *rerr,
- remote_nwfilter_undefine_args *args,
- void *ret ATTRIBUTE_UNUSED)
+remoteDispatchNwfilterUndefine(struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client ATTRIBUTE_UNUSED,
+ virConnectPtr conn,
+ remote_message_header *hdr ATTRIBUTE_UNUSED,
+ remote_error *rerr,
+ remote_nwfilter_undefine_args *args,
+ void *ret ATTRIBUTE_UNUSED)
{
virNWFilterPtr nwfilter;
- nwfilter = get_nonnull_nwfilter (conn, args->nwfilter);
+ nwfilter = get_nonnull_nwfilter(conn, args->nwfilter);
if (nwfilter == NULL) {
remoteDispatchConnError(rerr, conn);
return -1;
}
- if (virNWFilterUndefine (nwfilter) == -1) {
+ if (virNWFilterUndefine(nwfilter) == -1) {
remoteDispatchConnError(rerr, conn);
virNWFilterFree(nwfilter);
return -1;
@@ -7193,17 +7193,17 @@ remoteDispatchNwfilterUndefine (struct qemud_server *server ATTRIBUTE_UNUSED,
}
static int
-remoteDispatchListNwfilters (struct qemud_server *server ATTRIBUTE_UNUSED,
- struct qemud_client *client ATTRIBUTE_UNUSED,
- virConnectPtr conn,
- remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *rerr,
- remote_list_nwfilters_args *args,
- remote_list_nwfilters_ret *ret)
+remoteDispatchListNwfilters(struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client ATTRIBUTE_UNUSED,
+ virConnectPtr conn,
+ remote_message_header *hdr ATTRIBUTE_UNUSED,
+ remote_error *rerr,
+ remote_list_nwfilters_args *args,
+ remote_list_nwfilters_ret *ret)
{
if (args->maxnames > REMOTE_NWFILTER_NAME_LIST_MAX) {
- remoteDispatchFormatError (rerr,
+ remoteDispatchFormatError(rerr,
"%s", _("maxnames > REMOTE_NWFILTER_NAME_LIST_MAX"));
return -1;
}
@@ -7215,8 +7215,8 @@ remoteDispatchListNwfilters (struct qemud_server *server ATTRIBUTE_UNUSED,
}
ret->names.names_len =
- virConnectListNWFilters (conn,
- ret->names.names_val, args->maxnames);
+ virConnectListNWFilters(conn,
+ ret->names.names_val, args->maxnames);
if (ret->names.names_len == -1) {
VIR_FREE(ret->names.names_len);
remoteDispatchConnError(rerr, conn);
@@ -7228,24 +7228,24 @@ remoteDispatchListNwfilters (struct qemud_server *server ATTRIBUTE_UNUSED,
static int
-remoteDispatchNwfilterGetXmlDesc (struct qemud_server *server ATTRIBUTE_UNUSED,
- struct qemud_client *client ATTRIBUTE_UNUSED,
- virConnectPtr conn,
- remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *rerr,
- remote_nwfilter_get_xml_desc_args *args,
- remote_nwfilter_get_xml_desc_ret *ret)
+remoteDispatchNwfilterGetXmlDesc(struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client ATTRIBUTE_UNUSED,
+ virConnectPtr conn,
+ remote_message_header *hdr ATTRIBUTE_UNUSED,
+ remote_error *rerr,
+ remote_nwfilter_get_xml_desc_args *args,
+ remote_nwfilter_get_xml_desc_ret *ret)
{
virNWFilterPtr nwfilter;
- nwfilter = get_nonnull_nwfilter (conn, args->nwfilter);
+ nwfilter = get_nonnull_nwfilter(conn, args->nwfilter);
if (nwfilter == NULL) {
remoteDispatchConnError(rerr, conn);
return -1;
}
/* remoteDispatchClientRequest will free this. */
- ret->xml = virNWFilterGetXMLDesc (nwfilter, args->flags);
+ ret->xml = virNWFilterGetXMLDesc(nwfilter, args->flags);
if (!ret->xml) {
remoteDispatchConnError(rerr, conn);
virNWFilterFree(nwfilter);
@@ -7257,16 +7257,16 @@ remoteDispatchNwfilterGetXmlDesc (struct qemud_server *server ATTRIBUTE_UNUSED,
static int
-remoteDispatchNumOfNwfilters (struct qemud_server *server ATTRIBUTE_UNUSED,
- struct qemud_client *client ATTRIBUTE_UNUSED,
- virConnectPtr conn,
- remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *rerr,
- void *args ATTRIBUTE_UNUSED,
- remote_num_of_nwfilters_ret *ret)
+remoteDispatchNumOfNwfilters(struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client ATTRIBUTE_UNUSED,
+ virConnectPtr conn,
+ remote_message_header *hdr ATTRIBUTE_UNUSED,
+ remote_error *rerr,
+ void *args ATTRIBUTE_UNUSED,
+ remote_num_of_nwfilters_ret *ret)
{
- ret->num = virConnectNumOfNWFilters (conn);
+ ret->num = virConnectNumOfNWFilters(conn);
if (ret->num == -1) {
remoteDispatchConnError(rerr, conn);
return -1;
@@ -7277,24 +7277,24 @@ remoteDispatchNumOfNwfilters (struct qemud_server *server ATTRIBUTE_UNUSED,
static int
-remoteDispatchDomainGetBlockInfo (struct qemud_server *server ATTRIBUTE_UNUSED,
- struct qemud_client *client ATTRIBUTE_UNUSED,
- virConnectPtr conn,
- remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *rerr,
- remote_domain_get_block_info_args *args,
- remote_domain_get_block_info_ret *ret)
+remoteDispatchDomainGetBlockInfo(struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client ATTRIBUTE_UNUSED,
+ virConnectPtr conn,
+ remote_message_header *hdr ATTRIBUTE_UNUSED,
+ remote_error *rerr,
+ remote_domain_get_block_info_args *args,
+ remote_domain_get_block_info_ret *ret)
{
virDomainPtr dom;
virDomainBlockInfo info;
- dom = get_nonnull_domain (conn, args->dom);
+ dom = get_nonnull_domain(conn, args->dom);
if (dom == NULL) {
remoteDispatchConnError(rerr, conn);
return -1;
}
- if (virDomainGetBlockInfo (dom, args->path, &info, args->flags) == -1) {
+ if (virDomainGetBlockInfo(dom, args->path, &info, args->flags) == -1) {
remoteDispatchConnError(rerr, conn);
virDomainFree(dom);
return -1;
@@ -7310,13 +7310,13 @@ remoteDispatchDomainGetBlockInfo (struct qemud_server *server ATTRIBUTE_UNUSED,
}
static int
-qemuDispatchMonitorCommand (struct qemud_server *server ATTRIBUTE_UNUSED,
- struct qemud_client *client ATTRIBUTE_UNUSED,
- virConnectPtr conn,
- remote_message_header *hdr ATTRIBUTE_UNUSED,
- remote_error *rerr,
- qemu_monitor_command_args *args,
- qemu_monitor_command_ret *ret)
+qemuDispatchMonitorCommand(struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client ATTRIBUTE_UNUSED,
+ virConnectPtr conn,
+ remote_message_header *hdr ATTRIBUTE_UNUSED,
+ remote_error *rerr,
+ qemu_monitor_command_args *args,
+ qemu_monitor_command_ret *ret)
{
virDomainPtr domain;
@@ -7354,7 +7354,7 @@ remoteDispatchDomainOpenConsole(struct qemud_server *server ATTRIBUTE_UNUSED,
CHECK_CONN (client);
- dom = get_nonnull_domain (conn, args->domain);
+ dom = get_nonnull_domain(conn, args->domain);
if (dom == NULL) {
remoteDispatchConnError(rerr, conn);
return -1;
@@ -7400,10 +7400,10 @@ remoteDispatchDomainOpenConsole(struct qemud_server *server ATTRIBUTE_UNUSED,
* NB. If these return NULL then the caller must return an error.
*/
static virDomainPtr
-get_nonnull_domain (virConnectPtr conn, remote_nonnull_domain domain)
+get_nonnull_domain(virConnectPtr conn, remote_nonnull_domain domain)
{
virDomainPtr dom;
- dom = virGetDomain (conn, domain.name, BAD_CAST domain.uuid);
+ dom = virGetDomain(conn, domain.name, BAD_CAST domain.uuid);
/* Should we believe the domain.id sent by the client? Maybe
* this should be a check rather than an assignment? XXX
*/
@@ -7412,111 +7412,111 @@ get_nonnull_domain (virConnectPtr conn, remote_nonnull_domain domain)
}
static virNetworkPtr
-get_nonnull_network (virConnectPtr conn, remote_nonnull_network network)
+get_nonnull_network(virConnectPtr conn, remote_nonnull_network network)
{
- return virGetNetwork (conn, network.name, BAD_CAST network.uuid);
+ return virGetNetwork(conn, network.name, BAD_CAST network.uuid);
}
static virInterfacePtr
-get_nonnull_interface (virConnectPtr conn, remote_nonnull_interface iface)
+get_nonnull_interface(virConnectPtr conn, remote_nonnull_interface iface)
{
- return virGetInterface (conn, iface.name, iface.mac);
+ return virGetInterface(conn, iface.name, iface.mac);
}
static virStoragePoolPtr
-get_nonnull_storage_pool (virConnectPtr conn, remote_nonnull_storage_pool pool)
+get_nonnull_storage_pool(virConnectPtr conn, remote_nonnull_storage_pool pool)
{
- return virGetStoragePool (conn, pool.name, BAD_CAST pool.uuid);
+ return virGetStoragePool(conn, pool.name, BAD_CAST pool.uuid);
}
static virStorageVolPtr
-get_nonnull_storage_vol (virConnectPtr conn, remote_nonnull_storage_vol vol)
+get_nonnull_storage_vol(virConnectPtr conn, remote_nonnull_storage_vol vol)
{
virStorageVolPtr ret;
- ret = virGetStorageVol (conn, vol.pool, vol.name, vol.key);
+ ret = virGetStorageVol(conn, vol.pool, vol.name, vol.key);
return ret;
}
static virSecretPtr
-get_nonnull_secret (virConnectPtr conn, remote_nonnull_secret secret)
+get_nonnull_secret(virConnectPtr conn, remote_nonnull_secret secret)
{
- return virGetSecret (conn, BAD_CAST secret.uuid, secret.usageType, secret.usageID);
+ return virGetSecret(conn, BAD_CAST secret.uuid, secret.usageType, secret.usageID);
}
static virNWFilterPtr
-get_nonnull_nwfilter (virConnectPtr conn, remote_nonnull_nwfilter nwfilter)
+get_nonnull_nwfilter(virConnectPtr conn, remote_nonnull_nwfilter nwfilter)
{
- return virGetNWFilter (conn, nwfilter.name, BAD_CAST nwfilter.uuid);
+ return virGetNWFilter(conn, nwfilter.name, BAD_CAST nwfilter.uuid);
}
static virDomainSnapshotPtr
-get_nonnull_domain_snapshot (virDomainPtr domain, remote_nonnull_domain_snapshot snapshot)
+get_nonnull_domain_snapshot(virDomainPtr domain, remote_nonnull_domain_snapshot snapshot)
{
return virGetDomainSnapshot(domain, snapshot.name);
}
/* Make remote_nonnull_domain and remote_nonnull_network. */
static void
-make_nonnull_domain (remote_nonnull_domain *dom_dst, virDomainPtr dom_src)
+make_nonnull_domain(remote_nonnull_domain *dom_dst, virDomainPtr dom_src)
{
dom_dst->id = dom_src->id;
- dom_dst->name = strdup (dom_src->name);
- memcpy (dom_dst->uuid, dom_src->uuid, VIR_UUID_BUFLEN);
+ dom_dst->name = strdup(dom_src->name);
+ memcpy(dom_dst->uuid, dom_src->uuid, VIR_UUID_BUFLEN);
}
static void
-make_nonnull_network (remote_nonnull_network *net_dst, virNetworkPtr net_src)
+make_nonnull_network(remote_nonnull_network *net_dst, virNetworkPtr net_src)
{
- net_dst->name = strdup (net_src->name);
- memcpy (net_dst->uuid, net_src->uuid, VIR_UUID_BUFLEN);
+ net_dst->name = strdup(net_src->name);
+ memcpy(net_dst->uuid, net_src->uuid, VIR_UUID_BUFLEN);
}
static void
-make_nonnull_interface (remote_nonnull_interface *interface_dst,
- virInterfacePtr interface_src)
+make_nonnull_interface(remote_nonnull_interface *interface_dst,
+ virInterfacePtr interface_src)
{
- interface_dst->name = strdup (interface_src->name);
- interface_dst->mac = strdup (interface_src->mac);
+ interface_dst->name = strdup(interface_src->name);
+ interface_dst->mac = strdup(interface_src->mac);
}
static void
-make_nonnull_storage_pool (remote_nonnull_storage_pool *pool_dst, virStoragePoolPtr pool_src)
+make_nonnull_storage_pool(remote_nonnull_storage_pool *pool_dst, virStoragePoolPtr pool_src)
{
- pool_dst->name = strdup (pool_src->name);
- memcpy (pool_dst->uuid, pool_src->uuid, VIR_UUID_BUFLEN);
+ pool_dst->name = strdup(pool_src->name);
+ memcpy(pool_dst->uuid, pool_src->uuid, VIR_UUID_BUFLEN);
}
static void
-make_nonnull_storage_vol (remote_nonnull_storage_vol *vol_dst, virStorageVolPtr vol_src)
+make_nonnull_storage_vol(remote_nonnull_storage_vol *vol_dst, virStorageVolPtr vol_src)
{
- vol_dst->pool = strdup (vol_src->pool);
- vol_dst->name = strdup (vol_src->name);
- vol_dst->key = strdup (vol_src->key);
+ vol_dst->pool = strdup(vol_src->pool);
+ vol_dst->name = strdup(vol_src->name);
+ vol_dst->key = strdup(vol_src->key);
}
static void
-make_nonnull_node_device (remote_nonnull_node_device *dev_dst, virNodeDevicePtr dev_src)
+make_nonnull_node_device(remote_nonnull_node_device *dev_dst, virNodeDevicePtr dev_src)
{
dev_dst->name = strdup(dev_src->name);
}
static void
-make_nonnull_secret (remote_nonnull_secret *secret_dst, virSecretPtr secret_src)
+make_nonnull_secret(remote_nonnull_secret *secret_dst, virSecretPtr secret_src)
{
- memcpy (secret_dst->uuid, secret_src->uuid, VIR_UUID_BUFLEN);
+ memcpy(secret_dst->uuid, secret_src->uuid, VIR_UUID_BUFLEN);
secret_dst->usageType = secret_src->usageType;
- secret_dst->usageID = strdup (secret_src->usageID);
+ secret_dst->usageID = strdup(secret_src->usageID);
}
static void
-make_nonnull_nwfilter (remote_nonnull_nwfilter *nwfilter_dst, virNWFilterPtr nwfilter_src)
+make_nonnull_nwfilter(remote_nonnull_nwfilter *nwfilter_dst, virNWFilterPtr nwfilter_src)
{
- nwfilter_dst->name = strdup (nwfilter_src->name);
- memcpy (nwfilter_dst->uuid, nwfilter_src->uuid, VIR_UUID_BUFLEN);
+ nwfilter_dst->name = strdup(nwfilter_src->name);
+ memcpy(nwfilter_dst->uuid, nwfilter_src->uuid, VIR_UUID_BUFLEN);
}
static void
-make_nonnull_domain_snapshot (remote_nonnull_domain_snapshot *snapshot_dst, virDomainSnapshotPtr snapshot_src)
+make_nonnull_domain_snapshot(remote_nonnull_domain_snapshot *snapshot_dst, virDomainSnapshotPtr snapshot_src)
{
snapshot_dst->name = strdup(snapshot_src->name);
make_nonnull_domain(&snapshot_dst->domain, snapshot_src->domain);
--
1.7.4.2
13 years, 8 months