diff options
author | chatty | 1999-12-17 18:29:59 +0000 |
---|---|---|
committer | chatty | 1999-12-17 18:29:59 +0000 |
commit | d25769da14c8d4b8befc214110650cd4e763e8d3 (patch) | |
tree | 767323dd8b1382d4ba9967b867e6e7f6994b7a93 /src/irbox.c | |
parent | d99015f9ab671d5dab37e76e87c862782495d321 (diff) | |
download | irbox-d25769da14c8d4b8befc214110650cd4e763e8d3.zip irbox-d25769da14c8d4b8befc214110650cd4e763e8d3.tar.gz irbox-d25769da14c8d4b8befc214110650cd4e763e8d3.tar.bz2 irbox-d25769da14c8d4b8befc214110650cd4e763e8d3.tar.xz |
Added environment variable and changed default value for device
in order to be compatible with the brand new man pages.
Diffstat (limited to 'src/irbox.c')
-rw-r--r-- | src/irbox.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/irbox.c b/src/irbox.c index 355a932..476ae9a 100644 --- a/src/irbox.c +++ b/src/irbox.c @@ -29,12 +29,13 @@ #include "timer.h" #include "ivy.h" #include "ivychannel.h" +#include "ivyloop.h" #include "irdev.h" #include "irtable.h" -#ifndef DEFAULT_DEVICE -#define DEFAULT_DEVICE "/dev/ttyS1" +#ifndef DEFAULT_IRBOX_DEVICE +#define DEFAULT_IRBOX_DEVICE "/dev/ttyS0" #endif #ifndef DEFAULT_IRBOX_DIR @@ -97,7 +98,7 @@ int main (int argc, char *argv[]) { int c; - const char* dev = DEFAULT_DEVICE; + const char* dev = 0; const char* bus = 0; static char app_name_buf [1024]; struct sigaction act; @@ -124,6 +125,12 @@ main (int argc, char *argv[]) app_name = app_name_buf; } + /* device */ + if (!dev) + dev = getenv ("IRBOX_DEVICE"); + if (!dev) + dev = DEFAULT_IRBOX_DEVICE; + /* data directory */ if (!data_dir_name) data_dir_name = getenv ("IRBOX_DIR"); |