static void print_nodes(const char *be_name, boolean_t dsets, boolean_t snaps, boolean_t parsable, be_node_list_t *be_nodes) { enum be_fmt be_fmt = BE_FMT_DEFAULT; if (dsets) be_fmt |= BE_FMT_DATASET; if (snaps) be_fmt |= BE_FMT_SNAPSHOT; if (be_fmt == BE_FMT_DEFAULT) print_be_nodes(be_name, parsable, be_nodes); else print_fmt_nodes(be_name, be_fmt, parsable, be_nodes); }
static void print_nodes(const char *be_name, boolean_t dsets, boolean_t snaps, boolean_t parsable, be_node_list_t *be_nodes) { struct hdr_info hdr; enum be_fmt be_fmt = BE_FMT_DEFAULT; if (dsets) be_fmt |= BE_FMT_DATASET; if (snaps) be_fmt |= BE_FMT_SNAPSHOT; if (!parsable) { init_hdr_cols(be_fmt, &hdr); count_widths(be_fmt, &hdr, be_nodes); print_hdr(&hdr); } if (be_fmt == BE_FMT_DEFAULT) print_be_nodes(be_name, parsable, &hdr, be_nodes); else print_fmt_nodes(be_name, be_fmt, parsable, &hdr, be_nodes); }