All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
To: Everett Wang <everteq@domain.hid>
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai-help] error on rt_dev_read, code Success, what does it mean?
Date: Sat, 12 Jun 2010 11:31:04 +0200	[thread overview]
Message-ID: <4C1353D8.2060507@domain.hid> (raw)
In-Reply-To: <AANLkTim0tClnDQPN3u5ozJSEU6BcX--Xf9Ekw00ADvgy@domain.hid>

Everett Wang wrote:
> Hi,
> 
> I am developing a real time programming using xenomai, RTDM. When
> I try to read serial port, I sometimes get this message:
> 
> error on rt_dev_read, code Success
> 
> I checked my program and found that when rt_dev_read returns a
> negative number, this message is printed. What does this error message
> mean? It seems that my port is open when I tried to read from it.

It means that you are probably using errno, and since rt_dev_read does
not set errno, you get "Success" as error message instead of the real
error message. If you want to print the real error message, you should
use strerror(-rc) where rc is the return code of rt_dev_read.

But of course, I am just guessing here, seeing your test code would help
more.


-- 
					    Gilles.


  reply	other threads:[~2010-06-12  9:31 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-12  4:09 [Xenomai-help] error on rt_dev_read, code Success, what does it mean? Everett Wang
2010-06-12  9:31 ` Gilles Chanteperdrix [this message]
2010-06-12 10:13   ` Everett Wang
2010-06-12 10:45     ` Jan Kiszka
2010-06-12 17:14       ` Everett Wang
2010-06-14 20:03         ` Jan Kiszka
2010-06-14 14:53     ` Luc ANTOLINOS
2010-06-15  0:45       ` Everett Wang
2010-06-15  9:27         ` Luc ANTOLINOS
2010-06-17  7:49           ` Everett Wang
2010-06-17  8:48             ` Jan Kiszka

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=4C1353D8.2060507@domain.hid \
    --to=gilles.chanteperdrix@xenomai.org \
    --cc=everteq@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.