lkml.org 
[lkml]   [1996]   [Jun]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: Ideas for v2.1
Date
Quoth Andrew E. Mileski:
>
> > >It would a simple matter to _NOT_ log escape sequences, since
> > >printk would already have to detect them in the first place.
> > >The escape code just shouldn't be put in the buffer.
> >
> > No, it would probably be quite tricky.
>
> I _STRONGLY_ don't agree (but that is good isn't it? :-)

Hey, me too! =:^)

> You are _right_ in saying that the escape codes only should be
> acten on in the console driver though.
>
> printk _KNOWS_ what sequences it can handle, and can _easily_
> be told to not log other sequences.
>
> Example: "Hello %E3[K4world%E3[K2\n" (note: bogus esc seqences)
> %En could be defined as meaning an escape sequence of length n.

Absolutely not. That's unnecessary.

We can safely assume that all escape sequences used in the kernel messages
will be standard ANSI X3.64 stuff. The most common, most useful X3.64
escape sequences (if not all of them) begin with escape, and end with a
character with bit 6 set. So a piece-of-cake little two- or three-state
machine could easily pull escape sequences out before logging. Or we could
do it at userlevel with something like awk (or sed, to appease Olaf Kirch
=:^) )

Anyway, doesn't %E conflict with a printf token?

> --
> Andrew E. Mileski
>
> mailto:aem@ott.hookup.net http://www.redhat.com/~aem/
> Linux Plug-and-Play Project http://www.redhat.com/pnp/
>
> Red Hat Software sponsors these pages - I have no other affilitation
> with Red Hat Software, and I have never used any of their products.

-jhp
(who wants linux on his new old PDP-11)

--
Jon Pickard * 149 Olive #45 * Paso Robles CA 93446 * +1 805 2399518 * 6372F5B9
-> I don't work for Concentric, but I don't work against them either. <-
Chief weapons of Unix: fear, surprise, and ruthless efficiency


\
 
 \ /
  Last update: 2005-03-22 13:37    [W:0.148 / U:1.232 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site