mirror of https://github.com/thesofproject/sof.git
sof: logger: reopen trace file upon EOF
If logger reads an end-of-file from trace node, reopen the file to ensure trace read position is in sync between host and DSP. Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
This commit is contained in:
parent
f9b4411059
commit
6a84b4e945
|
@ -375,8 +375,10 @@ static int logger_read(const struct convert_config *config,
|
|||
/* getting entry parameters from dma dump */
|
||||
ret = fread(&dma_log, sizeof(dma_log), 1, config->in_fd);
|
||||
if (!ret) {
|
||||
if (config->trace)
|
||||
if (config->trace && !ferror(config->in_fd)) {
|
||||
freopen(NULL, "r", config->in_fd);
|
||||
continue;
|
||||
}
|
||||
|
||||
return -ferror(config->in_fd);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue