From fc8607a171d0af3335fe17541124c7bc46c3b6a0 Mon Sep 17 00:00:00 2001 From: avg Date: Tue, 17 Nov 2015 15:18:52 +0000 Subject: [PATCH] MFC r290452: zfsboottest: catch up with r241289, call zfs_spa_init() for all found pools git-svn-id: svn://svn.freebsd.org/base/stable/10@290986 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f --- tools/tools/zfsboottest/zfsboottest.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/tools/tools/zfsboottest/zfsboottest.c b/tools/tools/zfsboottest/zfsboottest.c index 29e9a485b..45715d962 100644 --- a/tools/tools/zfsboottest/zfsboottest.c +++ b/tools/tools/zfsboottest/zfsboottest.c @@ -136,19 +136,21 @@ main(int argc, char** argv) } } + STAILQ_FOREACH(spa, &zfs_pools, spa_link) { + if (zfs_spa_init(spa)) { + fprintf(stderr, "can't init pool %s\n", spa->spa_name); + exit(1); + } + } + + spa_all_status(); + spa = STAILQ_FIRST(&zfs_pools); if (spa == NULL) { fprintf(stderr, "no pools\n"); exit(1); } - if (zfs_spa_init(spa)) { - fprintf(stderr, "can't init pool\n"); - exit(1); - } - - spa_all_status(); - #if 0 uint64_t rootobj; if (zfs_get_root(spa, &rootobj)) { -- 2.45.0