mirror of https://github.com/thesofproject/sof.git
logger: open /sys/debug/fw_version _after_ /sys/debug/[e]trace
Open /sys/kernel/debug/sof/fw_version _after_ /sys/kernel/debug/sof/[e]trace because reading the former is optional and the latter is not. So when the driver is not loaded, we get the same (missing trace) error trace message whether we use the -n option or not. Signed-off-by: Marc Herbert <marc.herbert@intel.com>
This commit is contained in:
parent
ee06c700f3
commit
af6bd41a99
|
@ -304,17 +304,6 @@ int main(int argc, char *argv[])
|
|||
goto out;
|
||||
}
|
||||
|
||||
if (config.version_fw) {
|
||||
config.version_fd = fopen(config.version_file, "rb");
|
||||
if (!config.version_fd && !config.dump_ldc) {
|
||||
ret = errno;
|
||||
fprintf(stderr,
|
||||
"error: Unable to open version file %s: %s\n",
|
||||
config.version_file, strerror(ret));
|
||||
goto out;
|
||||
}
|
||||
}
|
||||
|
||||
if (config.out_file) {
|
||||
config.out_fd = fopen(config.out_file, "w");
|
||||
if (!config.out_fd) {
|
||||
|
@ -360,6 +349,17 @@ int main(int argc, char *argv[])
|
|||
if (isatty(fileno(config.out_fd)) != 1)
|
||||
config.use_colors = 0;
|
||||
|
||||
if (config.version_fw) {
|
||||
config.version_fd = fopen(config.version_file, "rb");
|
||||
if (!config.version_fd && !config.dump_ldc) {
|
||||
ret = errno;
|
||||
fprintf(stderr,
|
||||
"error: Unable to open version file %s: %s\n",
|
||||
config.version_file, strerror(ret));
|
||||
goto out;
|
||||
}
|
||||
}
|
||||
|
||||
ret = -convert(&config);
|
||||
|
||||
out:
|
||||
|
|
Loading…
Reference in New Issue