1
0

030-dont-call-getsubopt.patch 620 B

12345678910111213141516171819202122232425262728
  1. --- a/utils/v4l2-ctl/v4l2-ctl-common.cpp
  2. +++ b/utils/v4l2-ctl/v4l2-ctl-common.cpp
  3. @@ -671,15 +671,18 @@ static bool parse_subset(char *optarg)
  4. static bool parse_next_subopt(char **subs, char **value)
  5. {
  6. - static char *const subopts[] = {
  7. - NULL
  8. - };
  9. - int opt = getsubopt(subs, subopts, value);
  10. + char *stmp = *subs;
  11. + *value = NULL;
  12. - if (opt < 0 || *value)
  13. + if (*subs) {
  14. + *subs = strchr(stmp, ',');
  15. + if (*subs)
  16. + *(*subs)++ = 0;
  17. + else *subs = stmp + strlen(stmp);
  18. +
  19. + *value = stmp;
  20. return false;
  21. - fprintf(stderr, "No value given to suboption <%s>\n",
  22. - subopts[opt]);
  23. + }
  24. return true;
  25. }