mailarchive of the pengutronix oss-tools mailing list
 help / color / mirror / Atom feed
From: Michael Olbrich <m.olbrich@pengutronix.de>
To: oss-tools@pengutronix.de
Subject: Re: [OSS-Tools] [PATCH microcom 1/2] Handle EOF from port with a better error message
Date: Thu, 5 Jul 2018 09:00:21 +0200	[thread overview]
Message-ID: <20180705070021.e66q3hc2inw3k26r@pengutronix.de> (raw)
In-Reply-To: <20180704162912.13765-1-u.kleine-koenig@pengutronix.de>

On Wed, Jul 04, 2018 at 06:29:11PM +0200, Uwe Kleine-König wrote:
> If in the rfc2217 case the socket is closed from the remote end, writing out
> "Invalid argument" isn't very helpful.
> 
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> ---
>  .travis.yml | 7 -------
>  mux.c       | 6 ++++--
>  2 files changed, 4 insertions(+), 9 deletions(-)
>  delete mode 100644 .travis.yml
> 
> diff --git a/.travis.yml b/.travis.yml
> deleted file mode 100644
> index 0723a3a0a433..000000000000
> --- a/.travis.yml
> +++ /dev/null
> @@ -1,7 +0,0 @@
> -language: c
> -compiler: gcc
> -dist: trusty
> -script:
> -  - autoreconf -fi
> -  - ./configure
> -  - make distcheck

I don't think this hunk should be part of this patch.

Michael

> diff --git a/mux.c b/mux.c
> index bd36fc73ec6a..341f8803fc50 100644
> --- a/mux.c
> +++ b/mux.c
> @@ -299,8 +299,10 @@ int mux_loop(struct ios_ops *ios)
>  			len = read(ios->fd, buf, BUFSIZE);
>  			if (len < 0)
>  				return -errno;
> -			if (len == 0)
> -				return -EINVAL;
> +			if (len == 0) {
> +				fprintf(stderr, "Got EOF from port\n");
> +				return 0;
> +			}
>  
>  			handle_receive_buf(ios, buf, len);
>  		}
> -- 
> 2.18.0
> 
> 
> _______________________________________________
> OSS-Tools mailing list
> OSS-Tools@pengutronix.de

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
OSS-Tools mailing list
OSS-Tools@pengutronix.de

  parent reply	other threads:[~2018-07-05  7:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-04 16:29 Uwe Kleine-König
2018-07-04 16:29 ` [OSS-Tools] [PATCH microcom 2/2] fix debug printf about WILL/WONT/DO/DONT Uwe Kleine-König
2018-07-05  7:00 ` Michael Olbrich [this message]
2018-07-05  7:41   ` [OSS-Tools] [PATCH microcom 1/2] Handle EOF from port with a better error message Uwe Kleine-König

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=20180705070021.e66q3hc2inw3k26r@pengutronix.de \
    --to=m.olbrich@pengutronix.de \
    --cc=oss-tools@pengutronix.de \
    /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