summaryrefslogtreecommitdiffstats
path: root/openbsc/src
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2009-07-05 14:19:06 +0200
committerHarald Welte <laforge@gnumonks.org>2009-07-05 14:19:06 +0200
commitd5651d5ceda3fa6fef48627022deb0ecba0e4182 (patch)
treecc5d2f01f11d2367d53ed90fd9753ef58ec1e988 /openbsc/src
parentc2e302dc84490691b17fcfa6246e40eaf9a0ab32 (diff)
parent42b40072dc5793766480731f11ca68f8301c48b2 (diff)
Merge commit 'origin/master'
Diffstat (limited to 'openbsc/src')
-rw-r--r--openbsc/src/ipaccess-config.c23
1 files changed, 21 insertions, 2 deletions
diff --git a/openbsc/src/ipaccess-config.c b/openbsc/src/ipaccess-config.c
index 8c52093ae..ec145e50d 100644
--- a/openbsc/src/ipaccess-config.c
+++ b/openbsc/src/ipaccess-config.c
@@ -145,6 +145,20 @@ int nm_state_event(enum nm_evt evt, u_int8_t obj_class, void *obj,
return 0;
}
+static void print_usage(void)
+{
+ printf("Usage: ipaccess-config\n");
+}
+
+static void print_help(void)
+{
+ printf(" -u --unit-id UNIT_ID\n");
+ printf(" -o --oml-ip ip\n");
+ printf(" -r --restart\n");
+ printf(" -n flags/mask Set NVRAM attributes.\n");
+ printf(" -h --help this text\n");
+}
+
int main(int argc, char **argv)
{
struct gsm_bts *bts;
@@ -162,9 +176,10 @@ int main(int argc, char **argv)
{ "unit-id", 1, 0, 'u' },
{ "oml-ip", 1, 0, 'o' },
{ "restart", 0, 0, 'r' },
+ { "help", 0, 0, 'h' },
};
- c = getopt_long(argc, argv, "u:o:rn:", long_options,
+ c = getopt_long(argc, argv, "u:o:rn:h", long_options,
&option_index);
if (c == -1)
@@ -189,11 +204,15 @@ int main(int argc, char **argv)
ul = strtoul(slash+1, NULL, 16);
nv_mask = ul & 0xffff;
break;
+ case 'h':
+ print_usage();
+ print_help();
+ exit(0);
}
};
if (optind >= argc) {
- fprintf(stderr, "you have to specify the IP address of the BTS\n");
+ fprintf(stderr, "you have to specify the IP address of the BTS. Use --help for more information\n");
exit(2);
}