diff options
author | jhb <jhb@FreeBSD.org> | 2004-03-09 21:14:18 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2004-03-09 21:14:18 +0000 |
commit | 01eed200f9b25d08b4ae9b5874d39be1a37f3892 (patch) | |
tree | 45a17666da361110ed6b38ab170140d6c5fc1163 /usr.sbin/gstat | |
parent | dc5da5f8f75ca8ec7e297bce764c536f278339ce (diff) | |
download | FreeBSD-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 'usr.sbin/gstat')
-rw-r--r-- | usr.sbin/gstat/gstat.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/usr.sbin/gstat/gstat.c b/usr.sbin/gstat/gstat.c index b4565fb..4336e54 100644 --- a/usr.sbin/gstat/gstat.c +++ b/usr.sbin/gstat/gstat.c @@ -162,7 +162,8 @@ main(int argc, char **argv) } if (gid == NULL) continue; - if (gid != NULL && gid->what == ISCONSUMER && !flag_c) + if (gid != NULL && gid->lg_what == ISCONSUMER && + !flag_c) continue; if (gsp->sequence0 != gsp->sequence1) { printw("*\n"); @@ -213,15 +214,15 @@ main(int argc, char **argv) printw("|"); if (gid == NULL) { printw(" ??"); - } else if (gid->what == ISPROVIDER) { - pp = gid->ptr; - printw(" %s", pp->name); - } else if (gid->what == ISCONSUMER) { - cp = gid->ptr; + } else if (gid->lg_what == ISPROVIDER) { + pp = gid->lg_ptr; + printw(" %s", pp->lg_name); + } else if (gid->lg_what == ISCONSUMER) { + cp = gid->lg_ptr; printw(" %s/%s/%s", - cp->geom->class->name, - cp->geom->name, - cp->provider->name); + cp->lg_geom->lg_class->lg_name, + cp->lg_geom->lg_name, + cp->lg_provider->lg_name); } clrtoeol(); printw("\n"); |