tools: logger: ignore end-of-file in trace mode

Change logger behaviour such that in trace (-t) mode logger
only stops if an error is detected. If no error, logger
continues to try and read data from debugfs node.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
This commit is contained in:
Kai Vehmanen 2019-04-01 17:50:20 +03:00 committed by Janusz Jankowski
parent fe75426a93
commit 9fa0aef635
1 changed files with 4 additions and 1 deletions

View File

@ -371,10 +371,13 @@ static int logger_read(const struct convert_config *config,
return ret;
}
while (!feof(config->in_fd)) {
while (!ferror(config->in_fd)) {
/* getting entry parameters from dma dump */
ret = fread(&dma_log, sizeof(dma_log), 1, config->in_fd);
if (!ret) {
if (config->trace)
continue;
return -ferror(config->in_fd);
}