aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOliver Lehmann <oliver@FreeBSD.org>2015-03-18 05:54:28 +0000
committerOliver Lehmann <oliver@FreeBSD.org>2015-03-18 05:54:28 +0000
commit26a0c9537d3ea2ff3567db23e930bdc84251042e (patch)
tree8f7e72bf0a483be10f312edd6fa370f29d9ad5e4
parentb828827f992bed0eff0b1927db5ab59c66cf8436 (diff)
Notes
-rw-r--r--multimedia/v4l-utils/files/patch-v4l2-ctl__v4l2-ctl.cpp50
1 files changed, 46 insertions, 4 deletions
diff --git a/multimedia/v4l-utils/files/patch-v4l2-ctl__v4l2-ctl.cpp b/multimedia/v4l-utils/files/patch-v4l2-ctl__v4l2-ctl.cpp
index e4258ecfe63b..01a28d4818cc 100644
--- a/multimedia/v4l-utils/files/patch-v4l2-ctl__v4l2-ctl.cpp
+++ b/multimedia/v4l-utils/files/patch-v4l2-ctl__v4l2-ctl.cpp
@@ -1,5 +1,5 @@
---- v4l2-ctl/v4l2-ctl.cpp.orig 2011-06-01 13:23:03.000000000 +0200
-+++ v4l2-ctl/v4l2-ctl.cpp 2011-06-04 10:03:21.000000000 +0200
+--- v4l2-ctl/v4l2-ctl.cpp.orig 2012-04-14 19:33:44.000000000 +0200
++++ v4l2-ctl/v4l2-ctl.cpp 2015-03-17 21:05:27.176219337 +0100
@@ -21,7 +21,6 @@
*/
@@ -16,7 +16,49 @@
#include <linux/videodev2.h>
#include <libv4l2.h>
-@@ -3279,6 +3277,7 @@
+@@ -1643,10 +1641,31 @@
+ printf("%s\n", iter->second.c_str());
+ }
+ }
++int
++my_getsubopt (char **optionp, char *const *tokens, char **valuep)
++{
++ char *endp, *vstart;
++ int cnt;
++
++ if (**optionp == '\0')
++ return -1;
++
++ /* Find end of next token. */
++ endp = strchrnul (*optionp, ',');
++
++ /* The current suboption does not match any option. */
++ *valuep = *optionp;
++
++ if (*endp != '\0')
++ *endp++ = '\0';
++ *optionp = endp;
++
++ return -1;
++}
+
+ static int parse_subopt(char **subs, const char * const *subopts, char **value)
+ {
+- int opt = getsubopt(subs, (char * const *)subopts, value);
++ int opt = my_getsubopt(subs, (char * const *)subopts, value);
+
+ if (opt == -1) {
+ fprintf(stderr, "Invalid suboptions specified\n");
+@@ -1667,7 +1686,7 @@
+ static char *const subopts[] = {
+ NULL
+ };
+- int opt = getsubopt(subs, subopts, value);
++ int opt = my_getsubopt(subs, subopts, value);
+
+ if (value == NULL) {
+ fprintf(stderr, "No value given to suboption <%s>\n",
+@@ -3493,6 +3512,7 @@
static char buf[40960];
int len;
@@ -24,7 +66,7 @@
if (doioctl(fd, VIDIOC_LOG_STATUS, NULL) == 0) {
printf("\nStatus Log:\n\n");
len = klogctl(3, buf, sizeof(buf) - 1);
-@@ -3300,6 +3299,7 @@
+@@ -3514,6 +3534,7 @@
}
}
}