# HG changeset patch
# User Ian Campbell <ian.campbell@xxxxxxxxxx>
# Date 1283779691 -3600
# Node ID 8ad75cd961a081ce4ba60c97899b13112d7a5f3f
# Parent 7e23b1acc3f23c9f06c88b6f4480a614c49c9a96
libxc: Remove unnecessary double indirection from xc_readconsolering
Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
diff -r 7e23b1acc3f2 -r 8ad75cd961a0 tools/console/daemon/io.c
--- a/tools/console/daemon/io.c Mon Sep 06 14:28:11 2010 +0100
+++ b/tools/console/daemon/io.c Mon Sep 06 14:28:11 2010 +0100
@@ -887,7 +887,7 @@ static void handle_hv_logs(void)
if ((port = xc_evtchn_pending(xce_handle)) == -1)
return;
- if (xc_readconsolering(xch, &bufptr, &size, 0, 1, &index) == 0 && size
> 0) {
+ if (xc_readconsolering(xch, bufptr, &size, 0, 1, &index) == 0 && size >
0) {
int logret;
if (log_time_hv)
logret = write_with_timestamp(log_hv_fd, buffer, size,
diff -r 7e23b1acc3f2 -r 8ad75cd961a0 tools/libxc/xc_misc.c
--- a/tools/libxc/xc_misc.c Mon Sep 06 14:28:11 2010 +0100
+++ b/tools/libxc/xc_misc.c Mon Sep 06 14:28:11 2010 +0100
@@ -22,13 +22,12 @@
#include <xen/hvm/hvm_op.h>
int xc_readconsolering(xc_interface *xch,
- char **pbuffer,
+ char *buffer,
unsigned int *pnr_chars,
int clear, int incremental, uint32_t *pindex)
{
int ret;
DECLARE_SYSCTL;
- char *buffer = *pbuffer;
unsigned int nr_chars = *pnr_chars;
sysctl.cmd = XEN_SYSCTL_readconsole;
diff -r 7e23b1acc3f2 -r 8ad75cd961a0 tools/libxc/xenctrl.h
--- a/tools/libxc/xenctrl.h Mon Sep 06 14:28:11 2010 +0100
+++ b/tools/libxc/xenctrl.h Mon Sep 06 14:28:11 2010 +0100
@@ -729,7 +729,7 @@ int xc_physdev_pci_access_modify(xc_inte
int enable);
int xc_readconsolering(xc_interface *xch,
- char **pbuffer,
+ char *buffer,
unsigned int *pnr_chars,
int clear, int incremental, uint32_t *pindex);
diff -r 7e23b1acc3f2 -r 8ad75cd961a0 tools/libxl/libxl.c
--- a/tools/libxl/libxl.c Mon Sep 06 14:28:11 2010 +0100
+++ b/tools/libxl/libxl.c Mon Sep 06 14:28:11 2010 +0100
@@ -3162,7 +3162,7 @@ int libxl_xen_console_read_line(libxl_ct
int ret;
memset(cr->buffer, 0, cr->size);
- ret = xc_readconsolering(ctx->xch, &cr->buffer, &cr->count,
+ ret = xc_readconsolering(ctx->xch, cr->buffer, &cr->count,
cr->clear, cr->incremental, &cr->index);
if (ret < 0) {
XL_LOG_ERRNO(ctx, XL_LOG_ERROR, "reading console ring buffer");
diff -r 7e23b1acc3f2 -r 8ad75cd961a0 tools/python/xen/lowlevel/xc/xc.c
--- a/tools/python/xen/lowlevel/xc/xc.c Mon Sep 06 14:28:11 2010 +0100
+++ b/tools/python/xen/lowlevel/xc/xc.c Mon Sep 06 14:28:11 2010 +0100
@@ -1116,7 +1116,7 @@ static PyObject *pyxc_readconsolering(Xc
!str )
return NULL;
- ret = xc_readconsolering(self->xc_handle, &str, &count, clear,
+ ret = xc_readconsolering(self->xc_handle, str, &count, clear,
incremental, &index);
if ( ret < 0 )
return pyxc_error_to_exception(self->xc_handle);
@@ -1133,7 +1133,7 @@ static PyObject *pyxc_readconsolering(Xc
str = ptr + count;
count = size - count;
- ret = xc_readconsolering(self->xc_handle, &str, &count, clear,
+ ret = xc_readconsolering(self->xc_handle, str, &count, clear,
1, &index);
if ( ret < 0 )
break;
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|