Skip to contentSkip to conversation

f2fs-tools: give WITH_KERNEL_VERSION to check kernel version only

PATCH New Jaegeuk Kim 1 participant 1 message Oct 19, 2018 Library code

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 f2fs-tools: give WITH_KERNEL_VERSION to check kernel version only

This patch adds a build option to relax kernel version and release string to trigger full scan.

---
 lib/libf2fs.c | 5 +++++
 1 file changed, 5 insertions(+)
lib/libf2fs.c +5 -0
index fd3e006..bf2830d 100644
@@ -744,8 +744,13 @@ void get_kernel_uname_version(__u8 *version)
 	if (uname(&buf))
 		return;
 
+#if !defined(WITH_KERNEL_VERSION)
 	snprintf((char *)version,
 		VERSION_LEN, "%s %s", buf.release, buf.version);
+#else
+	snprintf((char *)version,
+		VERSION_LEN, "%s", buf.release);
+#endif
 #else
 	memset(version, 0, VERSION_LEN);
 #endif
Signature · 1 line
2.19.0.605.g01d371f741-goog