[lkml]   [1996]   [Jun]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: Ideas for v2.1
>>> > driver in full working order. So can't we just replace "Ok.\n" with
>>> > "\r\e[K", which will wipe the message off the screen *if* the test
>>> > is successful.
>>> But these escape sequences would also go to the log files, which
>>> is probably not good...
>>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'm sure someone will jump on
>me if I'm wrong, but as I see it the escape sequence is generated by
>the compiler as a string literal and passed in the original call to
>printk(). printk() sorts out logging and buffering as necessary, and
>by default (with no klogd) will output the string verbatim to the
>console device. The console device then interprets any escape
>sequences as necessary. You really don't want to have to *interpret*
>the sequences anywhere other than in the console code, and this is
>basically what you have to do to figure out how many characters after
>the initial escape code \033 need to be ignored.
>To strip it out you have to do one of the following:
> Write an intelligent log viewer that correctly detects and removes VT
> escape sequences. Tricky.

Not _that_ tricky. Read
file:// and you'll see
that the syntax is pretty regular.

-- Aaron Ucko (; finger for PGP public key) | httyp!
"That's right," he said. "We're philosophers. We think, therefore we am."
-- Terry Pratchett, _Small Gods_ | Geek Code 3.1 [for explanation, finger]: GCS/M/S/C d- s: a18 C++(+++)>++++ UL++>++++ P++
L++>+++++ E- W(-) N++(+) o+ K- w--- O M@ V-(--) PS++(+++) PE- Y(+) PGP(+) t(+)
!5 X-- R(-) tv-@ b++(+++) DI+ !D-- G++(+++) e->+++++(*) h!>+ r-(--)>+++ y?

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