linux-can.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Marc Kleine-Budde <mkl@pengutronix.de>
To: linux-can@vger.kernel.org
Cc: bombilee <chenglung@gmail.com>
Subject: [PATCH] add 'v' command response
Date: Thu,  7 May 2015 16:20:28 +0200	[thread overview]
Message-ID: <1431008428-22567-1-git-send-email-mkl@pengutronix.de> (raw)

From: bombilee <chenglung@gmail.com>

add v command response. Some software like USBtinViewer using v for software version.
Tested on USBtinViewer 1.0
---
Hello,

this just came in via gibhub.

Marc

 slcanpty.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/slcanpty.c b/slcanpty.c
index c062a027da41..f485ac775a53 100644
--- a/slcanpty.c
+++ b/slcanpty.c
@@ -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') {
-- 
2.1.4


             reply	other threads:[~2015-05-07 14:20 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-07 14:20 Marc Kleine-Budde [this message]
2015-05-07 14:24 ` [PATCH] add 'v' command response Marc Kleine-Budde
2015-05-07 20:57   ` Oliver Hartkopp
     [not found]     ` <CAH=KbUsshrrQjBSkWzC6sgnXkfhnzUJfS8DcxrNx5-NBk9mysg@mail.gmail.com>
2015-05-08 10:52       ` Oliver Hartkopp

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1431008428-22567-1-git-send-email-mkl@pengutronix.de \
    --to=mkl@pengutronix.de \
    --cc=chenglung@gmail.com \
    --cc=linux-can@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).