linux-can.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Marc Kleine-Budde <mkl@pengutronix.de>
To: Alexander Stein <alexander.stein@systec-electronic.com>
Cc: linux-can@vger.kernel.org
Subject: Re: [PATCH v3] candump: Add timeout option if no message has been received
Date: Tue, 12 Feb 2013 17:56:08 +0100	[thread overview]
Message-ID: <511A7428.8040202@pengutronix.de> (raw)
In-Reply-To: <1360687851-1849-1-git-send-email-alexander.stein@systec-electronic.com>

[-- Attachment #1: Type: text/plain, Size: 1887 bytes --]

On 02/12/2013 05:50 PM, Alexander Stein wrote:
> Signed-off-by: Alexander Stein <alexander.stein@systec-electronic.com>
> ---
> Changes in v3 (v2 was bogus)
> * Use strtol instead of atoi
> * Change memcpy to direct struct copy
> 
>  candump.c | 21 +++++++++++++++++++--
>  1 file changed, 19 insertions(+), 2 deletions(-)
> 
> diff --git a/candump.c b/candump.c
> index bf3e8bb..457af9d 100644
> --- a/candump.c
> +++ b/candump.c
> @@ -49,6 +49,7 @@
>  #include <ctype.h>
>  #include <libgen.h>
>  #include <time.h>
> +#include <errno.h>
>  
>  #include <sys/time.h>
>  #include <sys/types.h>
> @@ -121,6 +122,7 @@ void print_usage(char *prg)
>  	fprintf(stderr, "         -d          (monitor dropped CAN frames)\n");
>  	fprintf(stderr, "         -e          (dump CAN error frames in human-readable format)\n");
>  	fprintf(stderr, "         -x          (print extra message infos, rx/tx brs esi)\n");
> +	fprintf(stderr, "         -T <msecs>  (terminate after <msecs> without any reception)\n");
>  	fprintf(stderr, "\n");
>  	fprintf(stderr, "Up to %d CAN interfaces with optional filter sets can be specified\n", MAXSOCK);
>  	fprintf(stderr, "on the commandline in the form: <ifname>[,filter]*\n");
> @@ -227,6 +229,7 @@ int main(int argc, char **argv)
>  	int nbytes, i, maxdlen;
>  	struct ifreq ifr;
>  	struct timeval tv, last_tv;
> +	struct timeval timeout, timeout_config, *timeout_current = NULL;

I'll change this into
	struct timeval timeout, timeout_config = { 0, 0 }, *timeout_current = NULL;

To make my old compiler happy.

Applied.

tnx,
Marc

-- 
Pengutronix e.K.                  | Marc Kleine-Budde           |
Industrial Linux Solutions        | Phone: +49-231-2826-924     |
Vertretung West/Dortmund          | Fax:   +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686  | http://www.pengutronix.de   |


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 263 bytes --]

  reply	other threads:[~2013-02-12 16:56 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-12 10:31 [PATCH] candump: Add timeout option if no message has been received Alexander Stein
2013-02-12 10:51 ` Marc Kleine-Budde
2013-02-12 14:05   ` Alexander Stein
2013-02-12 14:07     ` Marc Kleine-Budde
2013-02-12 14:17       ` [PATCH v2] " Alexander Stein
2013-02-12 14:19         ` Marc Kleine-Budde
2013-02-12 16:50       ` [PATCH v3] " Alexander Stein
2013-02-12 16:56         ` Marc Kleine-Budde [this message]
2013-02-12 17:38           ` 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=511A7428.8040202@pengutronix.de \
    --to=mkl@pengutronix.de \
    --cc=alexander.stein@systec-electronic.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).