The -l option would only print a value description if the value matched the
first value_map. The others would be ignored due to missing curly braces.
Slightly modified the output so that it no longer prints "" when no value
string was found.
Regards,
Hans
diff -ru ivtv-0.3.7c-org/utils/cx25840ctl.c ivtv-0.3.7c/utils/cx25840ctl.c
--- ivtv-0.3.7c-org/utils/cx25840ctl.c 2005-05-04 23:53:43.000000000 +0200
+++ ivtv-0.3.7c/utils/cx25840ctl.c 2005-08-10 20:35:39.000000000 +0200
@@ -109,14 +109,21 @@
value_map *ap = CX25840_SETTING_MAPPING(i);
char *name = "\0";
while (ap != NULL && ap->name != NULL) {
- if (ap->value == args.value)
+ if (ap->value == args.value) {
name = ap->name;
break;
+ }
ap++;
}
- printf("%s=%d (0x%X) \"%s\"\n",
- CX25840_SETTING_NAME(args.index), args.value, args.value, name);
+ if (*name) {
+ printf("%s=%d (0x%X) \"%s\"\n",
+ CX25840_SETTING_NAME(args.index), args.value, args.value, name);
+ }
+ else {
+ printf("%s=%d (0x%X)\n",
+ CX25840_SETTING_NAME(args.index), args.value, args.value);
+ }
}
}