From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2715 invoked by alias); 29 May 2007 14:45:23 -0000 Received: (qmail 2704 invoked by uid 22791); 29 May 2007 14:45:20 -0000 X-Spam-Check-By: sourceware.org Received: from main.gmane.org (HELO ciao.gmane.org) (80.91.229.2) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 29 May 2007 14:45:18 +0000 Received: from list by ciao.gmane.org with local (Exim 4.43) id 1Ht2we-0002i0-5G for ecos-discuss@sources.redhat.com; Tue, 29 May 2007 16:45:08 +0200 Received: from c-76-17-159-202.hsd1.mn.comcast.net ([76.17.159.202]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 29 May 2007 16:45:08 +0200 Received: from grante by c-76-17-159-202.hsd1.mn.comcast.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 29 May 2007 16:45:08 +0200 To: ecos-discuss@sources.redhat.com From: Grant Edwards Date: Tue, 29 May 2007 17:05:00 -0000 Message-ID: References: <20070526163810.GA13155@ubuntu> <20070527101131.GA8574@ubuntu> User-Agent: slrn/0.9.8.1 (Linux) X-IsSubscribed: yes Mailing-List: contact ecos-discuss-help@ecos.sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: ecos-discuss-owner@ecos.sourceware.org Subject: [ECOS] Re: diag_printf refuses to print ANSI escape sequences? X-SW-Source: 2007-05/txt/msg00160.txt.bz2 On 2007-05-29, Nick Garnett wrote: > Grant Edwards writes: > >>> Ah, the diag_printf() for me always did mean the diagnostic (read debug) >>> output function, but it didn't mean for me any type of the printf+send. >>> IMHO, those diag_*() functions should be the light weight things. >> >> Then adding extra code to reject strings with escape character >> in them seems to be the wrong way to go then. > > diag_printf() is expressly designed to generate diagnostic > output. This often happens after memory has been corrupted, or during > development, when it would be easy to try and print a string that has > been overwritten, or has not yet been initialized. This has the > potential of making a total mess of the diagnostic output, > particularly if minicom/Hyperterm interprets escape sequences. > > After suffering this one too many times, we added code to check all > strings for printable characters and reject those that don't. This > greatly improved the quality of diagnostics during development and the > dying moments of a system. I completely agree. I don't think the check should be removed, though I think perhaps ESC should be allowed as a "printable" character. I don't currently have a need for it, so this is all just moot court as far as I'm concerned. I was pointing out that not "supporting" escape sequences has nothing to do with keeping diag_printf light weight, because checking for non-printable characters is actually negligiably counter-productive when viewed with that goal in mind. -- Grant Edwards grante Yow! My CODE of ETHICS at is vacationing at famed visi.com SCHROON LAKE in upstate New York!! -- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss