X-Git-Url: https://git.sur5r.net/?p=gsconf;a=blobdiff_plain;f=shell_port.c;h=9ac059d262ef0412c2256b9e01fbd28b59d46330;hp=d9400290b6afde6a028f8610eba95dc25b45054b;hb=HEAD;hpb=11ae7c1958d87f75fb840c6556fa99abf85e6607 diff --git a/shell_port.c b/shell_port.c index d940029..9ac059d 100644 --- a/shell_port.c +++ b/shell_port.c @@ -5,13 +5,13 @@ void shell_port(char ** argv, int elem) { int n, i, m, o; if (elem == 1) { - + printf(" port [show|diag|mirror] \n"); return; } if (strncmp(argv[1], "show", 4) == 0) { printf("Port\tSpeed\t\tBytes In\t\tBytes Out\n"); for (n = 0; n< 5; n++) { - printf("%i\t%s\t% 8lu\t\t% 8lu\n", n, + printf("%i\t%s\t%8lu\t\t%8lu\n", n, (settings.portStatistics[n].state == 0x05 ? "1000 Mbit/s" : (settings.portStatistics[n].state == 0x04 ? "100 Mbit/s" : (settings.portStatistics[n].state == 0x03 ? "10 Mbit/s": (settings.portStatistics[n].state == 0x00 ? "No Cable": "???")))), settings.portStatistics[n].bytesIn, settings.portStatistics[n].bytesOut @@ -25,7 +25,7 @@ void shell_port(char ** argv, int elem) { n = atoi(argv[2]); - if (n < 1 | n > 5) { + if ((n < 1) | (n > 5)) { printf("Invalid Port\n"); return; } @@ -66,7 +66,7 @@ void shell_port(char ** argv, int elem) { n = atoi(argv[2]); - if (n < 1 | n > 5) { + if ((n < 1) | (n > 5)) { printf("Invalid Port %i\n", n); return; } @@ -75,7 +75,7 @@ void shell_port(char ** argv, int elem) { for (m = 3; m < elem; m++) { i = atoi(argv[m]); - if (i < 1 | i > 5) { + if ((i < 1) | (i > 5)) { printf("Invalid Port %i\n", i); return; }