Update to 3.4-final.
[linux-flexiantxendom0-3.2.10.git] / drivers / xen / core / xen_proc.c
1 #include <linux/init.h>
2 #include <linux/proc_fs.h>
3 #include <xen/xen_proc.h>
4
5 static struct proc_dir_entry *xen_base;
6
7 struct proc_dir_entry *
8 #ifndef MODULE
9 __init
10 #endif
11 create_xen_proc_entry(const char *name, mode_t mode)
12 {
13         if ( xen_base == NULL )
14                 if ( (xen_base = proc_mkdir("xen", NULL)) == NULL )
15                         panic("Couldn't create /proc/xen");
16         return create_proc_entry(name, mode, xen_base);
17 }
18
19 #ifdef MODULE
20 #include <linux/export.h>
21
22 EXPORT_SYMBOL_GPL(create_xen_proc_entry); 
23 #elif defined(CONFIG_XEN_PRIVILEGED_GUEST)
24
25 void remove_xen_proc_entry(const char *name)
26 {
27         remove_proc_entry(name, xen_base);
28 }
29
30 #endif