mirror of
https://github.com/linux-can/can-utils.git
synced 2026-09-20 14:29:55 +02:00
[cansequence] add sequence wrap around counter
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
This commit is contained in:
+3
-2
@@ -73,6 +73,7 @@ int main(int argc, char **argv)
|
|||||||
};
|
};
|
||||||
char *interface = "can0";
|
char *interface = "can0";
|
||||||
unsigned char sequence = 0;
|
unsigned char sequence = 0;
|
||||||
|
int seq_wrap = 0;
|
||||||
int family = PF_CAN, type = SOCK_RAW, proto = CAN_RAW;
|
int family = PF_CAN, type = SOCK_RAW, proto = CAN_RAW;
|
||||||
int loopcount = 1, infinite = 1;
|
int loopcount = 1, infinite = 1;
|
||||||
int use_poll = 0;
|
int use_poll = 0;
|
||||||
@@ -226,7 +227,7 @@ int main(int argc, char **argv)
|
|||||||
|
|
||||||
sequence++;
|
sequence++;
|
||||||
if (verbose && !sequence)
|
if (verbose && !sequence)
|
||||||
printf("sequence wrap around\n");
|
printf("sequence wrap around (%d)\n", seq_wrap++);
|
||||||
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@@ -272,7 +273,7 @@ int main(int argc, char **argv)
|
|||||||
sequence++;
|
sequence++;
|
||||||
|
|
||||||
if (verbose && !sequence)
|
if (verbose && !sequence)
|
||||||
printf("sequence wrap around\n");
|
printf("sequence wrap around (%d)\n", seq_wrap++);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user