#include "commands.h"
-bool do_ports_state (int nb UNUSED, const char **com UNUSED, struct ngadmin *nga)
+bool do_ports_state (int argc, const char **argv UNUSED, struct ngadmin *nga)
{
int i;
const struct swi_attr *sa;
bool ret = true;
+ if (argc > 0) {
+ printf("this command takes no argument\n");
+ ret = false;
+ goto end;
+ }
+
sa = ngadmin_getCurrentSwitch(nga);
if (sa == NULL) {
printf("must be logged\n");
}
-bool do_ports_statistics_reset (int nb UNUSED, const char **com UNUSED, struct ngadmin *nga)
+bool do_ports_statistics_reset (int argc, const char **argv UNUSED, struct ngadmin *nga)
{
int i;
+
+ if (argc > 0) {
+ printf("this command takes no argument\n");
+ return false;
+ }
+
if (ngadmin_getCurrentSwitch(nga) == NULL) {
printf("must be logged\n");
return false;
}
-bool do_ports_statistics_show (int nb UNUSED, const char **com UNUSED, struct ngadmin *nga)
+bool do_ports_statistics_show (int argc, const char **argv UNUSED, struct ngadmin *nga)
{
int i;
const struct swi_attr *sa;
struct port_stats *ps = NULL;
+ if (argc > 0) {
+ printf("this command takes no argument\n");
+ ret = false;
+ goto end;
+ }
+
sa = ngadmin_getCurrentSwitch(nga);
if (sa == NULL) {
printf("must be logged\n");