summaryrefslogtreecommitdiffstats
path: root/src/host/layer23/src/misc
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2010-12-27 14:51:13 +0100
committerHolger Hans Peter Freyther <zecke@selfish.org>2010-12-27 19:01:37 +0100
commitace267cfc20cbd05a6aa953d1d05733b4d174dd6 (patch)
tree04702670f9e4ef3601ab1fcceba49c56763f1a31 /src/host/layer23/src/misc
parent63c0e6d1996733d107434585fbef5e888b3075ed (diff)
layer23: Enable combining the long options
Combine the long options from the base and the application. Provide the long option for the cell log application.
Diffstat (limited to 'src/host/layer23/src/misc')
-rw-r--r--src/host/layer23/src/misc/app_cell_log.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/host/layer23/src/misc/app_cell_log.c b/src/host/layer23/src/misc/app_cell_log.c
index e80a7b25..a0a1c093 100644
--- a/src/host/layer23/src/misc/app_cell_log.c
+++ b/src/host/layer23/src/misc/app_cell_log.c
@@ -23,6 +23,7 @@
#include <signal.h>
#include <stdlib.h>
#include <time.h>
+#include <getopt.h>
#include <osmocom/bb/common/osmocom_data.h>
#include <osmocom/bb/common/l1ctl.h>
@@ -31,6 +32,7 @@
#include <osmocom/bb/misc/cell_log.h>
#include <osmocore/talloc.h>
+#include <osmocore/utils.h>
extern struct log_target *stderr_target;
extern void *l23_ctx;
@@ -82,6 +84,16 @@ static int l23_cfg_supported()
return L23_OPT_TAP | L23_OPT_DBG;
}
+static int l23_getopt_options(struct option **options)
+{
+ static struct option opts [] = {
+ {"logfile", 1, 0, 'l'},
+ };
+
+ *options = opts;
+ return ARRAY_SIZE(opts);
+}
+
static int l23_cfg_print_help()
{
printf("\nApplication specific\n");
@@ -104,6 +116,7 @@ static struct l23_app_info info = {
.copyright = "Copyright (C) 2010 Andreas Eversberg\n",
.getopt_string = "l:",
.cfg_supported = l23_cfg_supported,
+ .cfg_getopt_opt = l23_getopt_options,
.cfg_handle_opt = l23_cfg_handle,
.cfg_print_help = l23_cfg_print_help,
};