* Dump the blocks for the object specified by path inside the dataset. */
| 4558 | * Dump the blocks for the object specified by path inside the dataset. |
| 4559 | */ |
| 4560 | static int |
| 4561 | dump_path(char *ds, char *path) |
| 4562 | { |
| 4563 | int err; |
| 4564 | objset_t *os; |
| 4565 | uint64_t root_obj; |
| 4566 | |
| 4567 | err = open_objset(ds, FTAG, &os); |
| 4568 | if (err != 0) |
| 4569 | return (err); |
| 4570 | |
| 4571 | err = zap_lookup(os, MASTER_NODE_OBJ, ZFS_ROOT_OBJ, 8, 1, &root_obj); |
| 4572 | if (err != 0) { |
| 4573 | (void) fprintf(stderr, "can't lookup root znode: %s\n", |
| 4574 | strerror(err)); |
| 4575 | close_objset(os, FTAG); |
| 4576 | return (EINVAL); |
| 4577 | } |
| 4578 | |
| 4579 | (void) snprintf(curpath, sizeof (curpath), "dataset=%s path=/", ds); |
| 4580 | |
| 4581 | err = dump_path_impl(os, root_obj, path); |
| 4582 | |
| 4583 | close_objset(os, FTAG); |
| 4584 | return (err); |
| 4585 | } |
| 4586 | |
| 4587 | static int |
| 4588 | dump_label(const char *dev) |
no test coverage detected