1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34#ifndef _XENBUS_PROBE_H
35#define _XENBUS_PROBE_H
36
37#define XEN_BUS_ID_SIZE 20
38
39struct xen_bus_type {
40 char *root;
41 unsigned int levels;
42 int (*get_bus_id)(char bus_id[XEN_BUS_ID_SIZE], const char *nodename);
43 int (*probe)(struct xen_bus_type *bus, const char *type,
44 const char *dir);
45 void (*otherend_changed)(struct xenbus_watch *watch, const char **vec,
46 unsigned int len);
47 struct bus_type bus;
48};
49
50enum xenstore_init {
51 XS_UNKNOWN,
52 XS_PV,
53 XS_HVM,
54 XS_LOCAL,
55};
56
57extern const struct attribute_group *xenbus_dev_groups[];
58
59extern int xenbus_match(struct device *_dev, struct device_driver *_drv);
60extern int xenbus_dev_probe(struct device *_dev);
61extern int xenbus_dev_remove(struct device *_dev);
62extern int xenbus_register_driver_common(struct xenbus_driver *drv,
63 struct xen_bus_type *bus,
64 struct module *owner,
65 const char *mod_name);
66extern int xenbus_probe_node(struct xen_bus_type *bus,
67 const char *type,
68 const char *nodename);
69extern int xenbus_probe_devices(struct xen_bus_type *bus);
70
71extern void xenbus_dev_changed(const char *node, struct xen_bus_type *bus);
72
73extern void xenbus_dev_shutdown(struct device *_dev);
74
75extern int xenbus_dev_suspend(struct device *dev);
76extern int xenbus_dev_resume(struct device *dev);
77extern int xenbus_dev_cancel(struct device *dev);
78
79extern void xenbus_otherend_changed(struct xenbus_watch *watch,
80 const char **vec, unsigned int len,
81 int ignore_on_shutdown);
82
83extern int xenbus_read_otherend_details(struct xenbus_device *xendev,
84 char *id_node, char *path_node);
85
86void xenbus_ring_ops_init(void);
87
88#endif
89