From: Ian Campbell Subject: [PATCH 07 of 24] libxc: replace open-coded use of XENMEM_decrease_reservation Date: Mon, 06 Sep 2010 14:38:27 +0100 Message-ID: <4d8b7ca524c7aeace21b.1283780307@localhost.localdomain> References: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com Cc: Ian Campbell List-Id: xen-devel@lists.xenproject.org # HG changeset patch # User Ian Campbell # Date 1283779691 -3600 # Node ID 4d8b7ca524c7aeace21ba151cb21c784b268ae5f # Parent e79d9a42c67e1d03f79d40529b2578578a5aa547 libxc: replace open-coded use of XENMEM_decrease_reservation Signed-off-by: Ian Campbell diff -r e79d9a42c67e -r 4d8b7ca524c7 tools/libxc/xc_domain_restore.c --- a/tools/libxc/xc_domain_restore.c Mon Sep 06 14:28:11 2010 +0100 +++ b/tools/libxc/xc_domain_restore.c Mon Sep 06 14:28:11 2010 +0100 @@ -1529,15 +1529,7 @@ int xc_domain_restore(xc_interface *xch, if ( nr_frees > 0 ) { - struct xen_memory_reservation reservation = { - .nr_extents = nr_frees, - .extent_order = 0, - .domid = dom - }; - set_xen_guest_handle(reservation.extent_start, tailbuf.u.pv.pfntab); - - if ( (frc = xc_memory_op(xch, XENMEM_decrease_reservation, - &reservation)) != nr_frees ) + if ( (frc = xc_domain_memory_decrease_reservation(xch, dom, nr_frees, 0, tailbuf.u.pv.pfntab)) != nr_frees ) { PERROR("Could not decrease reservation : %d", frc); goto out;