Skip to contentSkip to conversation

trace-cmd: Fix regression of not reading older data files

PATCH New Steven Rostedt 1 participant 1 message Feb 22, 2022

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 trace-cmd: Fix regression of not reading older data files

From: "Steven Rostedt (Google)" <[email protected]>

I have some old trace.dat files that for some reason have the version missing from its file, causing it to flag a "version 0". Because there's now a check for reading a minimum version, it fails to read these files when it use to read them just fine. If there's no version number in the file or the minimum is below what it thinks it is, then just read it.

Fixes 6482f99a47ac ("trace-cmd library: Define trace file version 7")
---
 lib/trace-cmd/trace-util.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
lib/trace-cmd/trace-util.c +1 -1
index f5c77e9154c1..2cf8974ef4ee 100644
@@ -630,7 +630,7 @@ int tracecmd_default_file_version(void)
 
 bool tracecmd_is_version_supported(unsigned int version)
 {
-	if (version >= FILE_VERSION_MIN && version <= FILE_VERSION_MAX)
+	if (version <= FILE_VERSION_MAX)
 		return true;
 	return false;
 }
Signature · 1 line
2.34.1