summaryrefslogtreecommitdiffstats
path: root/sbin
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2004-03-09 21:14:18 +0000
committerjhb <jhb@FreeBSD.org>2004-03-09 21:14:18 +0000
commit01eed200f9b25d08b4ae9b5874d39be1a37f3892 (patch)
tree45a17666da361110ed6b38ab170140d6c5fc1163 /sbin
parentdc5da5f8f75ca8ec7e297bce764c536f278339ce (diff)
downloadFreeBSD-src-01eed200f9b25d08b4ae9b5874d39be1a37f3892.zip
FreeBSD-src-01eed200f9b25d08b4ae9b5874d39be1a37f3892.tar.gz
Make libgeom usable by C++ programs:
- Add DECL wrappers to libgeom.h. - Rename structure members in libgeom.h to use a lg_ prefix for member names. This is required because a few structures had members named 'class' which made g++ very unhappy. - Catch gstat(8) and gconcat(8) up to these API changes. Reviewed by: phk
Diffstat (limited to 'sbin')
-rw-r--r--sbin/gconcat/gconcat.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/sbin/gconcat/gconcat.c b/sbin/gconcat/gconcat.c
index 75c55df..c8a5ca7 100644
--- a/sbin/gconcat/gconcat.c
+++ b/sbin/gconcat/gconcat.c
@@ -379,8 +379,8 @@ find_class(struct gmesh *mesh, const char *name)
{
struct gclass *class;
- LIST_FOREACH(class, &mesh->class, class) {
- if (strcmp(class->name, name) == 0)
+ LIST_FOREACH(class, &mesh->lg_class, lg_class) {
+ if (strcmp(class->lg_name, name) == 0)
return (class);
}
@@ -392,9 +392,9 @@ get_conf(struct ggeom *gp, const char *name)
{
struct gconfig *conf;
- LIST_FOREACH(conf, &gp->config, config) {
- if (strcmp(conf->name, name) == 0)
- return (conf->val);
+ LIST_FOREACH(conf, &gp->lg_config, lg_config) {
+ if (strcmp(conf->lg_name, name) == 0)
+ return (conf->lg_val);
}
return (NULL);
@@ -406,19 +406,19 @@ show_config(struct ggeom *gp)
struct gprovider *pp;
struct gconsumer *cp;
- pp = LIST_FIRST(&gp->provider);
+ pp = LIST_FIRST(&gp->lg_provider);
if (pp == NULL)
return;
- printf(" NAME: %s\n", pp->name);
+ printf(" NAME: %s\n", pp->lg_name);
printf(" id: %s\n", get_conf(gp, "id"));
printf(" type: %s\n", get_conf(gp, "type"));
- printf(" mediasize: %jd\n", pp->mediasize);
- printf("sectorsize: %u\n", pp->sectorsize);
- printf(" mode: %s\n", pp->mode);
+ printf(" mediasize: %jd\n", pp->lg_mediasize);
+ printf("sectorsize: %u\n", pp->lg_sectorsize);
+ printf(" mode: %s\n", pp->lg_mode);
printf(" providers:");
- LIST_FOREACH(cp, &gp->consumer, consumer) {
- printf(" %s", cp->provider->name);
+ LIST_FOREACH(cp, &gp->lg_consumer, lg_consumer) {
+ printf(" %s", cp->lg_provider->lg_name);
}
printf("\n");
}
@@ -441,7 +441,7 @@ concat_list(void)
exit(EXIT_SUCCESS);
}
- LIST_FOREACH(gp, &class->geom, geom) {
+ LIST_FOREACH(gp, &class->lg_geom, lg_geom) {
show_config(gp);
}
OpenPOWER on IntegriCloud