This is the mail archive of the ecos-patches@sourceware.org mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug 1001466] /dev/null serial driver


Please do not reply to this email. Use the web interface provided at:
http://bugs.ecos.sourceware.org/show_bug.cgi?id=1001466

Ilija Kocho <ilijak@siva.com.mk> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ilijak@siva.com.mk

--- Comment #7 from Ilija Kocho <ilijak@siva.com.mk> 2012-02-16 15:05:15 GMT ---
(In reply to comment #5)
> (In reply to comment #4)
> 
> [snip]
> 
> > 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.
> 
> But it is not terminal/teletype/console/serial, etc. From your source
> (Open Group)
> 
>   /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).
> 
> (EOF) - END OF *FILE*. As I said /dev/null is a special FILE. But,
> /dev/null is not TTY device (not terminal):
> 
> Check in Python
> 
>   >>> import os
>   >>> fd=os.open("/dev/null", os.O_RDWR)
>   >>> os.isatty(fd)
>   False
> 
> Check in C
> 
>   % cc -xc - <<EOF
>   > main(){printf("/dev/null is %s
> tty\n",isatty(open("/dev/null","r"))?"a":"not");}
>   EOF
>   % ./a.out
>   /dev/null is not tty
> 

Shall it really be a problem to use name /dev/null? I don't think so, at least
to me first association with /dev/null is the null device. If it sinks on write
and returns EOF on read it should be enough.

-- 
Configure bugmail: http://bugs.ecos.sourceware.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]