aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormichael <michael@3ae390bd-cb1e-0410-b409-cd5a39f66f1f>2009-01-13 04:21:29 +0000
committermichael <michael@3ae390bd-cb1e-0410-b409-cd5a39f66f1f>2009-01-13 04:21:29 +0000
commit0ea11560054c5b0bde4c158a91460d6ffce32c32 (patch)
tree28507c36db9d5331fba9011a03afe4d64985a239
parentd77a54f74c2eeeae99ec340c32ca7a0f2cb9e2ef (diff)
downloadlcd4linux-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
-rw-r--r--drv.c10
-rw-r--r--drv_serdisplib.c43
-rw-r--r--lcd4linux.c2
3 files changed, 36 insertions, 19 deletions
diff --git a/drv.c b/drv.c
index 1682e3d..547b464 100644
--- a/drv.c
+++ b/drv.c
@@ -215,6 +215,10 @@ DRIVER *Driver[] = {
static DRIVER *Drv = NULL;
+/* maybe we need this */
+extern int drv_SD_list_verbose(void);
+
+
int drv_list(void)
{
int i;
@@ -227,6 +231,12 @@ int drv_list(void)
Driver[i]->list();
}
printf("\n");
+
+#ifdef WITH_SERDISPLIB
+ printf("\n");
+ drv_SD_list_verbose();
+#endif
+
return 0;
}
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;
diff --git a/lcd4linux.c b/lcd4linux.c
index 8245af9..1fde9f7 100644
--- a/lcd4linux.c
+++ b/lcd4linux.c
@@ -246,9 +246,11 @@ int main(int argc, char *argv[])
case 'l':
printf("%s\n", release);
printf("%s\n", copyright);
+ printf("\n");
drv_list();
printf("\n");
plugin_list();
+ printf("\n");
exit(0);
case 'o':
output = optarg;