hv/trace_dcp: Support commands with retcode only replies

Seen with the SetProperty command of DCP's system EP.

Signed-off-by: Janne Grunau <j@jannau.net>
This commit is contained in:
Janne Grunau 2023-08-28 21:33:46 +02:00 committed by Hector Martin
parent ea5c9be657
commit fb6e035950

View file

@ -380,6 +380,13 @@ class EPICEp(AFKEp):
self.log("Inline payload:")
chexdump(payload, print_fn=self.log)
else:
off = fd.tell()
data = fd.read()
if len(data) == 4:
retcode = struct.unpack("<I", data)[0]
self.log(f"EPIC: retcode only reply retcode={retcode:#x}")
return
fd.seek(off)
cmd = EPICCmd.parse_stream(fd)
if not cmd.rxbuf:
self.log(f"Response {sub.type:#x}: {cmd.retcode:#x}")