projects
/
routeros-api.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
ef2a474
)
src/ros.c: Add options and versioning information to usage output.
author
Florian Forster
<octo@leeloo.lan.home.verplant.org>
Fri, 25 Dec 2009 10:44:21 +0000
(11:44 +0100)
committer
Florian Forster
<octo@leeloo.lan.home.verplant.org>
Fri, 25 Dec 2009 10:44:21 +0000
(11:44 +0100)
src/ros.c
patch
|
blob
|
history
diff --git
a/src/ros.c
b/src/ros.c
index
6d38b27
..
bcd72de
100644
(file)
--- a/
src/ros.c
+++ b/
src/ros.c
@@
-272,7
+272,19
@@
static char *read_password (void) /* {{{ */
static void exit_usage (void) /* {{{ */
{
static void exit_usage (void) /* {{{ */
{
- printf ("Usage: ros [options] <host> <command> [args]\n");
+ printf ("Usage: ros [options] <host> <command> [args]\n"
+ "\n"
+ "OPTIONS:\n"
+ " -u <user> Use <user> to authenticate.\n"
+ " -h Display this help message.\n"
+ "\n");
+ if (ros_version () == ROS_VERSION)
+ printf ("Using librouteros %s\n", ROS_VERSION_STRING);
+ else
+ printf ("Using librouteros %s (%s)\n",
+ ros_version_string (), ROS_VERSION_STRING);
+ printf ("Copyright (c) 2009 by Florian Forster\n");
+
exit (EXIT_SUCCESS);
} /* }}} void exit_usage */
exit (EXIT_SUCCESS);
} /* }}} void exit_usage */