Lines Matching +full:max +full:- +full:cur

1 /*-
2 * SPDX-License-Identifier: BSD-2-Clause
104 /* -H flag handling; all delimiters/padding are a single tab */ in print_padding()
105 if (pc->script_fmt) { in print_padding()
111 colsz -= strlen(fval); in print_padding()
154 nvpair_t *cur; in print_snapshots() local
165 for (cur = nvlist_next_nvpair(props, NULL); cur != NULL; in print_snapshots()
166 cur = nvlist_next_nvpair(props, cur)) { in print_snapshots()
167 nvpair_value_nvlist(cur, &sprops); in print_snapshots()
168 print_info(nvpair_name(cur), sprops, pc); in print_snapshots()
186 printf("%*s%s", pc->current_indent, "", name); in print_info()
190 if (pc->current_indent == 0 && (pc->show_all_datasets || in print_info()
191 pc->show_snaps)) { in print_info()
197 * Whether we're dealing with -a or -s, we'll always print the in print_info()
198 * dataset name/information followed by its origin. For -s, we in print_info()
202 pc->current_indent += INDENT_INCREMENT; in print_info()
204 pc->current_indent += INDENT_INCREMENT; in print_info()
211 pc->current_indent -= INDENT_INCREMENT; in print_info()
212 if (pc->show_snaps) in print_info()
214 pc->current_indent = 0; in print_info()
217 print_padding(name, pc->be_colsz - pc->current_indent, pc); in print_info()
219 active_colsz = pc->active_colsz_def; in print_info()
223 active_colsz--; in print_info()
228 active_colsz--; in print_info()
233 active_colsz--; in print_info()
235 if (active_colsz == pc->active_colsz_def) { in print_info()
236 printf("-"); in print_info()
237 active_colsz--; in print_info()
242 print_padding(propstr, pc->mount_colsz, pc); in print_info()
244 printf("%s", "-"); in print_info()
245 print_padding("-", pc->mount_colsz, pc); in print_info()
252 * - The "used" property of the dataset in print_info()
253 * - The "used" property of the origin snapshot (not -a or -s) in print_info()
254 * - The "used" property of the origin dataset (-D flag only) in print_info()
256 * The -D flag is ignored if -a or -s are specified. in print_info()
260 if (!pc->show_all_datasets && !pc->show_snaps && in print_info()
265 if (pc->show_space && oname != NULL) in print_info()
271 print_padding(buf, pc->space_colsz, pc); in print_info()
273 printf("-"); in print_info()
274 print_padding("-", pc->space_colsz, pc); in print_info()
279 strftime(buf, BUFSZ, "%Y-%m-%d %H:%M", in print_info()
294 nvpair_t *cur; in print_headers() local
298 if (pc->show_all_datasets || pc->show_snaps) in print_headers()
304 for (cur = nvlist_next_nvpair(props, NULL); cur != NULL; in print_headers()
305 cur = nvlist_next_nvpair(props, cur)) { in print_headers()
306 be_maxcol = MAX(be_maxcol, strlen(nvpair_name(cur))); in print_headers()
307 nvpair_value_nvlist(cur, &dsprops); in print_headers()
310 mount_colsz = MAX(mount_colsz, strlen(propstr)); in print_headers()
311 if (!pc->show_all_datasets && !pc->show_snaps) in print_headers()
315 be_maxcol = MAX(be_maxcol, strlen(propstr) + INDENT_INCREMENT); in print_headers()
318 be_maxcol = MAX(be_maxcol, in print_headers()
322 pc->be_colsz = be_maxcol; in print_headers()
323 pc->active_colsz_def = strlen(HEADER_ACTIVE); in print_headers()
324 pc->mount_colsz = mount_colsz; in print_headers()
325 pc->space_colsz = strlen(HEADER_SPACE); in print_headers()
326 printf("%*s %s %*s %s %s\n", -pc->be_colsz, chosen_be_header, in print_headers()
327 HEADER_ACTIVE, -pc->mount_colsz, HEADER_MOUNT, HEADER_SPACE, HEADER_CREATED); in print_headers()
410 nvpair_t *cur; in bectl_cmd_list() local
421 while ((opt = getopt(argc, argv, "aDHsc:C:")) != -1) { in bectl_cmd_list()
448 fprintf(stderr, "bectl list: unknown option '-%c'\n", in bectl_cmd_list()
454 argc -= optind; in bectl_cmd_list()
477 /* Force -D off if either -a or -s are specified */ in bectl_cmd_list()
484 for (cur = nvlist_next_nvpair(props, NULL); cur != NULL; in bectl_cmd_list()
485 cur = nvlist_next_nvpair(props, cur)) { in bectl_cmd_list()
486 nvpair_value_nvlist(cur, &dsprops); in bectl_cmd_list()
491 print_info(nvpair_name(cur), dsprops, &pc); in bectl_cmd_list()