X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fros.c;h=bcd72de0351da00786905528bd7f0f56d37935cc;hb=460236c781ec5e719537598be7ef2d858166c8e3;hp=1849989ac54eab1e99423884c1ffadb3fc0ec9cc;hpb=3b8827c7a6f36c26b4aefe0afa4f6b6d44bd6c60;p=routeros-api.git diff --git a/src/ros.c b/src/ros.c index 1849989..bcd72de 100644 --- a/src/ros.c +++ b/src/ros.c @@ -168,6 +168,7 @@ static int system_resource_handler (__attribute__((unused)) ros_connection_t *c, used_hdd_space = r->total_hdd_space - r->free_hdd_space; printf ("====== System resources ======\n" + "Uptime: %10.2f days\n" "RouterOS version: %11s\n" "Architecture name: %11s\n" "Board name: %15s\n" @@ -184,7 +185,7 @@ static int system_resource_handler (__attribute__((unused)) ros_connection_t *c, "Sectors written: %13"PRIu64" (%"PRIu64")\n" "Bad blocks: %15"PRIu64"\n" "==============================\n", - r->version, + ((double) r->uptime) / 86400.0, r->version, r->architecture_name, r->board_name, r->cpu_model, r->cpu_count, r->cpu_load, r->cpu_frequency, r->free_memory, @@ -271,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 */