From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30784 invoked by alias); 16 Feb 2012 12:20:55 -0000 Received: (qmail 30764 invoked by uid 22791); 16 Feb 2012 12:20:52 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from hagrid.ecoscentric.com (HELO mail.ecoscentric.com) (212.13.207.197) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 16 Feb 2012 12:20:18 +0000 Received: from localhost (hagrid.ecoscentric.com [127.0.0.1]) by mail.ecoscentric.com (Postfix) with ESMTP id 31B1F2F78009 for ; Thu, 16 Feb 2012 12:20:17 +0000 (GMT) Received: from mail.ecoscentric.com ([127.0.0.1]) by localhost (hagrid.ecoscentric.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id wVuHFXRJ3Fur; Thu, 16 Feb 2012 12:20:11 +0000 (GMT) From: bugzilla-daemon@bugs.ecos.sourceware.org To: ecos-patches@ecos.sourceware.org Subject: [Bug 1001466] /dev/null serial driver X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: eCos X-Bugzilla-Component: Patches and contributions X-Bugzilla-Keywords: X-Bugzilla-Severity: enhancement X-Bugzilla-Who: sergei.gavrikov@gmail.com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: low X-Bugzilla-Assigned-To: unassigned@bugs.ecos.sourceware.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: In-Reply-To: References: X-Bugzilla-URL: http://bugs.ecos.sourceware.org/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Date: Thu, 16 Feb 2012 12:20:00 -0000 Message-Id: <20120216122011.2FB5C2F78001@mail.ecoscentric.com> Mailing-List: contact ecos-patches-help@ecos.sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: ecos-patches-owner@ecos.sourceware.org X-SW-Source: 2012-02/txt/msg00060.txt.bz2 Please do not reply to this email. Use the web interface provided at: http://bugs.ecos.sourceware.org/show_bug.cgi?id=1001466 --- Comment #5 from Sergei Gavrikov 2012-02-16 12:20:05 GMT --- (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 - < main(){printf("/dev/null is %s tty\n",isatty(open("/dev/null","r"))?"a":"not");} EOF % ./a.out /dev/null is not tty [snip] > 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. 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. If your concern is diagnostic output only (diag_printf()), you ain't gonna need it. I mean /dev/null. The eCos diagnostic routines do not use devfs. Look infra/current/src/diag.cxx:93 HAL_DIAG_WRITE_CHAR() macro is defined in hal_diag.h as #define HAL_DIAG_WRITE_CHAR(_c_) hal_if_diag_write_char(_c_) Further hal/common/current/src/hal_if.c Using CYGACC_CALL_IF_* macros you can (re-)assign diagnostic channel anywhere, for example, to some auxiliary COMM channel (black-hole). Excellent example how to to deal with eCos COMM channels is RedBoot redboot/current/src/main.c redboot/current/src/io.c Look around mon_write_char() there. So, (IMHO) in the simplest case you would just use diag_init_putc() to solve your issue. More on eCos VV & COMMS channels http://ecos.sourceware.org/docs-latest/ref/hal-porting-guide.html http://ecos.sourceware.org/docs-latest/ref/hal-calling-if.html -- 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.