diff options
| author | michael <michael@3ae390bd-cb1e-0410-b409-cd5a39f66f1f> | 2008-12-27 08:06:57 +0000 | 
|---|---|---|
| committer | michael <michael@3ae390bd-cb1e-0410-b409-cd5a39f66f1f> | 2008-12-27 08:06:57 +0000 | 
| commit | 86bd0d06e81a18de3e5d330eae4ebddcb756d8c3 (patch) | |
| tree | d8bdc32bdd9ca6f822aaf8cf38db6612a2755807 | |
| parent | 0d315ad93204252fb69e0fed101a51b8c027d096 (diff) | |
| download | lcd4linux-86bd0d06e81a18de3e5d330eae4ebddcb756d8c3.tar.gz | |
ported and modified r818 from volker_dev
git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@914 3ae390bd-cb1e-0410-b409-cd5a39f66f1f
| -rw-r--r-- | lcd4linux.c | 2 | ||||
| -rw-r--r-- | plugin.c | 142 | ||||
| -rwxr-xr-x | smoketest.sh | 18 | 
3 files changed, 151 insertions, 11 deletions
| diff --git a/lcd4linux.c b/lcd4linux.c index a1e1c8f..def950c 100644 --- a/lcd4linux.c +++ b/lcd4linux.c @@ -244,6 +244,8 @@ int main(int argc, char *argv[])  	    printf("%s\n", release);  	    printf("%s\n", copyright);  	    drv_list(); +	    printf("\n"); +	    plugin_list();  	    exit(0);  	case 'o':  	    output = optarg; @@ -44,6 +44,115 @@  #include "plugin.h" +char *Plugins[] = { +    "cfg", +    "math", +    "string", +    "test", +    "time", +#ifdef PLUGIN_APM +    "apm", +#endif +#ifdef PLUGIN_ASTERISK +    "asterisk", +#endif +#ifdef PLUGIN_BUTTON_EXEC +    "button_exec", +#endif +#ifdef PLUGIN_CPUINFO +    "cpuinfo", +#endif +#ifdef PLUGIN_DISKSTATS +    "diskstats", +#endif +#ifdef PLUGIN_DVB +    "dvb", +#endif +#ifdef PLUGIN_EXEC +    "exec", +#endif +#ifdef PLUGIN_FIFO +    "fifo", +#endif +#ifdef PLUGIN_FILE +    "file", +#endif +#ifdef PLUGIN_GPS +    "gps", +#endif +#ifdef PLUGIN_HDDTEMP +    "hddtemp", +#endif +#ifdef PLUGIN_I2C_SENSORS +    "i2c_sensors", +#endif +#ifdef PLUGIN_ICONV +    "iconv", +#endif +#ifdef PLUGIN_IMON +    "imon", +#endif +#ifdef PLUGIN_ISDN +    "isdn", +#endif +#ifdef PLUGIN_KVV +    "kvv", +#endif +#ifdef PLUGIN_LOADAVG +    "loadavg", +#endif +#ifdef PLUGIN_MEMINFO +    "meminfo", +#endif +#ifdef PLUGIN_MPD +    "mpd", +#endif +#ifdef PLUGIN_MYSQL +    "mysql", +#endif +#ifdef PLUGIN_NETDEV +    "netdev", +#endif +#ifdef PLUGIN_POP3 +    "pop3", +#endif +#ifdef PLUGIN_PPP +    "ppp", +#endif +#ifdef PLUGIN_PROC_STAT +    "proc_stat", +#endif +#ifdef PLUGIN_PYTHON +    "python", +#endif +#ifdef PLUGIN_SAMPLE +    "sample", +#endif +#ifdef PLUGIN_SETI +    "seti", +#endif +#ifdef PLUGIN_STATFS +    "statfs", +#endif +#ifdef PLUGIN_UNAME +    "uname", +#endif +#ifdef PLUGIN_UPTIME +    "uptime", +#endif +#ifdef PLUGIN_W1RETAP +    "w1retap", +#endif +#ifdef PLUGIN_WIRELESS +    "wireless", +#endif +#ifdef PLUGIN_XMMS +    "xmms", +#endif +    NULL, +}; + +  /* Prototypes */  int plugin_init_cfg(void);  void plugin_exit_cfg(void); @@ -60,6 +169,8 @@ int plugin_init_apm(void);  void plugin_exit_apm(void);  int plugin_init_asterisk(void);  void plugin_exit_asterisk(void); +int plugin_init_button_exec(void); +void plugin_exit_button_exec(void);  int plugin_init_cpuinfo(void);  void plugin_exit_cpuinfo(void);  int plugin_init_diskstats(void); @@ -106,8 +217,6 @@ int plugin_init_python(void);  void plugin_exit_python(void);  int plugin_init_sample(void);  void plugin_exit_sample(void); -int plugin_init_button_exec(void); -void plugin_exit_button_exec(void);  int plugin_init_seti(void);  void plugin_exit_seti(void);  int plugin_init_statfs(void); @@ -124,6 +233,22 @@ int plugin_init_xmms(void);  void plugin_exit_xmms(void); +int plugin_list(void) +{ +    int i; + +    printf("available plugins:\n  "); + +    for (i = 0; Plugins[i]; i++) { +	printf("%s", Plugins[i]); +	if (Plugins[i + 1]) +	    printf(", "); +    } +    printf("\n"); +    return 0; +} + +  int plugin_init(void)  {      plugin_init_cfg(); @@ -138,6 +263,9 @@ int plugin_init(void)  #ifdef PLUGIN_ASTERISK      plugin_init_asterisk();  #endif +#ifdef PLUGIN_BUTTON_EXEC +    plugin_init_button_exec(); +#endif  #ifdef PLUGIN_CPUINFO      plugin_init_cpuinfo();  #endif @@ -186,7 +314,6 @@ int plugin_init(void)  #ifdef PLUGIN_MPD      plugin_init_mpd();  #endif -  #ifdef PLUGIN_MYSQL      plugin_init_mysql();  #endif @@ -208,9 +335,6 @@ int plugin_init(void)  #ifdef PLUGIN_SAMPLE      plugin_init_sample();  #endif -#ifdef PLUGIN_BUTTON_EXEC -    plugin_init_button_exec(); -#endif  #ifdef PLUGIN_SETI      plugin_init_seti();  #endif @@ -245,6 +369,9 @@ void plugin_exit(void)  #ifdef PLUGIN_ASTERISK      plugin_exit_asterisk();  #endif +#ifdef PLUGIN_BUTTON_EXEC +    plugin_exit_button_exec(); +#endif  #ifdef PLUGIN_CPUINFO      plugin_exit_cpuinfo();  #endif @@ -311,9 +438,6 @@ void plugin_exit(void)  #ifdef PLUGIN_SAMPLE      plugin_exit_sample();  #endif -#ifdef PLUGIN_BUTTON_EXEC -    plugin_exit_button_exec(); -#endif  #ifdef PLUGIN_SETI      plugin_exit_seti();  #endif diff --git a/smoketest.sh b/smoketest.sh index 02c1170..3f0f123 100755 --- a/smoketest.sh +++ b/smoketest.sh @@ -16,9 +16,23 @@ for driver in BeckmannEgle BWCT CrystalFontz Curses Cwlinux D4D EA232graphic G15      make -s -j 2      if [ -x lcd4linux ]; then -	echo "Success: $driver" >>smoketest.log +	echo "Success: drv_$driver" >>smoketest.log      else -	echo "FAILED:  $driver" >>smoketest.log +	echo "FAILED:  drv_$driver" >>smoketest.log +    fi +     +done + +for plugin in apm asterisk button_exec cpuinfo diskstats dvb exec fifo file hddtemp i2c_sensors iconv imon isdn kvv loadavg meminfo mpd mysql netdev pop3 ppp proc_stat python sample seti statfs uname uptime w1retap wireless xmms; do + +    make distclean +    ./configure --with-drivers=NULL --with-plugins=$plugin +    make -s -j 2 +     +    if [ -x lcd4linux ]; then +	echo "Success: plugin_$plugin" >>smoketest.log +    else +	echo "FAILED:  plugin_$plugin" >>smoketest.log      fi  done | 
