mirror of
https://github.com/linux-can/can-utils.git
synced 2026-08-05 06:20:00 +02:00
Removed possibility to terminate candump with an input from stdin.
Therefore it can be used in scripts now, e.g. for CAN-frame bridging: candump can1 -mFFF -v123 -b can3 -s 2 & Use CTRL-C to terminate candump.
This commit is contained in:
@@ -97,6 +97,7 @@ static volatile int running = 1;
|
||||
void print_usage(char *prg)
|
||||
{
|
||||
fprintf(stderr, "Usage: %s [can-interfaces]\n", prg);
|
||||
fprintf(stderr, " (use CTRL-C to terminate %s)\n", prg);
|
||||
fprintf(stderr, "Options: -m <mask> (default 0x00000000)\n");
|
||||
fprintf(stderr, " -v <value> (default 0x00000000)\n");
|
||||
fprintf(stderr, " -i <0|1> (inv_filter)\n");
|
||||
@@ -402,7 +403,6 @@ int main(int argc, char **argv)
|
||||
while (running) {
|
||||
|
||||
FD_ZERO(&rdfs);
|
||||
FD_SET(0, &rdfs);
|
||||
for (i=0; i<currmax; i++)
|
||||
FD_SET(s[i], &rdfs);
|
||||
|
||||
@@ -412,11 +412,6 @@ int main(int argc, char **argv)
|
||||
continue;
|
||||
}
|
||||
|
||||
if (FD_ISSET(0, &rdfs)) {
|
||||
running = 0; /* stop with input from stdin */
|
||||
getchar();
|
||||
}
|
||||
|
||||
for (i=0; i<currmax; i++) { /* check all CAN RAW sockets */
|
||||
|
||||
if (FD_ISSET(s[i], &rdfs)) {
|
||||
|
||||
Reference in New Issue
Block a user