From: Grant Edwards <grante@visi.com>
To: ecos-discuss@sources.redhat.com
Subject: [ECOS] Re: diag_printf refuses to print ANSI escape sequences?
Date: Tue, 29 May 2007 17:05:00 -0000 [thread overview]
Message-ID: <f3he96$9v9$1@sea.gmane.org> (raw)
In-Reply-To: <m3hcpwklfc.fsf@xl5.calivar.com>
On 2007-05-29, Nick Garnett <nickg@ecoscentric.com> wrote:
> Grant Edwards <grante@visi.com> 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
next prev parent reply other threads:[~2007-05-29 14:45 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-26 16:38 [ECOS] " Grant Edwards
2007-05-26 20:19 ` Sergei Gavrikov
2007-05-26 22:56 ` [ECOS] " Grant Edwards
2007-05-27 10:12 ` Gary Thomas
2007-05-27 14:42 ` Sergei Gavrikov
2007-05-28 5:33 ` Grant Edwards
2007-05-28 15:28 ` Sergei Gavrikov
2007-05-28 20:22 ` Paul D. DeRocco
2007-05-28 20:33 ` Sergei Gavrikov
2007-05-29 4:50 ` Paul D. DeRocco
2007-05-29 9:57 ` Nick Garnett
2007-05-29 17:05 ` Grant Edwards [this message]
2007-05-29 7:45 David Fernandez
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='f3he96$9v9$1@sea.gmane.org' \
--to=grante@visi.com \
--cc=ecos-discuss@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).