diff options
author | phk <phk@FreeBSD.org> | 2003-02-10 00:11:43 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2003-02-10 00:11:43 +0000 |
commit | a616f22441fef6592f8c15c7b6d9c2b733127d50 (patch) | |
tree | ce12f68dde1b28dc03420e53fde0b0fe4f219ef7 /lib/libgeom/libgeom.h | |
parent | 6bab19f3acd2ddd0981a4ba20a40208d410e7535 (diff) | |
download | FreeBSD-src-a616f22441fef6592f8c15c7b6d9c2b733127d50.zip FreeBSD-src-a616f22441fef6592f8c15c7b6d9c2b733127d50.tar.gz |
Leak more stuff into libgeom.
Diffstat (limited to 'lib/libgeom/libgeom.h')
-rw-r--r-- | lib/libgeom/libgeom.h | 83 |
1 files changed, 83 insertions, 0 deletions
diff --git a/lib/libgeom/libgeom.h b/lib/libgeom/libgeom.h index b1ee2bc..130ac36 100644 --- a/lib/libgeom/libgeom.h +++ b/lib/libgeom/libgeom.h @@ -31,6 +31,7 @@ #ifndef _LIBGEOM_H_ #define _LIBGEOM_H_ +#include <sys/queue.h> #include <sys/time.h> #include <geom/geom_stats.h> @@ -43,4 +44,86 @@ void geom_stats_snapshot_timestamp(void *arg, struct timespec *tp); void geom_stats_snapshot_reset(void *arg); struct g_stat *geom_stats_snapshot_next(void *arg); +char *geom_getxml(void); + +/* geom_xml2tree.c */ + +/* + * These structs are used to build the tree based on the XML. + * they're named as the kernel variant without the first '_'. + */ + +struct gclass; +struct ggeom; +struct gconsumer; +struct gprovider; + +LIST_HEAD(gconf, gconfig); + +struct gident { + void *id; + void *ptr; + enum { ISCLASS, + ISGEOM, + ISPROVIDER, + ISCONSUMER } what; +}; + +struct gmesh { + LIST_HEAD(, gclass) class; + struct gident *ident; +}; + +struct gconfig { + LIST_ENTRY(gconfig) config; + char *name; + char *val; +}; + +struct gclass { + void *id; + char *name; + LIST_ENTRY(gclass) class; + LIST_HEAD(, ggeom) geom; + struct gconf config; +}; + +struct ggeom { + void *id; + struct gclass *class; + char *name; + u_int rank; + LIST_ENTRY(ggeom) geom; + LIST_HEAD(, gconsumer) consumer; + LIST_HEAD(, gprovider) provider; + struct gconf config; +}; + +struct gconsumer { + void *id; + struct ggeom *geom; + LIST_ENTRY(gconsumer) consumer; + struct gprovider *provider; + LIST_ENTRY(gconsumer) consumers; + char *mode; + struct gconf config; +}; + +struct gprovider { + void *id; + char *name; + struct ggeom *geom; + LIST_ENTRY(gprovider) provider; + LIST_HEAD(, gconsumer) consumers; + char *mode; + off_t mediasize; + u_int sectorsize; + struct gconf config; +}; + +struct gident * geom_lookupid(struct gmesh *gmp, void *id); +int geom_xml2tree(struct gmesh *gmp, char *p); +int geom_gettree(struct gmesh *gmp); +void geom_deletetree(struct gmesh *gmp); + #endif /* _LIBGEOM_H_ */ |