From: Florian Forster Date: Fri, 25 Dec 2009 10:44:21 +0000 (+0100) Subject: src/ros.c: Add options and versioning information to usage output. X-Git-Tag: librouteros-1.1.0~2 X-Git-Url: https://git.octo.it/?p=routeros-api.git;a=commitdiff_plain;h=4d50bd54fa77d0d140624a5220a6fa39104d8f99 src/ros.c: Add options and versioning information to usage output. --- diff --git a/src/ros.c b/src/ros.c index 6d38b27..bcd72de 100644 --- a/src/ros.c +++ b/src/ros.c @@ -272,7 +272,19 @@ static char *read_password (void) /* {{{ */ static void exit_usage (void) /* {{{ */ { - printf ("Usage: ros [options] [args]\n"); + printf ("Usage: ros [options] [args]\n" + "\n" + "OPTIONS:\n" + " -u Use 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 */