Reorder signature of virDrvDomainOpenConsole to match the common pattern.
Add special case code to handle deviation in the public API version.
Adds a missing remoteStreamRelease to remoteDomainScreenshot error path.
---
daemon/remote.c | 181 ------------------------------------
daemon/remote_generator.pl | 104 +++++++++++++++++++--
src/driver.h | 2 +-
src/libvirt.c | 2 +-
src/lxc/lxc_driver.c | 2 +-
src/qemu/qemu_driver.c | 2 +-
src/remote/remote_driver.c | 207 ------------------------------------------
src/remote/remote_protocol.x | 20 +++--
src/uml/uml_driver.c | 2 +-
src/xen/xen_driver.c | 2 +-
10 files changed, 113 insertions(+), 411 deletions(-)
diff --git a/daemon/remote.c b/daemon/remote.c
index e3bd4a2..f8db6fe 100644
--- a/daemon/remote.c
+++ b/daemon/remote.c
@@ -1171,50 +1171,6 @@ cleanup:
}
static int
-remoteDispatchDomainMigratePrepareTunnel(struct qemud_server *server ATTRIBUTE_UNUSED,
- struct qemud_client *client,
- virConnectPtr conn,
- remote_message_header *hdr,
- remote_error *rerr,
- remote_domain_migrate_prepare_tunnel_args
*args,
- void *ret ATTRIBUTE_UNUSED)
-{
- char *dname;
- struct qemud_client_stream *stream = NULL;
- int rv = -1;
-
- if (!conn) {
- virNetError(VIR_ERR_INTERNAL_ERROR, "%s", _("connection not
open"));
- goto cleanup;
- }
-
- dname = args->dname == NULL ? NULL : *args->dname;
-
- if (!(stream = remoteCreateClientStream(conn, hdr)))
- goto cleanup;
-
- if (virDomainMigratePrepareTunnel(conn, stream->st,
- args->flags, dname, args->resource,
- args->dom_xml) < 0)
- goto cleanup;
-
- if (remoteAddClientStream(client, stream, 0) < 0)
- goto cleanup;
-
- rv = 0;
-
-cleanup:
- if (rv < 0) {
- remoteDispatchError(rerr);
- if (stream) {
- virStreamAbort(stream->st);
- remoteFreeClientStream(client, stream);
- }
- }
- return rv;
-}
-
-static int
remoteDispatchDomainPinVcpu(struct qemud_server *server ATTRIBUTE_UNUSED,
struct qemud_client *client ATTRIBUTE_UNUSED,
virConnectPtr conn,
@@ -2601,96 +2557,6 @@ cleanup:
return rv;
}
-static int remoteDispatchStorageVolUpload(struct qemud_server *server ATTRIBUTE_UNUSED,
- struct qemud_client *client,
- virConnectPtr conn,
- remote_message_header *hdr,
- remote_error *rerr,
- remote_storage_vol_upload_args *args,
- void *ret ATTRIBUTE_UNUSED)
-{
- struct qemud_client_stream *stream = NULL;
- virStorageVolPtr vol = NULL;
- int rv = -1;
-
- if (!conn) {
- virNetError(VIR_ERR_INTERNAL_ERROR, "%s", _("connection not
open"));
- goto cleanup;
- }
-
- if (!(vol = get_nonnull_storage_vol(conn, args->vol)))
- goto cleanup;
-
- if (!(stream = remoteCreateClientStream(conn, hdr)))
- goto cleanup;
-
- if (virStorageVolUpload(vol, stream->st,
- args->offset, args->length,
- args->flags) < 0)
- goto cleanup;
-
- if (remoteAddClientStream(client, stream, 0) < 0)
- goto cleanup;
-
- rv = 0;
-
-cleanup:
- if (rv < 0)
- remoteDispatchError(rerr);
- if (vol)
- virStorageVolFree(vol);
- if (stream && rv != 0) {
- virStreamAbort(stream->st);
- remoteFreeClientStream(client, stream);
- }
- return rv;
-}
-
-static int remoteDispatchStorageVolDownload(struct qemud_server *server
ATTRIBUTE_UNUSED,
- struct qemud_client *client,
- virConnectPtr conn,
- remote_message_header *hdr,
- remote_error *rerr,
- remote_storage_vol_download_args *args,
- void *ret ATTRIBUTE_UNUSED)
-{
- struct qemud_client_stream *stream = NULL;
- virStorageVolPtr vol = NULL;
- int rv = -1;
-
- if (!conn) {
- virNetError(VIR_ERR_INTERNAL_ERROR, "%s", _("connection not
open"));
- goto cleanup;
- }
-
- if (!(vol = get_nonnull_storage_vol(conn, args->vol)))
- goto cleanup;
-
- if (!(stream = remoteCreateClientStream(conn, hdr)))
- goto cleanup;
-
- if (virStorageVolDownload(vol, stream->st,
- args->offset, args->length,
- args->flags) < 0)
- goto cleanup;
-
- if (remoteAddClientStream(client, stream, 1) < 0)
- goto cleanup;
-
- rv = 0;
-
-cleanup:
- if (rv < 0)
- remoteDispatchError(rerr);
- if (vol)
- virStorageVolFree(vol);
- if (stream && rv != 0) {
- virStreamAbort(stream->st);
- remoteFreeClientStream(client, stream);
- }
- return rv;
-}
-
/***************************
* Register / deregister events
@@ -2991,53 +2857,6 @@ cleanup:
}
-static int
-remoteDispatchDomainOpenConsole(struct qemud_server *server ATTRIBUTE_UNUSED,
- struct qemud_client *client,
- virConnectPtr conn,
- remote_message_header *hdr,
- remote_error *rerr,
- remote_domain_open_console_args *args,
- void *ret ATTRIBUTE_UNUSED)
-{
- struct qemud_client_stream *stream = NULL;
- virDomainPtr dom = NULL;
- int rv = -1;
-
- if (!conn) {
- virNetError(VIR_ERR_INTERNAL_ERROR, "%s", _("connection not
open"));
- goto cleanup;
- }
-
- if (!(dom = get_nonnull_domain(conn, args->dom)))
- goto cleanup;
-
- if (!(stream = remoteCreateClientStream(conn, hdr)))
- goto cleanup;
-
- if (virDomainOpenConsole(dom,
- args->devname ? *args->devname : NULL,
- stream->st,
- args->flags) < 0)
- goto cleanup;
-
- if (remoteAddClientStream(client, stream, 1) < 0)
- goto cleanup;
-
- rv = 0;
-
-cleanup:
- if (rv < 0)
- remoteDispatchError(rerr);
- if (stream && rv < 0) {
- virStreamAbort(stream->st);
- remoteFreeClientStream(client, stream);
- }
- if (dom)
- virDomainFree(dom);
- return rv;
-}
-
#include "remote_dispatch_bodies.h"
#include "qemu_dispatch_bodies.h"
diff --git a/daemon/remote_generator.pl b/daemon/remote_generator.pl
index a3b8421..c2468b9 100755
--- a/daemon/remote_generator.pl
+++ b/daemon/remote_generator.pl
@@ -43,7 +43,7 @@ sub name_to_ProcName {
# Read the input file (usually remote_protocol.x) and form an
# opinion about the name, args and return type of each RPC.
-my ($name, $ProcName, $id, $flags, $gen, %calls, @calls);
+my ($name, $ProcName, $id, $flags, %calls, @calls);
# only generate a close method if -c was passed
if ($opt_c) {
@@ -135,19 +135,26 @@ while (<PROTOCOL>) {
$ProcName = name_to_ProcName ($name);
if ($opt_b or $opt_k) {
- if (!($flags =~ m/^\s*\/\*\s*(\S+)\s+(\S+)\s*\*\/\s*$/)) {
+ if (!($flags =~ m/^\s*\/\*\s*(\S+)\s+(\S+)\s*(.*)\*\/\s*$/)) {
die "invalid generator flags for ${procprefix}_PROC_${name}"
}
- $gen = $opt_b ? $1 : $2;
+ my $genmode = $opt_b ? $1 : $2;
+ my $genflags = $3;
- if ($gen eq "autogen") {
+ if ($genmode eq "autogen") {
push(@autogen, $ProcName);
- } elsif ($gen eq "skipgen") {
+ } elsif ($genmode eq "skipgen") {
# ignore it
} else {
die "invalid generator flags for ${procprefix}_PROC_${name}"
}
+
+ if (defined $genflags and $genflags =~ m/\|\s*(read|write)stream/) {
+ $calls{$name}->{streamflag} = $1;
+ } else {
+ $calls{$name}->{streamflag} = "none";
+ }
}
$calls[$id] = $calls{$name};
@@ -563,6 +570,30 @@ elsif ($opt_b) {
push(@vars_list, "vir$struct_name tmp");
}
+ if ($calls{$_}->{streamflag} ne "none") {
+ my $first_arg = shift(@args_list);
+ my $second_arg;
+
+ if ($calls{$_}->{ProcName} eq "DomainOpenConsole") {
+ # SPECIAL: virDomainOpenConsole differs and takes the stream
+ # as third argument instead of the second
+ $second_arg = shift(@args_list);
+ }
+
+ unshift(@args_list, "stream->st");
+
+ if (defined $second_arg) {
+ unshift(@args_list, $second_arg);
+ }
+
+ unshift(@args_list, $first_arg);
+
+ push(@free_list_on_error, "if (stream) {");
+ push(@free_list_on_error, " virStreamAbort(stream->st);");
+ push(@free_list_on_error, " remoteFreeClientStream(client,
stream);");
+ push(@free_list_on_error, "}");
+ }
+
# print functions signature
print "\n";
print "static int\n";
@@ -595,6 +626,10 @@ elsif ($opt_b) {
print " $var;\n";
}
+ if ($calls{$_}->{streamflag} ne "none") {
+ print " struct qemud_client_stream *stream = NULL;\n";
+ }
+
print "\n";
print " if (!conn) {\n";
print " virNetError(VIR_ERR_INTERNAL_ERROR, \"%s\",
_(\"connection not open\"));\n";
@@ -625,6 +660,12 @@ elsif ($opt_b) {
print "\n";
}
+ if ($calls{$_}->{streamflag} ne "none") {
+ print " if (!(stream = remoteCreateClientStream(conn,
hdr)))\n";
+ print " goto cleanup;\n";
+ print "\n";
+ }
+
if ($calls{$_}->{ret} eq "void") {
print " if (vir$calls{$_}->{ProcName}(";
print join(', ', @args_list);
@@ -691,7 +732,6 @@ elsif ($opt_b) {
print " if (vir$calls{$_}->{ProcName}(";
print join(', ', @args_list);
print ") < 0)\n";
-
print " goto cleanup;\n";
print "\n";
@@ -703,6 +743,20 @@ elsif ($opt_b) {
print "\n";
}
+ if ($calls{$_}->{streamflag} ne "none") {
+ print " if (remoteAddClientStream(client, stream, ";
+
+ if ($calls{$_}->{streamflag} eq "write") {
+ print "0";
+ } else {
+ print "1";
+ }
+
+ print ") < 0)\n";
+ print " goto cleanup;\n";
+ print "\n";
+ }
+
print " rv = 0;\n";
print "\n";
print "cleanup:\n";
@@ -854,9 +908,14 @@ elsif ($opt_k) {
}
}
- if ($call->{ProcName} eq "DomainMigrateSetMaxDowntime"
and
- $arg_name eq "downtime") {
- $type_name = "unsigned long long";
+ # SPECIAL: some hyper parameters map to long longs
+ if (($call->{ProcName} eq "DomainMigrateSetMaxDowntime"
and
+ $arg_name eq "downtime") or
+ ($call->{ProcName} eq "StorageVolUpload" and
+ ($arg_name eq "offset" or $arg_name eq
"length")) or
+ ($call->{ProcName} eq "StorageVolDownload" and
+ ($arg_name eq "offset" or $arg_name eq
"length"))) {
+ $type_name .= " long";
}
push(@args_list, "$type_name $arg_name");
@@ -1042,6 +1101,12 @@ elsif ($opt_k) {
}
}
+ if ($call->{streamflag} ne "none") {
+ my $first_arg = shift(@args_list);
+ unshift(@args_list, "virStreamPtr st");
+ unshift(@args_list, $first_arg);
+ }
+
# print function
print "\n";
print "static $single_ret_type\n";
@@ -1062,9 +1127,22 @@ elsif ($opt_k) {
print " int i;\n";
}
+ if ($call->{streamflag} ne "none") {
+ print " struct private_stream_data *privst = NULL;\n";
+ }
+
print "\n";
print " remoteDriverLock(priv);\n";
+ if ($call->{streamflag} ne "none") {
+ print "\n";
+ print " if (!(privst = remoteStreamOpen(st,
REMOTE_PROC_$call->{UC_NAME}, priv->counter)))\n";
+ print " goto done;\n";
+ print "\n";
+ print " st->driver = &remoteStreamDrv;\n";
+ print " st->privateData = privst;\n";
+ }
+
if ($call->{ProcName} eq "SupportsFeature") {
# SPECIAL: VIR_DRV_FEATURE_REMOTE feature is handled directly
print "\n";
@@ -1113,8 +1191,14 @@ elsif ($opt_k) {
print "\n";
print " if (call($priv_src, priv, 0,
${procprefix}_PROC_$call->{UC_NAME},\n";
print " (xdrproc_t)xdr_$call->{args}, (char
*)$call_args,\n";
- print " (xdrproc_t)xdr_$call->{ret}, (char *)$call_ret) ==
-1)\n";
+ print " (xdrproc_t)xdr_$call->{ret}, (char *)$call_ret) ==
-1) {\n";
+
+ if ($call->{streamflag} ne "none") {
+ print " remoteStreamRelease(st);\n";
+ }
+
print " goto done;\n";
+ print " }\n";
print "\n";
if ($single_ret_as_list) {
diff --git a/src/driver.h b/src/driver.h
index b800f35..e0fe933 100644
--- a/src/driver.h
+++ b/src/driver.h
@@ -516,8 +516,8 @@ typedef int
typedef int
(*virDrvDomainOpenConsole)(virDomainPtr dom,
- const char *devname,
virStreamPtr st,
+ const char *devname,
unsigned int flags);
typedef int
diff --git a/src/libvirt.c b/src/libvirt.c
index 7dec5a6..8ce0afd 100644
--- a/src/libvirt.c
+++ b/src/libvirt.c
@@ -13598,7 +13598,7 @@ int virDomainOpenConsole(virDomainPtr dom,
if (conn->driver->domainOpenConsole) {
int ret;
- ret = conn->driver->domainOpenConsole(dom, devname, st, flags);
+ ret = conn->driver->domainOpenConsole(dom, st, devname, flags);
if (ret < 0)
goto error;
return ret;
diff --git a/src/lxc/lxc_driver.c b/src/lxc/lxc_driver.c
index 68824e4..49b933e 100644
--- a/src/lxc/lxc_driver.c
+++ b/src/lxc/lxc_driver.c
@@ -2608,8 +2608,8 @@ cleanup:
static int
lxcDomainOpenConsole(virDomainPtr dom,
- const char *devname,
virStreamPtr st,
+ const char *devname,
unsigned int flags)
{
lxc_driver_t *driver = dom->conn->privateData;
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index fff41e0..5ebb5e6 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -7137,8 +7137,8 @@ cleanup:
static int
qemuDomainOpenConsole(virDomainPtr dom,
- const char *devname,
virStreamPtr st,
+ const char *devname,
unsigned int flags)
{
struct qemud_driver *driver = dom->conn->privateData;
diff --git a/src/remote/remote_driver.c b/src/remote/remote_driver.c
index f18523c..525f6a1 100644
--- a/src/remote/remote_driver.c
+++ b/src/remote/remote_driver.c
@@ -4537,48 +4537,6 @@ static virStreamDriver remoteStreamDrv = {
.streamRemoveCallback = remoteStreamEventRemoveCallback,
};
-
-static int
-remoteDomainMigratePrepareTunnel(virConnectPtr conn,
- virStreamPtr st,
- unsigned long flags,
- const char *dname,
- unsigned long resource,
- const char *dom_xml)
-{
- struct private_data *priv = conn->privateData;
- struct private_stream_data *privst = NULL;
- int rv = -1;
- remote_domain_migrate_prepare_tunnel_args args;
-
- remoteDriverLock(priv);
-
- if (!(privst = remoteStreamOpen(st, REMOTE_PROC_DOMAIN_MIGRATE_PREPARE_TUNNEL,
priv->counter)))
- goto done;
-
- st->driver = &remoteStreamDrv;
- st->privateData = privst;
-
- args.flags = flags;
- args.dname = dname == NULL ? NULL : (char **) &dname;
- args.resource = resource;
- args.dom_xml = (char *) dom_xml;
-
- if (call(conn, priv, 0, REMOTE_PROC_DOMAIN_MIGRATE_PREPARE_TUNNEL,
- (xdrproc_t) xdr_remote_domain_migrate_prepare_tunnel_args, (char *)
&args,
- (xdrproc_t) xdr_void, NULL) == -1) {
- remoteStreamRelease(st);
- goto done;
- }
-
- rv = 0;
-
-done:
- remoteDriverUnlock(priv);
-
- return rv;
-}
-
static int remoteDomainEventRegisterAny(virConnectPtr conn,
virDomainPtr dom,
int eventID,
@@ -4673,171 +4631,6 @@ done:
return rv;
}
-static char *
-remoteDomainScreenshot (virDomainPtr domain,
- virStreamPtr st,
- unsigned int screen,
- unsigned int flags)
-{
- struct private_data *priv = domain->conn->privateData;
- struct private_stream_data *privst = NULL;
- remote_domain_screenshot_args args;
- remote_domain_screenshot_ret ret;
- char *rv = NULL;
-
- remoteDriverLock(priv);
-
- if (!(privst = remoteStreamOpen(st,
- REMOTE_PROC_DOMAIN_SCREENSHOT,
- priv->counter)))
- goto done;
-
- st->driver = &remoteStreamDrv;
- st->privateData = privst;
-
- make_nonnull_domain(&args.dom, domain);
- args.flags = flags;
- args.screen = screen;
-
- memset(&ret, 0, sizeof(ret));
- if (call (domain->conn, priv, 0, REMOTE_PROC_DOMAIN_SCREENSHOT,
- (xdrproc_t) xdr_remote_domain_screenshot_args, (char *) &args,
- (xdrproc_t) xdr_remote_domain_screenshot_ret, (char *) &ret) == -1)
- goto done;
-
- rv = ret.mime ? *ret.mime : NULL;
- VIR_FREE(ret.mime);
-
-done:
- remoteDriverUnlock(priv);
- return rv;
-}
-
-static int
-remoteStorageVolUpload(virStorageVolPtr vol,
- virStreamPtr st,
- unsigned long long offset,
- unsigned long long length,
- unsigned int flags)
-{
- struct private_data *priv = vol->conn->privateData;
- struct private_stream_data *privst = NULL;
- int rv = -1;
- remote_storage_vol_upload_args args;
-
- remoteDriverLock(priv);
-
- if (!(privst = remoteStreamOpen(st,
- REMOTE_PROC_STORAGE_VOL_UPLOAD,
- priv->counter)))
- goto done;
-
- st->driver = &remoteStreamDrv;
- st->privateData = privst;
-
- make_nonnull_storage_vol(&args.vol, vol);
- args.offset = offset;
- args.length = length;
- args.flags = flags;
-
- if (call (vol->conn, priv, 0, REMOTE_PROC_STORAGE_VOL_UPLOAD,
- (xdrproc_t) xdr_remote_storage_vol_upload_args, (char *) &args,
- (xdrproc_t) xdr_void, NULL) == -1) {
- remoteStreamRelease(st);
- goto done;
- }
-
- rv = 0;
-
-done:
- remoteDriverUnlock(priv);
-
- return rv;
-}
-
-
-static int
-remoteStorageVolDownload(virStorageVolPtr vol,
- virStreamPtr st,
- unsigned long long offset,
- unsigned long long length,
- unsigned int flags)
-{
- struct private_data *priv = vol->conn->privateData;
- struct private_stream_data *privst = NULL;
- int rv = -1;
- remote_storage_vol_download_args args;
-
- remoteDriverLock(priv);
-
- if (!(privst = remoteStreamOpen(st,
- REMOTE_PROC_STORAGE_VOL_DOWNLOAD,
- priv->counter)))
- goto done;
-
- st->driver = &remoteStreamDrv;
- st->privateData = privst;
-
- make_nonnull_storage_vol(&args.vol, vol);
- args.offset = offset;
- args.length = length;
- args.flags = flags;
-
- if (call (vol->conn, priv, 0, REMOTE_PROC_STORAGE_VOL_DOWNLOAD,
- (xdrproc_t) xdr_remote_storage_vol_download_args, (char *) &args,
- (xdrproc_t) xdr_void, NULL) == -1) {
- remoteStreamRelease(st);
- goto done;
- }
-
- rv = 0;
-
-done:
- remoteDriverUnlock(priv);
-
- return rv;
-}
-
-
-static int
-remoteDomainOpenConsole(virDomainPtr dom,
- const char *devname,
- virStreamPtr st,
- unsigned int flags)
-{
- struct private_data *priv = dom->conn->privateData;
- struct private_stream_data *privst = NULL;
- int rv = -1;
- remote_domain_open_console_args args;
-
- remoteDriverLock(priv);
-
- if (!(privst = remoteStreamOpen(st, REMOTE_PROC_DOMAIN_OPEN_CONSOLE,
priv->counter)))
- goto done;
-
- st->driver = &remoteStreamDrv;
- st->privateData = privst;
-
- make_nonnull_domain (&args.dom, dom);
- args.devname = devname ? (char **)&devname : NULL;
- args.flags = flags;
-
- if (call(dom->conn, priv, 0, REMOTE_PROC_DOMAIN_OPEN_CONSOLE,
- (xdrproc_t) xdr_remote_domain_open_console_args, (char *) &args,
- (xdrproc_t) xdr_void, NULL) == -1) {
- remoteStreamRelease(st);
- goto done;
- }
-
- rv = 0;
-
-done:
- remoteDriverUnlock(priv);
-
- return rv;
-}
-
-
/*----------------------------------------------------------------------*/
static int
diff --git a/src/remote/remote_protocol.x b/src/remote/remote_protocol.x
index b14aee0..e7bc2ec 100644
--- a/src/remote/remote_protocol.x
+++ b/src/remote/remote_protocol.x
@@ -1965,7 +1965,10 @@ const REMOTE_PROTOCOL_VERSION = 1;
enum remote_procedure {
/* Each function must have a two-word comment. The first word is
* whether remote_generator.pl handles daemon, the second whether
- * it handles src/remote. */
+ * it handles src/remote. Additional flags can be specified after a
+ * pipe. The readstream/writestream flag lets daemon and src/remote
+ * create a stream. The direction is defined from the src/remote point of
+ * view. A readstream transfers data from daemon to src/remote. */
REMOTE_PROC_OPEN = 1, /* skipgen skipgen */
REMOTE_PROC_CLOSE = 2, /* skipgen skipgen */
REMOTE_PROC_GET_TYPE = 3, /* skipgen skipgen */
@@ -2127,7 +2130,7 @@ enum remote_procedure {
REMOTE_PROC_SECRET_GET_VALUE = 145, /* skipgen skipgen */
REMOTE_PROC_SECRET_UNDEFINE = 146, /* autogen autogen */
REMOTE_PROC_SECRET_LOOKUP_BY_USAGE = 147, /* autogen autogen */
- REMOTE_PROC_DOMAIN_MIGRATE_PREPARE_TUNNEL = 148, /* skipgen skipgen */
+ REMOTE_PROC_DOMAIN_MIGRATE_PREPARE_TUNNEL = 148, /* autogen autogen | writestream */
REMOTE_PROC_IS_SECURE = 149, /* autogen skipgen */
REMOTE_PROC_DOMAIN_IS_ACTIVE = 150, /* autogen autogen */
@@ -2186,18 +2189,18 @@ enum remote_procedure {
REMOTE_PROC_DOMAIN_SET_VCPUS_FLAGS = 199, /* autogen autogen */
REMOTE_PROC_DOMAIN_GET_VCPUS_FLAGS = 200, /* autogen autogen */
- REMOTE_PROC_DOMAIN_OPEN_CONSOLE = 201, /* skipgen skipgen */
+ REMOTE_PROC_DOMAIN_OPEN_CONSOLE = 201, /* autogen autogen | readstream */
REMOTE_PROC_DOMAIN_IS_UPDATED = 202, /* autogen autogen */
REMOTE_PROC_GET_SYSINFO = 203, /* autogen autogen */
REMOTE_PROC_DOMAIN_SET_MEMORY_FLAGS = 204, /* autogen autogen */
REMOTE_PROC_DOMAIN_SET_BLKIO_PARAMETERS = 205, /* skipgen skipgen */
REMOTE_PROC_DOMAIN_GET_BLKIO_PARAMETERS = 206, /* skipgen skipgen */
REMOTE_PROC_DOMAIN_MIGRATE_SET_MAX_SPEED = 207, /* autogen autogen */
- REMOTE_PROC_STORAGE_VOL_UPLOAD = 208, /* skipgen skipgen */
- REMOTE_PROC_STORAGE_VOL_DOWNLOAD = 209, /* skipgen skipgen */
+ REMOTE_PROC_STORAGE_VOL_UPLOAD = 208, /* autogen autogen | writestream */
+ REMOTE_PROC_STORAGE_VOL_DOWNLOAD = 209, /* autogen autogen | readstream */
REMOTE_PROC_DOMAIN_INJECT_NMI = 210, /* autogen autogen */
- REMOTE_PROC_DOMAIN_SCREENSHOT = 211 /* skipgen skipgen */
+ REMOTE_PROC_DOMAIN_SCREENSHOT = 211 /* skipgen autogen | readstream */
/*
* Notice how the entries are grouped in sets of 10 ?
* Nice isn't it. Please keep it this way when adding more.
@@ -2205,7 +2208,10 @@ enum remote_procedure {
/* Each function must have a two-word comment. The first word is
* whether remote_generator.pl handles daemon, the second whether
- * it handles src/remote. */
+ * it handles src/remote. Additional flags can be specified after a
+ * pipe. The readstream/writestream flag lets daemon and src/remote
+ * create a stream. The direction is defined from the src/remote point of
+ * view. A readstream transfers data from daemon to src/remote. */
};
/*
diff --git a/src/uml/uml_driver.c b/src/uml/uml_driver.c
index e7cd77a..579217e 100644
--- a/src/uml/uml_driver.c
+++ b/src/uml/uml_driver.c
@@ -2079,8 +2079,8 @@ cleanup:
static int
umlDomainOpenConsole(virDomainPtr dom,
- const char *devname,
virStreamPtr st,
+ const char *devname,
unsigned int flags)
{
struct uml_driver *driver = dom->conn->privateData;
diff --git a/src/xen/xen_driver.c b/src/xen/xen_driver.c
index 5bafb73..f2221cf 100644
--- a/src/xen/xen_driver.c
+++ b/src/xen/xen_driver.c
@@ -2042,8 +2042,8 @@ out:
static int
xenUnifiedDomainOpenConsole(virDomainPtr dom,
- const char *devname,
virStreamPtr st,
+ const char *devname,
unsigned int flags)
{
virDomainDefPtr def = NULL;
--
1.7.0.4