direct-io.hg

view tools/libxc/xc_acm.c @ 12988:e080700efa56

[TOOLS] Fix the build. Clearly demarcate PPC-specific stuff.
Signed-off-by: Keir Fraser <keir@xensource.com>
author kfraser@localhost.localdomain
date Wed Dec 13 10:23:53 2006 +0000 (2006-12-13)
parents 58f28e00001e
children 96915ca8d5f2
line source
1 /******************************************************************************
2 * xc_acm.c
3 *
4 * Copyright (C) 2005, 2006 IBM Corporation, R Sailer
5 *
6 * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
7 * Use is subject to license terms.
8 *
9 * This program is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU General Public License as
11 * published by the Free Software Foundation, version 2 of the
12 * License.
13 */
15 #include "xc_private.h"
17 int xc_acm_op(int xc_handle, int cmd, void *arg, unsigned long arg_size)
18 {
19 int ret = -1;
20 DECLARE_HYPERCALL;
22 hypercall.op = __HYPERVISOR_acm_op;
23 hypercall.arg[0] = cmd;
24 hypercall.arg[1] = (unsigned long) arg;
26 if (lock_pages(arg, arg_size) != 0) {
27 PERROR("xc_acm_op: arg lock failed");
28 goto out;
29 }
30 ret = do_xen_hypercall(xc_handle, &hypercall);
31 unlock_pages(arg, arg_size);
32 out:
33 return ret;
34 }
36 /*
37 * Local variables:
38 * mode: C
39 * c-set-style: "BSD"
40 * c-basic-offset: 4
41 * tab-width: 4
42 * indent-tabs-mode: nil
43 * End:
44 */