Skip to content

Commit c944c46

Browse files
robnbehlendorf
authored andcommitted
zfs_main: fix alignment on props usage output
I guess we've got some long property names since this was first set up! Sponsored-by: https://despairlabs.com/sponsor/ Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Tony Hutter <[email protected]> Reviewed-by: Alexander Motin <[email protected]> Reviewed-by: George Melikov <[email protected]> Signed-off-by: Rob Norris <[email protected]> Closes openzfs#16883
1 parent 166a7bc commit c944c46

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

cmd/zfs/zfs_main.c

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -500,7 +500,7 @@ usage_prop_cb(int prop, void *cb)
500500
{
501501
FILE *fp = cb;
502502

503-
(void) fprintf(fp, "\t%-15s ", zfs_prop_to_name(prop));
503+
(void) fprintf(fp, "\t%-22s ", zfs_prop_to_name(prop));
504504

505505
if (zfs_prop_readonly(prop))
506506
(void) fprintf(fp, " NO ");
@@ -561,40 +561,40 @@ usage(boolean_t requested)
561561
(void) fprintf(fp, "%s",
562562
gettext("\nThe following properties are supported:\n"));
563563

564-
(void) fprintf(fp, "\n\t%-14s %s %s %s\n\n",
564+
(void) fprintf(fp, "\n\t%-21s %s %s %s\n\n",
565565
"PROPERTY", "EDIT", "INHERIT", "VALUES");
566566

567567
/* Iterate over all properties */
568568
(void) zprop_iter(usage_prop_cb, fp, B_FALSE, B_TRUE,
569569
ZFS_TYPE_DATASET);
570570

571-
(void) fprintf(fp, "\t%-15s ", "userused@...");
571+
(void) fprintf(fp, "\t%-22s ", "userused@...");
572572
(void) fprintf(fp, " NO NO <size>\n");
573-
(void) fprintf(fp, "\t%-15s ", "groupused@...");
573+
(void) fprintf(fp, "\t%-22s ", "groupused@...");
574574
(void) fprintf(fp, " NO NO <size>\n");
575-
(void) fprintf(fp, "\t%-15s ", "projectused@...");
575+
(void) fprintf(fp, "\t%-22s ", "projectused@...");
576576
(void) fprintf(fp, " NO NO <size>\n");
577-
(void) fprintf(fp, "\t%-15s ", "userobjused@...");
577+
(void) fprintf(fp, "\t%-22s ", "userobjused@...");
578578
(void) fprintf(fp, " NO NO <size>\n");
579-
(void) fprintf(fp, "\t%-15s ", "groupobjused@...");
579+
(void) fprintf(fp, "\t%-22s ", "groupobjused@...");
580580
(void) fprintf(fp, " NO NO <size>\n");
581-
(void) fprintf(fp, "\t%-15s ", "projectobjused@...");
581+
(void) fprintf(fp, "\t%-22s ", "projectobjused@...");
582582
(void) fprintf(fp, " NO NO <size>\n");
583-
(void) fprintf(fp, "\t%-15s ", "userquota@...");
583+
(void) fprintf(fp, "\t%-22s ", "userquota@...");
584584
(void) fprintf(fp, "YES NO <size> | none\n");
585-
(void) fprintf(fp, "\t%-15s ", "groupquota@...");
585+
(void) fprintf(fp, "\t%-22s ", "groupquota@...");
586586
(void) fprintf(fp, "YES NO <size> | none\n");
587-
(void) fprintf(fp, "\t%-15s ", "projectquota@...");
587+
(void) fprintf(fp, "\t%-22s ", "projectquota@...");
588588
(void) fprintf(fp, "YES NO <size> | none\n");
589-
(void) fprintf(fp, "\t%-15s ", "userobjquota@...");
589+
(void) fprintf(fp, "\t%-22s ", "userobjquota@...");
590590
(void) fprintf(fp, "YES NO <size> | none\n");
591-
(void) fprintf(fp, "\t%-15s ", "groupobjquota@...");
591+
(void) fprintf(fp, "\t%-22s ", "groupobjquota@...");
592592
(void) fprintf(fp, "YES NO <size> | none\n");
593-
(void) fprintf(fp, "\t%-15s ", "projectobjquota@...");
593+
(void) fprintf(fp, "\t%-22s ", "projectobjquota@...");
594594
(void) fprintf(fp, "YES NO <size> | none\n");
595-
(void) fprintf(fp, "\t%-15s ", "written@<snap>");
595+
(void) fprintf(fp, "\t%-22s ", "written@<snap>");
596596
(void) fprintf(fp, " NO NO <size>\n");
597-
(void) fprintf(fp, "\t%-15s ", "written#<bookmark>");
597+
(void) fprintf(fp, "\t%-22s ", "written#<bookmark>");
598598
(void) fprintf(fp, " NO NO <size>\n");
599599

600600
(void) fprintf(fp, gettext("\nSizes are specified in bytes "

0 commit comments

Comments
 (0)