Skip to contentSkip to conversation

Print integer menu items also in hexadecimal form

PATCH In review Sakari Ailus 2 participants 2 messages Feb 12 Media (V4L/DVB)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Print integer menu items also in hexadecimal form

Print integer menu items also in hexadecimal form for better readability on some controls.

---
 yavta.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
yavta.c +2 -2
index f2d5ea325072..d4c7216ef3de 100644
@@ -1471,8 +1471,8 @@ static void video_query_menu(struct device *dev,
 			printf("  %u: %.32s%s\n", menu.index, menu.name,
 			       menu.index == value ? " (*)" : "");
 		else
-			printf("  %u: %" PRId64 "%s\n", menu.index,
-			       (int64_t)menu.value,
+			printf("  %u: %" PRId64 " (0x%" PRIx64 ")%s\n", menu.index,
+			       (int64_t)menu.value, (int64_t)menu.value,
 			       menu.index == value ? " (*)" : "");
 	};
 }
Signature · 1 line
2.47.3
Reviewed-by on v1 1/1
#1 lore raw

Hi Sakari,

Thank you for the patch.

Quoted 4 lines · Sakari Ailus

Print integer menu items also in hexadecimal form for better readability on some controls.

Quoted 19 lines
---
 yavta.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
yavta.c +2 -2
index f2d5ea325072..d4c7216ef3de 100644
@@ -1471,8 +1471,8 @@ static void video_query_menu(struct device *dev,
 			printf("  %u: %.32s%s\n", menu.index, menu.name,
 			       menu.index == value ? " (*)" : "");
 		else
-			printf("  %u: %" PRId64 "%s\n", menu.index,
-			       (int64_t)menu.value,
+			printf("  %u: %" PRId64 " (0x%" PRIx64 ")%s\n", menu.index,
+			       (int64_t)menu.value, (int64_t)menu.value,
 			       menu.index == value ? " (*)" : "");
 	};
 }
Signature · 3 lines
Regards,

Laurent Pinchart