]> sourceware.org Git - lvm2.git/commitdiff
Add <report_type>_all to help text.
authorAlasdair Kergon <agk@redhat.com>
Sat, 10 Jan 2009 03:14:24 +0000 (03:14 +0000)
committerAlasdair Kergon <agk@redhat.com>
Sat, 10 Jan 2009 03:14:24 +0000 (03:14 +0000)
libdm/libdm-report.c

index 1be8ffc8710fdad00f820b452108479a6ea4d2a2..2f8c747025717fef26f3e2ae810fa2b36819e8e5 100644 (file)
@@ -254,6 +254,11 @@ static void _display_fields(struct dm_report *rh)
                if (strlen(rh->fields[f].id) > id_len)
                        id_len = strlen(rh->fields[f].id);
 
+
+       for (type = rh->types; type->data_fn; type++)
+               if (strlen(type->prefix) + 3 > id_len)
+                       id_len = strlen(type->prefix) + 3;
+
        for (f = 0; rh->fields[f].report_fn; f++) {
                if ((type = _find_type(rh, rh->fields[f].type)) && type->desc)
                        desc = type->desc;
@@ -266,6 +271,9 @@ static void _display_fields(struct dm_report *rh)
                        log_warn("%*.*s", (int) strlen(desc) + 7,
                                 (int) strlen(desc) + 7,
                                 "-------------------------------------------------------------------------------");
+                       log_warn("  %sall%-*s - %s", type->prefix,
+                                (int) (id_len - 3 - strlen(type->prefix)), "",
+                                "All fields in this section.");
                }
 
                /* FIXME Add line-wrapping at terminal width (or 80 cols) */
This page took 0.041801 seconds and 5 git commands to generate.