In message <20030708204649.GA19571_at_edgemaster.zombie.org>, Sean Kelly writes: >On Tue, Jul 08, 2003 at 10:35:47PM +0200, Poul-Henning Kamp wrote: >> >> Can you try this patch ? > >... >> diff -u -r1.28 geom_dump.c >> --- geom_dump.c 11 Jun 2003 06:49:15 -0000 1.28 >> +++ geom_dump.c 8 Jul 2003 20:00:45 -0000 >... >> _at__at_ -162,6 +164,8 _at__at_ >> sbuf_printf(sb, "\t <provider ref=\"%p\"/>\n", cp->provider); >> sbuf_printf(sb, "\t <mode>r%dw%de%d</mode>\n", >> cp->acr, cp->acw, cp->ace); >> + if (cp->geom->flags & G_GEOM_WITHER) >> + ; >> if (cp->geom->dumpconf != NULL) { >> sbuf_printf(sb, "\t <config>\n"); >... > >Should that be "else if ((cp->geom->dumpconf != NULL)"? I don't know the >code, but I'm basing this question off of what is below in the patch: Yes, an else is missing there. Corrected patch: Index: geom_dump.c =================================================================== RCS file: /home/ncvs/src/sys/geom/geom_dump.c,v retrieving revision 1.28 diff -u -r1.28 geom_dump.c --- geom_dump.c 11 Jun 2003 06:49:15 -0000 1.28 +++ geom_dump.c 8 Jul 2003 20:51:04 -0000 _at__at_ -114,6 +114,8 _at__at_ struct g_provider *pp; struct g_consumer *cp; + if (gp->flags & G_GEOM_WITHER) + return; LIST_FOREACH(pp, &gp->provider, provider) { sbuf_printf(sb, "%d %s %s %ju %u", level, gp->class->name, pp->name, (uintmax_t)pp->mediasize, pp->sectorsize); _at__at_ -162,7 +164,9 _at__at_ sbuf_printf(sb, "\t <provider ref=\"%p\"/>\n", cp->provider); sbuf_printf(sb, "\t <mode>r%dw%de%d</mode>\n", cp->acr, cp->acw, cp->ace); - if (cp->geom->dumpconf != NULL) { + if (cp->geom->flags & G_GEOM_WITHER) + ; + else if (cp->geom->dumpconf != NULL) { sbuf_printf(sb, "\t <config>\n"); cp->geom->dumpconf(sb, "\t ", cp->geom, cp, NULL); sbuf_printf(sb, "\t </config>\n"); _at__at_ -182,7 +186,9 _at__at_ sbuf_printf(sb, "\t <mediasize>%jd</mediasize>\n", (intmax_t)pp->mediasize); sbuf_printf(sb, "\t <sectorsize>%u</sectorsize>\n", pp->sectorsize); - if (pp->geom->dumpconf != NULL) { + if (pp->geom->flags & G_GEOM_WITHER) + ; + else if (pp->geom->dumpconf != NULL) { sbuf_printf(sb, "\t <config>\n"); pp->geom->dumpconf(sb, "\t ", pp->geom, NULL, pp); sbuf_printf(sb, "\t </config>\n"); _at__at_ -201,7 +207,9 _at__at_ sbuf_printf(sb, " <class ref=\"%p\"/>\n", gp->class); sbuf_printf(sb, " <name>%s</name>\n", gp->name); sbuf_printf(sb, " <rank>%d</rank>\n", gp->rank); - if (gp->dumpconf != NULL) { + if (gp->flags & G_GEOM_WITHER) + sbuf_printf(sb, " <wither/>\n"); + else if (gp->dumpconf != NULL) { sbuf_printf(sb, " <config>\n"); gp->dumpconf(sb, "\t", gp, NULL, NULL); sbuf_printf(sb, " </config>\n"); -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk_at_FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence.Received on Tue Jul 08 2003 - 11:51:26 UTC
This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:37:14 UTC