diff options
author | avg <avg@FreeBSD.org> | 2013-07-09 08:29:14 +0000 |
---|---|---|
committer | avg <avg@FreeBSD.org> | 2013-07-09 08:29:14 +0000 |
commit | 1df29cf582471cb617ef2b53eb8d17174f0ba9d9 (patch) | |
tree | a2dc4db3f6120ee1b33d84e5ab0690bf94fcf073 /tools | |
parent | feae44327ca69ecd4b597a80db2ce822a7366c34 (diff) | |
download | FreeBSD-src-1df29cf582471cb617ef2b53eb8d17174f0ba9d9.zip FreeBSD-src-1df29cf582471cb617ef2b53eb8d17174f0ba9d9.tar.gz |
zfsboottest: sync with changes in zfs boot code
- spa status can not be called before spa init
- libzfs.h inclusion is now required
- fix alternative code for explicit root dataset lookup
MFC after: 10 days
Diffstat (limited to 'tools')
-rw-r--r-- | tools/tools/zfsboottest/zfsboottest.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/tools/tools/zfsboottest/zfsboottest.c b/tools/tools/zfsboottest/zfsboottest.c index 3058046..29e9a48 100644 --- a/tools/tools/zfsboottest/zfsboottest.c +++ b/tools/tools/zfsboottest/zfsboottest.c @@ -52,6 +52,7 @@ pager_output(const char *line) #define ZFS_TEST #define printf(...) fprintf(stderr, __VA_ARGS__) +#include "libzfs.h" #include "zfsimpl.c" #undef printf @@ -134,7 +135,6 @@ main(int argc, char** argv) close(fd[i - 1]); } } - spa_all_status(); spa = STAILQ_FIRST(&zfs_pools); if (spa == NULL) { @@ -147,7 +147,10 @@ main(int argc, char** argv) exit(1); } + spa_all_status(); + #if 0 + uint64_t rootobj; if (zfs_get_root(spa, &rootobj)) { fprintf(stderr, "can't get root\n"); exit(1); @@ -158,8 +161,8 @@ main(int argc, char** argv) if (zfs_mount(spa, 0, &zfsmnt)) { fprintf(stderr, "can't mount\n"); exit(1); - } #endif + } printf("\n"); for (++i, failures = 0; i < argc; i++) { |