From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Jackson Subject: [PATCH 01/21] libxc: xc_domain_restore, make toolstack_restore const-correct Date: Fri, 15 Jun 2012 12:53:46 +0100 Message-ID: <1339761246-27641-2-git-send-email-ian.jackson@eu.citrix.com> References: <1339761246-27641-1-git-send-email-ian.jackson@eu.citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1339761246-27641-1-git-send-email-ian.jackson@eu.citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel@lists.xen.org Cc: Ian Jackson List-Id: xen-devel@lists.xenproject.org Update the one provider of this callback, in libxl. Signed-off-by: Ian Jackson Acked-by: Ian Campbell Changes in v3: * No longer introduce function pointer typedefs into the libxc API. --- tools/libxc/xenguest.h | 2 +- tools/libxl/libxl_dom.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/libxc/xenguest.h b/tools/libxc/xenguest.h index 91d53f7..707e31c 100644 --- a/tools/libxc/xenguest.h +++ b/tools/libxc/xenguest.h @@ -92,7 +92,7 @@ int xc_domain_save(xc_interface *xch, int io_fd, uint32_t dom, uint32_t max_iter /* callbacks provided by xc_domain_restore */ struct restore_callbacks { /* callback to restore toolstack specific data */ - int (*toolstack_restore)(uint32_t domid, uint8_t *buf, + int (*toolstack_restore)(uint32_t domid, const uint8_t *buf, uint32_t size, void* data); /* to be provided as the last argument to each callback function */ diff --git a/tools/libxl/libxl_dom.c b/tools/libxl/libxl_dom.c index 10f8c1f..677db1d 100644 --- a/tools/libxl/libxl_dom.c +++ b/tools/libxl/libxl_dom.c @@ -467,13 +467,13 @@ static inline char *restore_helper(libxl__gc *gc, uint32_t domid, domid, phys_offset, node); } -static int libxl__toolstack_restore(uint32_t domid, uint8_t *buf, +static int libxl__toolstack_restore(uint32_t domid, const uint8_t *buf, uint32_t size, void *data) { libxl__gc *gc = (libxl__gc *) data; libxl_ctx *ctx = gc->owner; int i, ret; - uint8_t *ptr = buf; + const uint8_t *ptr = buf; uint32_t count = 0, version = 0; struct libxl__physmap_info* pi; char *xs_path; -- 1.7.2.5