diff options
author | pjd <pjd@FreeBSD.org> | 2008-05-18 21:13:10 +0000 |
---|---|---|
committer | pjd <pjd@FreeBSD.org> | 2008-05-18 21:13:10 +0000 |
commit | 21a0be64c72c8e35591343d05198ebbe9c47bfd6 (patch) | |
tree | 629471855623088a468faa7638a69aeb40206b90 /sys/geom | |
parent | a1af6d977bb920efdae391bf7af304a535058d10 (diff) | |
download | FreeBSD-src-21a0be64c72c8e35591343d05198ebbe9c47bfd6.zip FreeBSD-src-21a0be64c72c8e35591343d05198ebbe9c47bfd6.tar.gz |
Play nice with DDB pager.
Educated by: jhb's BSDCan presentation
Diffstat (limited to 'sys/geom')
-rw-r--r-- | sys/geom/geom_subr.c | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/sys/geom/geom_subr.c b/sys/geom/geom_subr.c index 6e4b7ed..cd909c4 100644 --- a/sys/geom/geom_subr.c +++ b/sys/geom/geom_subr.c @@ -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)) { |