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 */
|
/* getting entry parameters from dma dump */
|
||||||
ret = fread(&dma_log, sizeof(dma_log), 1, config->in_fd);
|
ret = fread(&dma_log, sizeof(dma_log), 1, config->in_fd);
|
||||||
if (!ret) {
|
if (!ret) {
|
||||||
if (config->trace)
|
if (config->trace && !ferror(config->in_fd)) {
|
||||||
|
freopen(NULL, "r", config->in_fd);
|
||||||
continue;
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
return -ferror(config->in_fd);
|
return -ferror(config->in_fd);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue