summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlfred E. Heggestad <aeh@db.org>2014-12-24 14:04:48 +0100
committerAlfred E. Heggestad <aeh@db.org>2014-12-24 14:04:48 +0100
commitca6714a53cdf9429bc970bbdfb133f566cd0e483 (patch)
treebeae58993292289646f17f2233c55d85dba59c95 /src
parent5dfe33ac12f39c75c5e66781df9478b3469d7709 (diff)
main: added -t for test mode
Diffstat (limited to 'src')
-rw-r--r--src/main.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/main.c b/src/main.c
index ce96a85..526512f 100644
--- a/src/main.c
+++ b/src/main.c
@@ -36,7 +36,7 @@ static void signal_handler(int sig)
int main(int argc, char *argv[])
{
- bool prefer_ipv6 = false, run_daemon = false;
+ bool prefer_ipv6 = false, run_daemon = false, test = false;
const char *exec = NULL;
int err;
@@ -49,7 +49,7 @@ int main(int argc, char *argv[])
#ifdef HAVE_GETOPT
for (;;) {
- const int c = getopt(argc, argv, "6de:f:p:hv");
+ const int c = getopt(argc, argv, "6de:f:p:hvt");
if (0 > c)
break;
@@ -68,6 +68,7 @@ int main(int argc, char *argv[])
"\t-f <path> Config path\n"
"\t-p <path> Audio files\n"
"\t-h -? Help\n"
+ "\t-t Test and exit\n"
"\t-v Verbose debug\n"
);
return -2;
@@ -94,6 +95,10 @@ int main(int argc, char *argv[])
play_set_path(optarg);
break;
+ case 't':
+ test = true;
+ break;
+
case 'v':
log_enable_debug(true);
break;
@@ -123,6 +128,9 @@ int main(int argc, char *argv[])
if (err)
goto out;
+ if (test)
+ goto out;
+
/* Load modules */
err = conf_modules();
if (err)