Play nice with DDB pager.

Educated by:	jhb's BSDCan presentation
This commit is contained in:
pjd 2008-05-18 21:13:10 +00:00
parent a1af6d977b
commit 21a0be64c7

View File

@ -1156,8 +1156,11 @@ db_show_geom_provider(int indent, struct g_provider *pp)
printf("\n");
}
if (!LIST_EMPTY(&pp->consumers)) {
LIST_FOREACH(cp, &pp->consumers, consumers)
LIST_FOREACH(cp, &pp->consumers, consumers) {
db_show_geom_consumer(indent + 2, cp);
if (db_pager_quit)
break;
}
}
}
@ -1188,12 +1191,18 @@ db_show_geom_geom(int indent, struct g_geom *gp)
printf("\n");
}
if (!LIST_EMPTY(&gp->provider)) {
LIST_FOREACH(pp, &gp->provider, provider)
LIST_FOREACH(pp, &gp->provider, provider) {
db_show_geom_provider(indent + 2, pp);
if (db_pager_quit)
break;
}
}
if (!LIST_EMPTY(&gp->consumer)) {
LIST_FOREACH(cp, &gp->consumer, consumer)
LIST_FOREACH(cp, &gp->consumer, consumer) {
db_show_geom_consumer(indent + 2, cp);
if (db_pager_quit)
break;
}
}
}
@ -1203,8 +1212,11 @@ db_show_geom_class(struct g_class *mp)
struct g_geom *gp;
printf("class: %s (%p)\n", mp->name, mp);
LIST_FOREACH(gp, &mp->geom, geom)
LIST_FOREACH(gp, &mp->geom, geom) {
db_show_geom_geom(2, gp);
if (db_pager_quit)
break;
}
}
/*
@ -1219,6 +1231,8 @@ DB_SHOW_COMMAND(geom, db_show_geom)
LIST_FOREACH(mp, &g_classes, class) {
db_show_geom_class(mp);
printf("\n");
if (db_pager_quit)
break;
}
} else {
switch (g_valid_obj((void *)addr)) {