[v4l-utils] v4l2-compliance: identify if compiled with 32 or 64 bits

Message ID 20180417111634.2e6f2cb0@vento.lan (mailing list archive)
State Accepted, archived
Delegated to: Hans Verkuil
Headers

Commit Message

Mauro Carvalho Chehab April 17, 2018, 2:16 p.m. UTC
  As we need to have a 32 bits version in order to check for
compat32 issues, let's print if v4l2-compliance was built
with 32 or 64 bits.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>



Thanks,
Mauro
  

Patch

diff --git a/utils/v4l2-compliance/v4l2-compliance.cpp b/utils/v4l2-compliance/v4l2-compliance.cpp
index eb1f90fd7ad8..ecfcc7716bca 100644
--- a/utils/v4l2-compliance/v4l2-compliance.cpp
+++ b/utils/v4l2-compliance/v4l2-compliance.cpp
@@ -1271,9 +1271,9 @@  int main(int argc, char **argv)
 #ifdef SHA
 #define STR(x) #x
 #define STRING(x) STR(x)
-	printf("v4l2-compliance SHA   : %s\n", STRING(SHA));
+	printf("v4l2-compliance SHA   : %s, %zd bits\n", STRING(SHA), sizeof(void *) * 8);
 #else
-	printf("v4l2-compliance SHA   : not available\n");
+	printf("v4l2-compliance SHA   : not available, %zd bits\n", sizeof(void *) * 8);
 #endif
 
 	struct utsname uts;