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.pull/7/head
parent
30426b2647
commit
892c0d9e7d
|
|
@ -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)) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue