direct-io.hg

view tools/libxc/xc_acm.c @ 12485:58f28e00001e

[LIBXC] Replace API uses of size_t with ulong.

Avoids possibility of different FILE_OFFSET_BITS defn.
across the interface.

Signed-off-by: Keir Fraser <keir@xensource.com>
author kfraser@localhost.localdomain
date Fri Nov 17 14:00:45 2006 +0000 (2006-11-17)
parents e292f0df2d96
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 */