From: Christoph Egger Subject: [PATCH][TOOLS] libxc: Update for NetBSD Date: Tue, 10 Jun 2008 10:59:20 +0200 Message-ID: <200806101059.20158.Christoph.Egger@amd.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="Boundary-00=_oJkTIHu9Wm0qcaj" Return-path: 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 List-Id: xen-devel@lists.xenproject.org --Boundary-00=_oJkTIHu9Wm0qcaj Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hi! Attached patch returns hypercall return value when ioctl was successful. Signed-off-by: Christoph Egger =2D-=20 AMD Saxony, Dresden, Germany Operating System Research Center Legal Information: AMD Saxony Limited Liability Company & Co. KG Sitz (Gesch=E4ftsanschrift): Wilschdorfer Landstr. 101, 01109 Dresden, Deutschland Registergericht Dresden: HRA 4896 vertretungsberechtigter Komplement=E4r: AMD Saxony LLC (Sitz Wilmington, Delaware, USA) Gesch=E4ftsf=FChrer der AMD Saxony LLC: Dr. Hans-R. Deppe, Thomas McCoy --Boundary-00=_oJkTIHu9Wm0qcaj Content-Type: text/x-diff; charset="iso-8859-1"; name="tools_netbsd.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="tools_netbsd.diff" diff -r 7a0f1bf86516 tools/include/xen-sys/NetBSD/privcmd.h --- a/tools/include/xen-sys/NetBSD/privcmd.h Tue Jun 10 09:27:01 2008 +0100 +++ b/tools/include/xen-sys/NetBSD/privcmd.h Tue Jun 10 10:49:17 2008 +0200 @@ -36,6 +36,7 @@ typedef struct privcmd_hypercall { unsigned long op; unsigned long arg[5]; + long retval; } privcmd_hypercall_t; typedef struct privcmd_mmap_entry { diff -r 7a0f1bf86516 tools/libxc/xc_netbsd.c --- a/tools/libxc/xc_netbsd.c Tue Jun 10 09:27:01 2008 +0100 +++ b/tools/libxc/xc_netbsd.c Tue Jun 10 10:49:17 2008 +0200 @@ -142,9 +142,13 @@ static int do_privcmd(int xc_handle, uns int do_xen_hypercall(int xc_handle, privcmd_hypercall_t *hypercall) { - return do_privcmd(xc_handle, + int error = do_privcmd(xc_handle, IOCTL_PRIVCMD_HYPERCALL, (unsigned long)hypercall); + if (error) + return error; + else + return (hypercall->retval); } #define EVTCHN_DEV_NAME "/dev/xenevt" --Boundary-00=_oJkTIHu9Wm0qcaj Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --Boundary-00=_oJkTIHu9Wm0qcaj--