You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

28 lines
620 B

  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. }