19 #ifndef _COPPERPLATE_REGISTRY_H 20 #define _COPPERPLATE_REGISTRY_H 22 #include <sys/types.h> 25 #include <boilerplate/list.h> 26 #include <boilerplate/hash.h> 27 #include <boilerplate/obstack.h> 31 #define REGISTRY_SHARED 1 32 #define REGISTRY_ANON 2 34 #ifdef CONFIG_XENO_REGISTRY 36 struct registry_operations {
37 int (*open)(
struct fsobj *fsobj,
void *priv);
38 int (*release)(
struct fsobj *fsobj,
void *priv);
39 ssize_t (*read)(
struct fsobj *fsobj,
40 char *buf,
size_t size, off_t offset,
42 ssize_t (*write)(
struct fsobj *fsobj,
43 const char *buf,
size_t size, off_t offset,
55 struct regfs_dir *dir;
56 struct timespec ctime;
57 struct timespec mtime;
58 const struct registry_operations *ops;
60 struct pvhashobj hobj;
67 int registry_add_dir(
const char *fmt, ...);
69 int registry_init_file(
struct fsobj *fsobj,
70 const struct registry_operations *ops,
73 int registry_add_file(
struct fsobj *fsobj,
75 const char *fmt, ...);
77 void registry_destroy_file(
struct fsobj *fsobj);
79 void registry_touch_file(
struct fsobj *fsobj);
81 int __registry_pkg_init(
const char *arg0,
85 int registry_pkg_init(
const char *arg0,
88 void registry_pkg_destroy(
void);
99 struct registry_operations {
103 int registry_add_dir(
const char *fmt, ...)
109 void registry_init_file(
struct fsobj *fsobj,
110 const struct registry_operations *ops,
116 int registry_add_file(
struct fsobj *fsobj,
118 const char *fmt, ...)
124 void registry_destroy_file(
struct fsobj *fsobj)
129 void registry_touch_file(
struct fsobj *fsobj)
134 int __registry_pkg_init(
const char *arg0,
135 char *mountpt,
int flags)
141 int registry_pkg_init(
const char *arg0,
148 void registry_pkg_destroy(
void)