mirror of
https://github.com/AsahiLinux/m1n1
synced 2024-11-22 14:43:08 +00:00
m1n1.trace.asc.Syslog: Fix message termination
Signed-off-by: Hector Martin <marcan@marcan.st>
This commit is contained in:
parent
7687d00f5f
commit
3cfe943ec3
1 changed files with 2 additions and 2 deletions
|
@ -274,8 +274,8 @@ class Syslog(EP):
|
|||
buf = self.state.syslog_buf
|
||||
log = self.tracer.dart.ioread(0, buf + msg.INDEX * 0xa0, 0xa0)
|
||||
hdr, unk, context, logmsg = struct.unpack("<II24s128s", log)
|
||||
context = context.rstrip(b"\x00").decode("ascii")
|
||||
logmsg = logmsg.rstrip(b"\x00").decode("ascii").rstrip("\n")
|
||||
context = context.split(b"\x00")[0].decode("ascii")
|
||||
logmsg = logmsg.split(b"\x00")[0].decode("ascii").rstrip("\n")
|
||||
self.log(f"* [{context}]{logmsg}")
|
||||
return True
|
||||
|
||||
|
|
Loading…
Reference in a new issue