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
n = atoi(argv[2]);
- if (n < 1 | n > 5) {
+ if ((n < 1) | (n > 5)) {
printf("Invalid Port\n");
return;
}
n = atoi(argv[2]);
- if (n < 1 | n > 5) {
+ if ((n < 1) | (n > 5)) {
printf("Invalid Port %i\n", n);
return;
}
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;
}