From: Grant Edwards <grant.b.edwards@gmail.com>
To: ecos-patches@sources.redhat.com
Subject: Re: [Bug 1001466] /dev/null serial driver
Date: Thu, 16 Feb 2012 14:01:00 -0000 [thread overview]
Message-ID: <jhj25i$ies$1@dough.gmane.org> (raw)
In-Reply-To: <20120216095427.D4B162F78001@mail.ecoscentric.com>
On 2012-02-16, bugzilla-daemon@bugs.ecos.sourceware.org <bugzilla-daemon@bugs.ecos.sourceware.org> wrote:
>> As you can see /dev/null is not some terminal line (serial device).
>> Well, eCos != *nix, but, I would avoid the ability to configure the
>> /dev/null as a serial device under eCos.
>
> Opengroup says (http://pubs.opengroup.org/onlinepubs/000095399/basedefs/xbd_chap10.html):
>
> /dev/null An infinite data source and data sink. Data written to
> /dev/null shall be discarded. Reads from /dev/null shall always
> return end-of-file (EOF).
That makes no sense. It not an infinite data source if a read always
EOF.
> AFAIK there is no specific requirements regarding the implementation,
> only the name and the result it must provide. Using the serial
> abstraction seemed fine to me since most often /dev/null is used to
> sink data coming from a byte stream.
The issue is that "byte stream" and "serial device" are not
equivalent. A "serial device" supports read/write like a byte stream,
but it also includes another API that. On Unix, /dev/null isn't a
serial device, and that's why using that name for a serial device on
eCos is a possible source of confusion. Historically, there has never
been a "null" serial device on Unix systems (that I know of).
> I suppose that serial devices are embedded in all targets, at least
> for diag_printf(), that why I placed it here so there is no need to
> bring other components.
I don't think anybody is arguing that a null serial device is a bad
idea, just that it might be better to use a name other than /dev/null.
>> Mess #3
>>
>> IMO, if anyone will see those words together in CDL (I mean 'serial'
>> and 'null'), under eCos dev/serial/null, then he would think, Great!
>> There is 'nullmodem' device in eCos! Come check my guess
>>
>> http://www.google.com/search?q=%2Bserial+%2Bnull
>>
>> And after reading your documentation, they will think, Nope! They
>> provide something very special (special null device :-)
>
> Well the name '/dev/null' is known for decades and for any *nix
> developer this name tells what it does, as posix/opengroup use this
> name.
Except on Unix, /dev/null is not a serial device (it's not a tty).
It's a plain vanilla character device.
> I just need to sink data, I don't need a FIFO that copies data
> between two points, I don't need a cross-over serial cable. I need
> /dev/null :-)
If all you need is /dev/null, why the extra work to make it a serial
device?
--
Grant Edwards grant.b.edwards Yow! I'm totally DESPONDENT
at over the LIBYAN situation
gmail.com and the price of CHICKEN
...
next prev parent reply other threads:[~2012-02-16 14:01 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-27 17:39 [Bug 1001466] New: " bugzilla-daemon
2012-01-27 19:14 ` [Bug 1001466] " bugzilla-daemon
2012-02-15 13:47 ` bugzilla-daemon
2012-02-15 13:48 ` bugzilla-daemon
2012-02-15 20:46 ` bugzilla-daemon
2012-02-16 9:55 ` bugzilla-daemon
2012-02-16 14:01 ` Grant Edwards [this message]
2012-02-16 12:20 ` bugzilla-daemon
2012-02-16 14:21 ` bugzilla-daemon
2012-02-16 15:06 ` bugzilla-daemon
2012-02-16 15:39 ` bugzilla-daemon
2012-02-16 15:58 ` bugzilla-daemon
2012-02-16 16:26 ` bugzilla-daemon
2012-02-16 16:37 ` bugzilla-daemon
2012-02-16 16:49 ` bugzilla-daemon
2012-02-16 17:21 ` bugzilla-daemon
2012-02-17 6:17 ` bugzilla-daemon
2012-02-18 19:38 ` bugzilla-daemon
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='jhj25i$ies$1@dough.gmane.org' \
--to=grant.b.edwards@gmail.com \
--cc=ecos-patches@sources.redhat.com \
/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 read-only IMAP folder(s) and NNTP newsgroup(s).