[haiku-bugs] Re: [Haiku] #9389: [kernel] syslog_write omits carriage returns of KDL commands

  • From: "Haiku" <trac@xxxxxxxxxxxx>
  • To: undisclosed-recipients: ;
  • Date: Sat, 08 Aug 2020 13:50:18 -0000

#9389: [kernel] syslog_write omits carriage returns of KDL commands
----------------------------+----------------------------
  Reporter:  diver          |      Owner:  nobody
      Type:  bug            |     Status:  assigned
  Priority:  normal         |  Milestone:  R1
 Component:  System/Kernel  |    Version:  R1/Development
Resolution:                 |   Keywords:
Blocked By:                 |   Blocking:
  Platform:  All            |
----------------------------+----------------------------
Comment (by pulkomandy):

 The problem is kputs and kputs_unfiltered go through the debug output
 filter and to syslog, but kputc doesn't.

 The current approach isn't great because all control characters get into
 the syslog (for example if you use backspace, the backspace char is stored
 in syslog). The short term fix of modifying kputchar to also add the char
 to syslog will probably make this even worse (more control characters in
 syslog).

 Ideally, the line editing should be done on screen/serial only, and the
 command added to the syslog only when it is complete. But we're probably
 not going to add a complete TTY layer to KDL.

 Maybe we can replace a single kputchar('\n') with kputs("\n") to cover
 just this specific case and be happy enough with it?
-- 
Ticket URL: <https://dev.haiku-os.org/ticket/9389#comment:2>
Haiku <https://dev.haiku-os.org>
The Haiku operating system.

Other related posts: