]> rtime.felk.cvut.cz Git - can-utils.git/commitdiff
add 'v' command response
authorbombilee <chenglung@gmail.com>
Thu, 7 May 2015 14:11:58 +0000 (10:11 -0400)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Fri, 8 May 2015 11:00:15 +0000 (13:00 +0200)
add v command response. Some software like USBtinViewer using v for software version.
Tested on USBtinViewer 1.0

Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
slcanpty.c

index c062a027da419bfaca0290e556aaa29019d4c85e..f485ac775a533b2bfdbb5cd34ee1f564c7ae0abe 100644 (file)
@@ -185,6 +185,13 @@ rx_restart:
                ptr = 1;
                goto rx_out;
        }
+       /* check for 'v'ersion command */
+       if (cmd == 'v') {
+               sprintf(replybuf, "v1014\r");
+               tmp = strlen(replybuf);
+               ptr = 1;
+               goto rx_out;
+       }
 
        /* check for serial 'N'umber command */
        if (cmd == 'N') {