diff options
author | michael <michael@3ae390bd-cb1e-0410-b409-cd5a39f66f1f> | 2009-01-13 04:21:29 +0000 |
---|---|---|
committer | michael <michael@3ae390bd-cb1e-0410-b409-cd5a39f66f1f> | 2009-01-13 04:21:29 +0000 |
commit | 0ea11560054c5b0bde4c158a91460d6ffce32c32 (patch) | |
tree | 28507c36db9d5331fba9011a03afe4d64985a239 /drv_serdisplib.c | |
parent | d77a54f74c2eeeae99ec340c32ca7a0f2cb9e2ef (diff) | |
download | lcd4linux-0ea11560054c5b0bde4c158a91460d6ffce32c32.tar.gz |
list sub-drivers for serdisplib without -v
git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@958 3ae390bd-cb1e-0410-b409-cd5a39f66f1f
Diffstat (limited to 'drv_serdisplib.c')
-rw-r--r-- | drv_serdisplib.c | 43 |
1 files changed, 24 insertions, 19 deletions
diff --git a/drv_serdisplib.c b/drv_serdisplib.c index b04c48b..d4b5542 100644 --- a/drv_serdisplib.c +++ b/drv_serdisplib.c @@ -290,27 +290,32 @@ static void plugin_rotate(RESULT * result, RESULT * arg1) int drv_SD_list(void) { serdisp_display_t displaydesc; - long version; - if (verbose_level > 0) { - version = serdisp_getversioncode(); - printf(" linked version %i.%i (compiled with header %i.%i), supported displays:\n", - SERDISP_VERSION_GET_MAJOR(version), SERDISP_VERSION_GET_MINOR(version), - SERDISP_VERSION_MAJOR, SERDISP_VERSION_MINOR); - - displaydesc.dispname = ""; - printf(" display name alias names description\n"); - printf(" --------------- -------------------- -----------------------------------\n"); - while (serdisp_nextdisplaydescription(&displaydesc)) { - printf(" %-15s %-20s %-35s\n", displaydesc.dispname, displaydesc.aliasnames, displaydesc.description); - } + displaydesc.dispname = ""; + while (serdisp_nextdisplaydescription(&displaydesc)) { + printf("%s ", displaydesc.dispname); + } - } else { - displaydesc.dispname = ""; - while (serdisp_nextdisplaydescription(&displaydesc)) { - printf("%s ", displaydesc.dispname); - } - printf("\n (use -vl to see detailed list of serdisplib)"); + return 0; +} + + +/* verbosely list models (special case for serdisplib) */ +int drv_SD_list_verbose(void) +{ + serdisp_display_t displaydesc; + long version; + + version = serdisp_getversioncode(); + printf("%s: header version %d.%d, library version %d.%d, available sub-drivers:\n\n", Name, + SERDISP_VERSION_MAJOR, SERDISP_VERSION_MINOR, + SERDISP_VERSION_GET_MAJOR(version), SERDISP_VERSION_GET_MINOR(version)); + + printf("display name alias names description\n"); + printf("------------------ -------------------- -----------------------------------\n"); + displaydesc.dispname = ""; + while (serdisp_nextdisplaydescription(&displaydesc)) { + printf(" %-15s %-20s %-35s\n", displaydesc.dispname, displaydesc.aliasnames, displaydesc.description); } return 0; |