This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
dexter gerrit-no-reply at lists.osmocom.orgdexter has uploaded this change for review. ( https://gerrit.osmocom.org/10623
Change subject: cosmetic: add commandline help
......................................................................
cosmetic: add commandline help
There is no helptext for the commandline options, which makes it
difficult for new users to use the program.
- Add commandline help
Change-Id: I8d04644342acd64432742f96e32dc9f2e0e91c20
---
M src/host/virt_phy/src/virtphy.c
1 file changed, 24 insertions(+), 1 deletion(-)
git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/23/10623/1
diff --git a/src/host/virt_phy/src/virtphy.c b/src/host/virt_phy/src/virtphy.c
index 153f890..118e8a1 100644
--- a/src/host/virt_phy/src/virtphy.c
+++ b/src/host/virt_phy/src/virtphy.c
@@ -60,11 +60,30 @@
static char *arfcn_sig_lev_red_mask = NULL;
static char *pm_timeout = NULL;
+static void print_usage()
+{
+ printf("Usage: virtphy\n");
+}
+
+static void print_help()
+{
+ printf(" Some useful help...\n");
+ printf(" -h --help This text.\n");
+ printf(" -z --dl-rx-grp ms multicast group.\n");
+ printf(" -y --ul-tx-grp bts multicast group.\n");
+ printf(" -x --port udp port to use for communication with virtual BTS (GSMTAP)\n");
+ printf(" -d --log-mask --log-mask=DRLL:DCC enable debugging.\n");
+ printf(" -s --l1ctl-sock l1ctl socket path path.\n");
+ printf(" -r --arfcn-sig-lev-red reduce signal level (e.g. 666,12:888,43:176,22).\n");
+ printf(" -t --pm-timeout power management timeout.\n");
+}
+
static void handle_options(int argc, char **argv)
{
while (1) {
int option_index = 0, c;
static struct option long_options[] = {
+ {"help", 0, 0, 'h'},
{"dl-rx-grp", required_argument, 0, 'z'},
{"ul-tx-grp", required_argument, 0, 'y'},
{"port", required_argument, 0, 'x'},
@@ -74,12 +93,16 @@
{"pm-timeout", required_argument, 0, 't'},
{0, 0, 0, 0},
};
- c = getopt_long(argc, argv, "z:y:x:d:s:r:t:", long_options,
+ c = getopt_long(argc, argv, "hz:y:x:d:s:r:t:", long_options,
&option_index);
if (c == -1)
break;
switch (c) {
+ case 'h':
+ print_usage();
+ print_help();
+ exit(0);
case 'z':
dl_rx_grp = optarg;
break;
--
To view, visit https://gerrit.osmocom.org/10623
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I8d04644342acd64432742f96e32dc9f2e0e91c20
Gerrit-Change-Number: 10623
Gerrit-PatchSet: 1
Gerrit-Owner: dexter <pmaier at sysmocom.de>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20180827/02080a49/attachment.htm>