diff options
author | phk <phk@FreeBSD.org> | 2002-10-20 18:09:01 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2002-10-20 18:09:01 +0000 |
commit | 78bcfbf6c016f6dce82220e21ede3e9db4130db7 (patch) | |
tree | 2c5d7e5c81882bb5326cefc64584ba24130a927b | |
parent | 8c6133e9a5f1c002e2bd81d6e09a594eacafd0c3 (diff) | |
download | FreeBSD-src-78bcfbf6c016f6dce82220e21ede3e9db4130db7.zip FreeBSD-src-78bcfbf6c016f6dce82220e21ede3e9db4130db7.tar.gz |
Include fwsectors and gfwheads in the XML output for the disks we know.
Sponsored by: DARPA & NAI Labs.
-rw-r--r-- | sys/geom/geom_disk.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/sys/geom/geom_disk.c b/sys/geom/geom_disk.c index ae1bc0e..bee654c 100644 --- a/sys/geom/geom_disk.c +++ b/sys/geom/geom_disk.c @@ -206,6 +206,20 @@ g_disk_start(struct bio *bp) } static void +g_disk_dumpconf(struct sbuf *sb, char *indent, struct g_geom *gp, struct g_consumer *cp, struct g_provider *pp) +{ + struct disk *dp; + + dp = gp->softc; + if (gp != NULL && (pp == NULL && cp == NULL)) { + sbuf_printf(sb, "%s<fwheads>%u</fwheads>\n", + indent, dp->d_fwheads); + sbuf_printf(sb, "%s<fwsectors>%u</fwsectors>\n", + indent, dp->d_fwsectors); + } +} + +static void g_disk_create(void *arg) { struct g_geom *gp; @@ -218,6 +232,7 @@ g_disk_create(void *arg) gp->start = g_disk_start; gp->access = g_disk_access; gp->softc = dev->si_disk; + gp->dumpconf = g_disk_dumpconf; dev->si_disk->d_softc = gp; pp = g_new_providerf(gp, "%s", gp->name); g_error_provider(pp, 0); |