> +
> + check_sa_attr_table(os);
> + err = zap_lookup(os, MASTER_NODE_OBJ, ZFS_ROOT_OBJ, 8, 1, &root_obj);
> + if (err != 0) {
> + fprintf(stderr, "Can't lookup root znode: %s\n", strerror(err));
> + dmu_objset_disown(os, FTAG);
> + return (EINVAL);
> + }
> + err = dump_specific_directory(os, root_obj, argv[1] + 1);
> + dmu_objset_disown(os, FTAG);
> + sa_attr_table = NULL;
> + return (err);
> +}
> +
> +static enum dmu_object_type
> +objtype_from_string(char *objtype_str)
Ah, I see the flexibility here for adding other object types. But the names
here are pretty hard to type. What would you think about hard-coding the
mapping from "input" names (something simple like "file" or "directory") to
dmu_object_type_t? Or you could add a new field to dmu_object_type_info_t, but
that might be overkill.
---
Reply to this email directly or view it on GitHub:
https://github.com/openzfs/openzfs/pull/29/files#r43468776
_______________________________________________
developer mailing list
[email protected]
http://lists.open-zfs.org/mailman/listinfo/developer