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>
28 #include <copperplate/init.h>
32 #ifdef CONFIG_XENO_REGISTRY
34 struct registry_operations {
35 int (*open)(
struct fsobj *fsobj,
void *priv);
36 int (*release)(
struct fsobj *fsobj,
void *priv);
37 ssize_t (*read)(
struct fsobj *fsobj,
38 char *buf,
size_t size, off_t offset,
40 ssize_t (*write)(
struct fsobj *fsobj,
41 const char *buf,
size_t size, off_t offset,
53 struct regfs_dir *dir;
54 struct timespec ctime;
55 struct timespec mtime;
56 const struct registry_operations *ops;
58 struct pvhashobj hobj;
65 int registry_add_dir(
const char *fmt, ...);
67 int registry_init_file(
struct fsobj *fsobj,
68 const struct registry_operations *ops,
71 int registry_add_file(
struct fsobj *fsobj,
73 const char *fmt, ...);
75 void registry_destroy_file(
struct fsobj *fsobj);
77 void registry_touch_file(
struct fsobj *fsobj);
79 int __registry_pkg_init(
const char *arg0,
char *mountpt,
int shared_registry);
81 int registry_pkg_init(
const char *arg0);
83 void registry_pkg_destroy(
void);
94 struct registry_operations {
98 int registry_add_dir(
const char *fmt, ...)
104 void registry_init_file(
struct fsobj *fsobj,
105 const struct registry_operations *ops,
111 int registry_add_file(
struct fsobj *fsobj,
113 const char *fmt, ...)
119 void registry_destroy_file(
struct fsobj *fsobj)
124 void registry_touch_file(
struct fsobj *fsobj)
129 int __registry_pkg_init(
const char *arg0,
char *mountpt,
int shared_registry)
135 int registry_pkg_init(
const char *arg0)
141 void registry_pkg_destroy(
void)