mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2025-01-11 17:04:19 +01:00
zfsboottest: update for the recent zfs boot code changes
MFC after: 1 month
This commit is contained in:
parent
99a312d048
commit
e795314880
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=235392
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user