direct-io.hg

view xen/acm/acm_null_hooks.c @ 5517:10e9028c8e3d

bitkeeper revision 1.1718.1.10 (42b7b19aqOS_1M8I4pIOFjiTPYWV-g)

Merge bk://xenbits.xensource.com/xen-unstable.bk
into spot.cl.cam.ac.uk:C:/Documents and Settings/iap10/xen-unstable.bk
author iap10@spot.cl.cam.ac.uk
date Tue Jun 21 06:20:10 2005 +0000 (2005-06-21)
parents aa52b853c28b
children 649cd37aa1ab
line source
1 /****************************************************************
2 * acm_null_hooks.c
3 *
4 * Copyright (C) 2005 IBM Corporation
5 *
6 * Author:
7 * Reiner Sailer <sailer@watson.ibm.com>
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 */
14 #include <acm/acm_hooks.h>
16 static int
17 null_init_domain_ssid(void **chwall_ssid, ssidref_t ssidref)
18 {
19 return ACM_OK;
20 }
23 static void
24 null_free_domain_ssid(void *chwall_ssid)
25 {
26 return;
27 }
30 static int
31 null_dump_binary_policy(u8 *buf, u16 buf_size)
32 {
33 return 0;
34 }
38 static int
39 null_set_binary_policy(u8 *buf, u16 buf_size)
40 {
41 return -1;
42 }
45 static int
46 null_dump_stats(u8 *buf, u16 buf_size)
47 {
48 /* no stats for NULL policy */
49 return 0;
50 }
53 /* now define the hook structure similarly to LSM */
54 struct acm_operations acm_null_ops = {
55 .init_domain_ssid = null_init_domain_ssid,
56 .free_domain_ssid = null_free_domain_ssid,
57 .dump_binary_policy = null_dump_binary_policy,
58 .set_binary_policy = null_set_binary_policy,
59 .dump_statistics = null_dump_stats,
60 /* domain management control hooks */
61 .pre_domain_create = NULL,
62 .post_domain_create = NULL,
63 .fail_domain_create = NULL,
64 .post_domain_destroy = NULL,
65 /* event channel control hooks */
66 .pre_eventchannel_unbound = NULL,
67 .fail_eventchannel_unbound = NULL,
68 .pre_eventchannel_interdomain = NULL,
69 .fail_eventchannel_interdomain = NULL,
70 /* grant table control hooks */
71 .pre_grant_map_ref = NULL,
72 .fail_grant_map_ref = NULL,
73 .pre_grant_setup = NULL,
74 .fail_grant_setup = NULL
76 };