From 4d50bd54fa77d0d140624a5220a6fa39104d8f99 Mon Sep 17 00:00:00 2001 From: Florian Forster Date: Fri, 25 Dec 2009 11:44:21 +0100 Subject: [PATCH] src/ros.c: Add options and versioning information to usage output. --- src/ros.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) 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 */ -- 2.11.0