diff options
author | Gerd Hoffmann <kraxel@redhat.com> | 2017-04-24 10:48:14 +0200 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2017-04-24 10:48:14 +0200 |
commit | a45855472178e478c4cca77458542f1beec666dd (patch) | |
tree | fd6d24671edc9a796a2e19990d04e1bc434f2ebb /drmtools.c | |
parent | 7e510e53fe4c715d1a3630910136bfded41fbfbd (diff) | |
download | drminfo-a45855472178e478c4cca77458542f1beec666dd.tar.gz |
more list format tweaks
Diffstat (limited to 'drmtools.c')
-rw-r--r-- | drmtools.c | 28 |
1 files changed, 22 insertions, 6 deletions
@@ -513,13 +513,29 @@ done: } void drm_print_format(FILE *fp, const struct fbformat *fmt, - const char *pre, const char *post) + int indent, bool libs) { - fprintf(fp, "%s%-8s: [%2d:0] %-14s %-11s %-24s%s\n", - pre, + fprintf(fp, "%*s%-8s: [%2d:0] %-14s %-11s %-16s", + indent, "", fmt->name, fmt->bpp - 1, fmt->fields, fmt->bits, fmt->fourcc - ? "fourcc (addfb2), le" - : "legacy (addfb), cpu " LE_BE("(le)", "(be)"), - post); + ? "fourcc le" + : "legacy cpu " LE_BE("(le)", "(be)")); + if (libs) { + fprintf(fp, " %s", + (fmt->cairo == CAIRO_FORMAT_INVALID) ? "" : "cairo"); + } + fprintf(fp, "\n"); +} + +void drm_print_format_hdr(FILE *fp, int indent, bool libs) +{ + fprintf(fp, "%*s%-8s: %-6s %-14s %-11s %-16s", + indent, "", + "name", "bpp", "fields", "bits", + "type endian"); + if (libs) { + fprintf(fp, " libs"); + } + fprintf(fp, "\n"); } |