All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
To: Glen Wernersbach <glen@domain.hid>
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai-help] Linux Serial Does not work with CONFIG_XENO_OPT_PERVASIVE enabled
Date: Tue, 20 Mar 2012 16:24:35 +0100	[thread overview]
Message-ID: <4F68A133.5090801@domain.hid> (raw)
In-Reply-To: <CB8E17BE.1EE36%glen@domain.hid>

On 03/20/2012 04:17 PM, Glen Wernersbach wrote:
> Don't have a full dev enviroment on my embedded arm. Here is the program.
> Very very basic:
>      close(fd);
> 
> 
> 
> 
> 
>      
>      fd = open("/dev/ttyS4", O_RDWR | O_NOCTTY | O_NDELAY);

Why closing and reopening? Are you sure this does not reset configuration?

>     if (fd == -1) {
>         printf("open /dev/ttyS0 Failed, errno: %d\r\n", errno);
>         return 0;
>     }
>     
>           
>   //write the data to my device which echos them back
>   write(fd, buf, sizeof(buf)-1);

missing return value check.

>   


-- 
					    Gilles.


  reply	other threads:[~2012-03-20 15:24 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-20 13:28 [Xenomai-help] Linux Serial Does not work with CONFIG_XENO_OPT_PERVASIVE enabled Glen Wernersbach
2012-03-20 13:44 ` Philippe Gerum
2012-03-20 13:48   ` Glen Wernersbach
2012-03-20 13:57     ` Philippe Gerum
2012-03-20 14:07       ` Glen Wernersbach
2012-03-20 14:14         ` Philippe Gerum
2012-03-20 14:17         ` Philippe Gerum
2012-03-20 14:31           ` Philippe Gerum
2012-03-20 14:34             ` Glen Wernersbach
2012-03-20 14:47               ` Philippe Gerum
2012-03-20 14:53                 ` Glen Wernersbach
2012-03-20 15:06                   ` Philippe Gerum
2012-03-20 15:17                     ` Glen Wernersbach
2012-03-20 15:24                       ` Gilles Chanteperdrix [this message]
2012-03-20 15:27                       ` Philippe Gerum
2012-03-20 16:09                         ` Glen Wernersbach
2012-03-20 15:12                   ` Gilles Chanteperdrix
2012-03-20 15:22                     ` Glen Wernersbach
2012-03-20 15:26                       ` Gilles Chanteperdrix
2012-03-20 16:40                         ` Glen Wernersbach
2012-03-20 19:38                           ` Gilles Chanteperdrix
2012-03-20 20:19                             ` Glen Wernersbach
2012-03-20 20:35                               ` Gilles Chanteperdrix
2012-03-20 21:20                                 ` Glen Wernersbach
2012-03-20 21:41                                   ` Philippe Gerum
2012-03-21  4:46                                 ` Glen Wernersbach
2012-03-21  7:43                                   ` Gilles Chanteperdrix
2012-03-21 13:21                                     ` Glen Wernersbach
2012-03-26  5:27                                     ` Glen Wernersbach
2012-03-21  8:38                                   ` Philippe Gerum
2012-03-21 14:41                                     ` Glen Wernersbach
2012-03-21 15:07                                       ` Philippe Gerum
2012-03-21 16:53                                         ` Glen Wernersbach
2012-03-20 16:22         ` Philippe Gerum
2012-03-20 16:32           ` Glen Wernersbach
2012-03-20 16:42             ` Gilles Chanteperdrix
2012-03-20 16:48               ` Glen Wernersbach
2012-03-20 14:50 ` Gilles Chanteperdrix
2012-03-20 14:59   ` Glen Wernersbach

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=4F68A133.5090801@domain.hid \
    --to=gilles.chanteperdrix@xenomai.org \
    --cc=glen@domain.hid \
    --cc=xenomai@xenomai.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.