]> xenbits.xensource.com Git - people/liuw/freebsd.git/commitdiff
zfsboottest: catch up with r241289, call zfs_spa_init() for all found pools
authoravg <avg@FreeBSD.org>
Fri, 6 Nov 2015 16:27:22 +0000 (16:27 +0000)
committeravg <avg@FreeBSD.org>
Fri, 6 Nov 2015 16:27:22 +0000 (16:27 +0000)
MFC after: 8 days

tools/tools/zfsboottest/zfsboottest.c

index 29e9a485ba2022467d18b48672a0c23b8ada566f..45715d9624cdb7c4e2259879a3013929e099a730 100644 (file)
@@ -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)) {