Date: Sun, 13 May 2012 09:27:08 +0000 (UTC) From: Andriy Gapon <avg@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r235392 - head/tools/tools/zfsboottest Message-ID: <201205130927.q4D9R8jf075742@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: avg Date: Sun May 13 09:27:08 2012 New Revision: 235392 URL: http://svn.freebsd.org/changeset/base/235392 Log: zfsboottest: update for the recent zfs boot code changes MFC after: 1 month Modified: head/tools/tools/zfsboottest/zfsboottest.c Modified: head/tools/tools/zfsboottest/zfsboottest.c ============================================================================== --- head/tools/tools/zfsboottest/zfsboottest.c Sun May 13 09:25:39 2012 (r235391) +++ head/tools/tools/zfsboottest/zfsboottest.c Sun May 13 09:27:08 2012 (r235392) @@ -89,7 +89,11 @@ main(int argc, char** argv) char buf[512], hash[33]; MD5_CTX ctx; struct stat sb; + struct zfsmount zfsmnt; dnode_phys_t dn; +#if 0 + uint64_t rootobj; +#endif spa_t *spa; off_t off; ssize_t n; @@ -138,14 +142,28 @@ main(int argc, char** argv) exit(1); } - if (zfs_mount_pool(spa)) { - fprintf(stderr, "can't mount pool\n"); + if (zfs_spa_init(spa)) { + fprintf(stderr, "can't init pool\n"); exit(1); } +#if 0 + if (zfs_get_root(spa, &rootobj)) { + fprintf(stderr, "can't get root\n"); + exit(1); + } + + if (zfs_mount(spa, rootobj, &zfsmnt)) { +#else + if (zfs_mount(spa, 0, &zfsmnt)) { + fprintf(stderr, "can't mount\n"); + exit(1); + } +#endif + printf("\n"); for (++i, failures = 0; i < argc; i++) { - if (zfs_lookup(spa, argv[i], &dn)) { + if (zfs_lookup(&zfsmnt, argv[i], &dn)) { fprintf(stderr, "%s: can't lookup\n", argv[i]); failures++; continue;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201205130927.q4D9R8jf075742>